@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(30, 30, 30, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #5e5e5e;
    --accent-hover: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --primary: #2ecc71;
    --success: #2ecc71;
    --danger: #e74c3c;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 130px; /* 35px announcement + ~95px header */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Announcement Bar */
.announcement-bar {
    background: #ffffff;
    color: #000000;
    height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-container {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.announcement-container p {
    padding-right: 50px;
    margin: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}



/* Header & Navigation */
header {
    position: fixed;
    top: 35px; /* Directly below the 35px announcement bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    top: 35px;
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a:hover {
    color: var(--text-secondary);
}

.nav-icons {
    display: flex;
    gap: 20px;
    font-size: 1.2rem;
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.btn:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
}

.product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-price {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

input:focus {
    border-color: var(--text-primary);
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #1ebe57;
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

/* Utility */
.text-center {
    text-align: center;
}

.mt-100 {
    margin-top: 100px;
}

.pb-100 {
    padding-bottom: 100px;
}

/* Responsive Navigation (Hamburger Menu) */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    border: none;
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        border-top: 1px solid var(--border);
        border-bottom: 2px solid var(--text-primary);
        z-index: 1000;
    }

    .nav-icons {
        display: flex !important;
        /* Keep icons always visible next to hamburger */
        font-size: 1.1rem;
        gap: 15px;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-active .nav-links {
        display: flex;
    }

    /* Make the hero look okay on mobile */
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 120px 0 60px 0;
        min-height: auto;
    }

    /* Adjust the keyword SEO dump for mobile screens */
    .container div[style*="column-count: 6"] {
        column-count: 2 !important;
        font-size: 0.5rem !important;
    }

    /* Make all inline custom grid columns stack vertically on mobile */
    [style*="grid-template-columns"]:not([style*="repeat"]) {
        grid-template-columns: 1fr !important;
    }

    /* Convert tables into scrollable blocks so they don't widen the screen */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust heavy paddings and margins for mobile screens */
    .glass {
        padding: 20px !important;
    }

    /* Make inline structural flex containers stack vertically */
    .container div[style*="display: flex; gap: 50px"],
    .container div[style*="display: flex; gap: 60px"],
    .container div[style*="display: flex; gap: 80px"] {
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* Remove breaking min-widths (like in product display) */
    div[style*="min-width: 400px"] {
        min-width: 100% !important;
    }

    /* Sidebar specific width override */
    aside[style*="width: 250px"] {
        width: 100% !important;
    }

    /* Utility Classes */
    .mt-50 {
        margin-top: 50px;
    }

    .mt-100 {
        margin-top: 100px;
    }

    .mt-150 {
        margin-top: 150px;
    }

    .mt-200 {
        margin-top: 200px;
    }

    .pb-100 {
        padding-bottom: 100px;
    }

    @media (max-width: 768px) {
        /* ... existing mobile styles ... */

        .mt-100 {
            margin-top: 60px;
        }

        .mt-150 {
            margin-top: 80px;
        }

        .pb-100 {
            padding-bottom: 60px;
        }
    }

    /* Form Styles */
    .form-group {
        margin-bottom: 25px;
        text-align: left;
    }

    .form-group label {
        display: block;
        margin-bottom: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 15px;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: #fff;
        font-size: 1rem;
        font-family: inherit;
        transition: var(--transition);
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        background: rgba(0, 0, 0, 0.6);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    }

    .form-group select option {
        background: #111;
        color: #fff;
    }

    textarea {
        resize: vertical;
        min-height: 120px;
    }

    /* Specific Chat Styles (to match forms) */
    #chat-textarea {
        background: rgba(0, 0, 0, 0.4) !important;
        border: 1px solid var(--border) !important;
    }

    #chat-textarea:focus {
        border-color: var(--primary) !important;
    }
}


/* AI Assistant Floating Chat - Premium Edition */
#ai-assistant-bubble {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    width: 65px;
    height: 65px;
    background: #ffffff;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 99999 !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ai-assistant-bubble:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 20px 60px rgba(255,255,255,0.2);
}

