/* VIRTUAL MALL - HOME EXPERIENCE (Premium Discovery) */
:root {
    /* PALETTE: Deep Luxury Dark Mode (Tesla/Apple Dark inspired) */
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    /* Cards */
    --bg-tertiary: #141414;
    /* Hover states */

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* ACCENTS: Electric Blue & Neon Purple */
    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    /* SYSTEM */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* RESET & BASE */
* {
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: hidden;
    padding-bottom: 100px;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* UTILS */
.glass {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.full-width {
    width: 100%;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent-primary);
}

/* --- HEADER (Floating Glass) --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    /* Start transparent-ish */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-header.scrolled {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 32px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text h1 {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

/* Main Nav (Desktop) */
.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

/* Actions */
.header-actions {
    display: flex;
    gap: 16px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}


/* --- 1. HERO SECTION (Cinematic) --- */
.hero-section {
    position: relative;
    height: 60vh;
    /* Almost full screen */
    width: 100%;
    margin-bottom: 60px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Left align text */
    padding: 0 8vw;
}

/* Dark Overlay */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: slideUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent-gradient);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    gap: 16px;
}

.btn-primary {
    padding: 14px 32px;
    background: white;
    color: black;
    font-weight: 600;
    border-radius: 30px;
    font-size: 1rem;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    padding: 14px 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    border-radius: 30px;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}


/* --- 2. FLASH DEALS (Horizontal Scroll) --- */
.deals-section {
    margin-bottom: 80px;
}

.horizontal-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4);
}

.deal-card {
    min-width: 320px;
    height: 400px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
    cursor: pointer;
}

.deal-card:hover {
    transform: scale(0.98);
}

.deal-img {
    width: 100%;
    height: 60%;
    object-fit: cover;
}

.deal-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 40%;
}

.deal-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #ef4444;
    /* Red */
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
}

.deal-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto;
}


/* --- 3. RECOMMENDATIONS (AI Grid) --- */
/* This re-uses the #product-grid ID but styles it differently */
.recommendations-section {
    margin-bottom: 80px;
}

#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

#product-grid.mega-showcase {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
}

/* PRODUCT CARD PREMIUM */
.product-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #fff;
    /* Most product images have white bg */
    padding: 10px;
}

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1rem;
    color: #e4e4e7;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-main);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

/* AI LABEL EXPLANATION */
.ai-reason {
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- 4. TRENDING STORES (Visual Grid) --- */
.stores-section {
    margin-bottom: 80px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.store-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

/* Glow effect behind logo */
.store-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    background: var(--accent-primary);
    filter: blur(80px);
    /* Massive glow */
    transform: translate(-50%, -50%);
    opacity: 0.15;
    z-index: 0;
}

.store-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #000;
    margin-bottom: 16px;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-logo img {
    width: 60%;
    height: auto;
}

.store-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    z-index: 1;
}

.store-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    z-index: 1;
}

.store-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    z-index: 1;
}

.btn-store-primary {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    background: white;
    color: black;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-store-primary:hover {
    background: #e4e4e7;
}

.btn-store-map {
    width: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-store-map:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}


/* --- 5. CATEGORIES (Bold) --- */
.categories-section {
    margin-bottom: 100px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 col on mobile default */
    gap: 16px;
}

@media (min-width: 768px) {
    .cat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cat-card {
    height: 140px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

/* Image Background Tint */
.cat-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    transition: 0.5s;
    filter: grayscale(100%);
}

.cat-card:hover .cat-card-bg {
    opacity: 0.6;
    transform: scale(1.1);
    filter: grayscale(0%);
}

.cat-label {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}


/* --- FLOATING AI CONCIERGE --- */
.ai-concierge-trigger {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: auto;
    max-width: 90%;
}

.ai-concierge-trigger:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.3);
    border-color: var(--accent-primary);
}

.ai-orb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 15px var(--accent-primary);
    animation: pulse 2s infinite;
}

.ai-text {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}


/* --- CHAT OVERLAY (Hidden by default, overlays screen) --- */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Mobile bottom sheet style */
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.chat-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Re-styling the existing chat-panel logic */
.chat-panel {
    width: 100%;
    max-width: 600px;
    height: 80vh;
    background: #141414;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-overlay.active .chat-panel {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .chat-overlay {
        align-items: center;
    }

    .chat-panel {
        height: 700px;
        border-radius: 24px;
        transform: scale(0.9);
        opacity: 0;
    }

    .chat-overlay.active .chat-panel {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Internals */
.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.message {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
}

.ai-message {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e4e4e7;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--accent-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.input-wrapper {
    background: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    display: flex;
}

.input-wrapper input {
    background: transparent;
    border: none;
    flex: 1;
    color: white;
}

#send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* KEYFRAMES */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}