#ai-chat-window {
    position: fixed !important;
    bottom: 110px !important;
    left: 30px !important;
    width: 400px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 150px);
    z-index: 99999 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(10, 10, 10, 0.92);
    animation: aiWindowOpen 0.3s ease-out;
}

@keyframes aiWindowOpen {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
    background: #ffffff;
    color: #000000;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1rem;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.ai-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-msg.bot {
    background: rgba(255,255,255,0.08);
    color: #eeeeee;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.ai-msg.user {
    background: #ffffff;
    color: #000000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.ai-recommendation-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 15px;
    margin-top: 5px;
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-recommendation-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
    border-color: rgba(255,255,255,0.3);
}

.ai-recommendation-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.ai-chat-input-area {
    padding: 25px;
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.ai-chat-input-area input {
    flex: 1;
    background: rgba(40, 40, 40, 0.4);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.ai-chat-input-area input:focus {
    border-color: #ffffff;
    background: rgba(50, 50, 50, 0.5);
}

.ai-chat-input-area button {
    background: #ffffff;
    border: none;
    color: #000000;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-input-area button:hover {
    transform: scale(1.1);
    background: #ffffff;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

@media (max-width: 480px) {
    #ai-chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 100px !important;
        left: 20px !important;
    }
    #ai-assistant-bubble {
        bottom: 20px !important;
        left: 20px !important;
    }
}

/* =========================================
   EXIT INTENT POPUP
   ========================================= */
#exit-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#exit-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

#exit-popup {
    position: relative;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 50px 45px 40px;
    max-width: 440px;
    width: 92%;
    text-align: center;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#exit-popup-overlay.active #exit-popup {
    transform: translateY(0) scale(1);
}

#exit-popup-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    padding: 0;
}
#exit-popup-close:hover { color: #fff; }

.exit-popup-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: bounceEmoji 1.5s ease-in-out infinite;
}
@keyframes bounceEmoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.exit-popup-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.exit-popup-subtitle {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.exit-popup-discount {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    line-height: 1;
}

.exit-popup-code-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.exit-popup-code {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border: 2px dashed rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff;
    margin-bottom: 24px;
    transition: all 0.2s ease;
    user-select: all;
}
.exit-popup-code:hover {
    border-color: #2ecc71;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.08);
}

.exit-popup-cta {
    display: block;
    width: 100%;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 14px;
}
.exit-popup-cta:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(255,255,255,0.2);
}

.exit-popup-note {
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
}

/* Checkout Layout Improvements */
.checkout-layout {
    display: grid !important;
    grid-template-columns: 2fr 1.1fr !important;
    gap: 40px;
}

.checkout-sidebar {
    height: 100%;
}

.checkout-sidebar .glass {
    position: sticky;
    top: 130px;
    z-index: 10;
}

@media (max-width: 992px) {
    .checkout-layout {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .checkout-sidebar .glass {
        position: static;
    }
}

/* Soften overly broad stacking rules from original CSS */
@media (max-width: 768px) {
    .container div[style*="display: flex; gap: 50px"],
    .container div[style*="display: flex; gap: 60px"],
    .container div[style*="display: flex; gap: 80px"] {
        flex-direction: column !important;
        gap: 30px !important;
    }
}

/* Remove or soften the generic selector that was breaking grids */
[style*="grid-template-columns"]:not([style*="repeat"]) {
    /* Only stack at very small mobile sizes, or allow specific classes to handle it */
}

@media (max-width: 768px) {
    [style*="grid-template-columns"]:not([style*="repeat"]) {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================
   3D & AR VIEWER STYLES
   ========================================= */
model-viewer {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #000;
    --progress-bar-color: var(--primary);
    --progress-bar-height: 2px;
    outline: none;
}

.chat-3d-container {
    width: 100%;
    height: 280px; 
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    position: relative;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .chat-3d-container {
        height: 220px; /* Adjust for smaller screens */
    }
}

#ar-viewer-container {
    animation: fadeIn 0.5s ease forwards;
}

#ar-prompt {
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    animation: ar-prompt-fade 4s linear infinite;
}

@keyframes ar-prompt-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

#ar-prompt img {
    width: 40px;
}

.model-loading-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
