:root {
    --bg-deep: #0a0e27;
    --bg-mid: #1a1f3a;
    --accent-red: #ff3131;
    --accent-yellow: #ffde59;
    --text-main: #e0e6ed;
    --text-dim: #8b93a7;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --neon-glow: 0 0 15px rgba(255, 41, 41, 0.5);
    --accent-red-transparent: rgba(255, 41, 41, 0.5);
    --yellow-glow: 0 0 20px rgba(255, 222, 89, 0.6);
    --particle-color: rgba(255, 49, 49, 0.4);
    --particle-center: rgba(255, 222, 89, 0.6);
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-deep: #ffffff;
    --bg-mid: #f8fafc;
    --accent-red: #c51d1d;
    /* Deeper Crimson for visibility */
    --accent-yellow: #d4af37;
    /* Metallic Gold/Deep Yellow */
    --text-main: #1e293b;
    --text-dim: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.05);
    --neon-glow: 0 0 15px rgba(197, 29, 29, 0.4);
    --accent-red-transparent: rgba(197, 29, 29, 0.15);
    --particle-color: rgba(197, 29, 29, 0.9);
    /* High visibility red */
    --particle-center: rgba(212, 175, 55, 0.95);
    /* High visibility yellow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Exo 2', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.futuristic-font {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border-radius: 12px;
}

/* Neon utilities */
.neon-border-red {
    border: 1px solid var(--accent-red);
    box-shadow: var(--neon-glow);
    animation: themePulse 3s infinite ease-in-out;
}

.neon-text-red {
    color: var(--accent-red);
    text-shadow: var(--neon-glow);
}

.neon-button {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

.neon-button:hover {
    background: var(--accent-red);
    color: var(--bg-deep);
    box-shadow: 0 0 20px var(--accent-red);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

@keyframes themePulse {
    0% {
        box-shadow: 0 0 10px var(--accent-red-transparent);
        border-color: var(--accent-red);
        opacity: 0.8;
    }

    50% {
        box-shadow: 0 0 25px var(--accent-red);
        border-color: var(--accent-red);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 10px var(--accent-red-transparent);
        border-color: var(--accent-red);
        opacity: 0.8;
    }
}

.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
    background: var(--bg-mid);
    /* Use variable instead of hardcoded white */
}

[data-theme="light"] .product-card {
    background: #ffffff !important;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-red);
    box-shadow: 0 0 30px var(--accent-red-transparent);
    animation: themePulse 2s infinite ease-in-out;
    z-index: 10;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .product-image {
    mix-blend-mode: screen;
}

[data-theme="light"] .product-image {
    background-color: transparent !important;
    mix-blend-mode: normal;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1.25rem;
    color: var(--accent-red);
    font-weight: bold;
    display: block;
    margin: 1rem 0;
}

/* Comparative Section */
.comparative-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .comparative-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.comp-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comp-card.conventional {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.7;
}

.comp-card.conventional:hover {
    opacity: 1;
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.comp-card.swipe-pro {
    background: rgba(255, 49, 49, 0.05);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.comp-card.swipe-pro:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 40px var(--accent-red-transparent);
}

.comp-list {
    list-style: none;
    padding: 0;
}

.comp-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text-main);
}

.comp-list li i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Top Sellers Section */
.top-sellers-section {
    padding: 5rem 10%;
    position: relative;
    background: var(--bg-deep);
}

.top-sellers-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    padding-top: 1rem;
    scroll-behavior: smooth;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* For Webkit */
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.top-sellers-grid::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--accent-red);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: var(--bg-deep);
    border-color: var(--accent-red);
    box-shadow: 0 0 20px var(--accent-red-transparent);
    color: #fff;
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.product-card-top {
    min-width: 280px;
    max-width: 320px;
    flex: 0 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.product-card-top:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), var(--neon-glow);
    border-color: var(--accent-red);
}

.badge-best-seller {
    position: absolute;
    top: -12px;
    right: 15px;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #1a1a1a;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-top-image {
    width: 100%;
    height: 180px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-top-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.product-top-image:hover img {
    opacity: 1;
}

.product-top-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.product-top-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.4;
}

.product-top-price {
    font-size: 1.2rem;
    color: #4ade80;
    font-weight: bold;
    margin-bottom: 1rem;
}

.btn-catalog-link {
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Exo 2', sans-serif;
    font-weight: bold;
}

.btn-catalog-link:hover {
    background: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red-transparent);
}

/* Success Case Section & Bar Chart */
.success-case-section {
    padding: 5rem 10%;
    position: relative;
    background: radial-gradient(circle at center, rgba(255,49,49,0.05) 0%, var(--bg-deep) 70%);
}

.success-stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.success-stat {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-stat:hover {
    border-color: var(--accent-red);
    box-shadow: var(--neon-glow);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.success-value {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-family: 'Orbitron', sans-serif;
    color: #4ade80;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.success-label {
    color: var(--text-dim);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bar-chart-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bar-chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), var(--neon-glow);
    border-color: var(--accent-red);
}

.bar-row {
    margin-bottom: 2rem;
}

.bar-row:last-child {
    margin-bottom: 0;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bar-title {
    color: var(--text-main);
}

.bar-amount {
    color: var(--accent-yellow);
    font-weight: bold;
}

.bar-track {
    width: 100%;
    height: 35px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0; /* Starting width for CSS animation */
    transition: width 2s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    padding-left: 1rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Shine effect on bars */
.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.bar-fill.conventional {
    background: linear-gradient(90deg, rgba(255, 49, 49, 0.15), rgba(255, 49, 49, 0.4));
    border-right: 2px solid #ff4444;
}

.bar-fill.swipe {
    background: linear-gradient(90deg, #16a34a, #4ade80);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.6);
    border-right: 2px solid #fff;
}

/* Animations Trigger - On hover of the section, animate the bars */
.success-case-section:hover .bar-fill.conventional,
.bar-chart-container:hover .bar-fill.conventional {
    width: 100%;
}

.success-case-section:hover .bar-fill.swipe,
.bar-chart-container:hover .bar-fill.swipe {
    width: 15%; /* Exact ratio: 1750 / 12000 = 14.58% */
}

/* Animation on load using a class that can be added via JS, or just rely on CSS animation onload */
@keyframes initConv { from { width: 0; } to { width: 100%; } }
@keyframes initSwipe { from { width: 0; } to { width: 15%; } }

.bar-fill.conventional { animation: initConv 2s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: 0.5s; }
.bar-fill.swipe { animation: initSwipe 2s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: 0.5s; }

/* Particle Background Mock */
#particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-deep);
    overflow: hidden;
}

#particle-bg canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Form Elements */
input,
.futuristic-select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

input:focus,
.futuristic-select:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red-transparent);
}

.futuristic-select option {
    background: #0a0e27;
    color: white;
}

/* Lucide Icon Visibility Fix */
[data-lucide] {
    width: 20px;
    height: 20px;
    display: inline-block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Top Sellers: glass effect to match other sections */
.top-sellers-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* ====================================================
   Mobile Dashboard v2: Targeted Section Layout Fixes
   No main-grid approach — targeted rules only
   ==================================================== */
@media (max-width: 768px) {

    /* ── Global overflow guard ── */
    body,
    main,
    section {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* ─────────────────────────────────────────────────
       1. COMPARATIVE / AHORRO: compact 2-col cards
    ───────────────────────────────────────────────── */
    #comparative {
        padding: 2.5rem 1.5% 3rem !important; /* extra top so badge at -15px is visible */
        overflow: visible !important; /* can't clip the absolute badge */
    }

    .comparative-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
        max-width: 100% !important;
        width: 100%;
    }

    .comp-card {
        padding: 0.75rem 0.5rem;
        box-sizing: border-box;
        max-width: 100%;
        /* NO overflow:hidden — clips the yellow badge */
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Force all text inside comp cards to be very compact */
    .comp-card * {
        font-size: 0.68rem !important;
        line-height: 1.3 !important;
    }

    .comp-card h2,
    .comp-card h3 {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .comp-list li {
        margin-bottom: 0.4rem;
    }

    /* ─────────────────────────────────────────────────
       2. TOP VENTAS: horizontal scroll carousel
       Cards are 47% wide so 2 appear simultaneously
    ───────────────────────────────────────────────── */
    .top-sellers-section {
        padding: 3rem 0 3rem 3% !important;
    }

    /* Restore flex scroll — NOT a static grid */
    .top-sellers-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.75rem;
        padding-bottom: 1rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Carousel arrows visible — repositioned for mobile */
    .carousel-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
    }

    .carousel-btn.prev { left: 4px; }
    .carousel-btn.next { right: 4px; }

    /* Cards: 47% so exactly 2 peek on screen */
    .product-card-top {
        min-width: 47% !important;
        max-width: 47% !important;
        flex: 0 0 47% !important;
        padding: 0.75rem;
        box-sizing: border-box;
    }

    .product-top-image {
        height: 110px;
    }

    .product-top-title {
        font-size: 0.72rem;
    }

    .product-top-desc {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-top-price {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .btn-catalog-link {
        font-size: 0.6rem;
        padding: 6px 4px;
    }

    /* ─────────────────────────────────────────────────
       3. SUCCESS CASE STATS → 2 columns
    ───────────────────────────────────────────────── */
    .success-case-section {
        padding: 3rem 4% !important;
    }

    .success-stats-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .success-stat {
        padding: 1rem 0.75rem;
        min-width: unset;
        box-sizing: border-box;
    }

    .success-value {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }

    .success-label {
        font-size: 0.75rem;
    }

    .bar-chart-container {
        padding: 1.5rem 1rem;
    }

    .bar-label {
        font-size: 0.7rem;
    }

    /* ─────────────────────────────────────────────────
       4. #about + #clients: side-by-side using flex
       Uses sibling hack — items placed in a flex row
       on the same "row" by using display:contents trick
    ───────────────────────────────────────────────── */

    /* #about: full width, internal grid stays 2-col (text | Misión Cuántica) */
    #about {
        padding: 2.5rem 4% !important;
        width: 100%;
        box-sizing: border-box;
    }

    /* #clients: full width, styled like #our-clients */
    #clients {
        padding: 2.5rem 4% !important;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* No float to clear */
    #our-clients {
        clear: none;
    }

    /* KEEP about's internal 2-col grid (Quiénes Somos | Misión Cuántica side by side) */
    #about [style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    #about h2,
    #clients h2 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    #about p,
    #clients p {
        font-size: 0.68rem !important;
        line-height: 1.4;
    }

    /* Compact glass mission box */
    #about .glass.neon-border-red {
        padding: 0.6rem !important;
    }

    #about h3 {
        font-size: 0.75rem !important;
        margin-bottom: 0.4rem !important;
    }

    /* Certs grid: 3-col — same style as #our-clients .clients-grid */
    #clients .cert-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem;
    }

    .cert-slot {
        min-height: 55px !important;
        font-size: 0.55rem;
        padding: 0.3rem;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .cert-placeholder {
        font-size: 0.55rem !important;
    }

    /* ─────────────────────────────────────────────────
       5. #our-clients: full width, clean cert layout
    ───────────────────────────────────────────────── */
    #our-clients {
        padding: 2.5rem 4% !important;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    #our-clients h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }

    #our-clients p {
        font-size: 0.75rem !important;
        min-width: unset !important;
    }

    #our-clients .clients-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem;
    }

    /* ─────────────────────────────────────────────────
       6. #distintivo-verde: Text LEFT / Image RIGHT
    ───────────────────────────────────────────────── */
    #distintivo-verde {
        padding: 2.5rem 4% !important;
    }

    #distintivo-verde h2 {
        font-size: 1.1rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* Override inline flex-wrap to enforce 2-col */
    #distintivo-verde > div[style*="display: flex"] {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        gap: 1rem !important;
        align-items: stretch;
        max-width: 100%;
    }

    /* Left col: text */
    #distintivo-verde > div > div.glass {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 1rem !important;
    }

    #distintivo-verde h3 {
        font-size: 1rem !important;
    }

    #verde-descripcion {
        font-size: 0.75rem !important;
        line-height: 1.5;
        min-height: 80px !important;
    }

    /* Right col: image slot */
    #distintivo-verde > div > div:not(.glass) {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    #verde-slot-container {
        min-height: 160px !important;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header {
        margin: 5px 2% !important;
        padding: 0.8rem 4% !important;
        flex-direction: column;
        gap: 1rem;
        border-radius: 20px !important;
    }

    header nav ul {
        gap: 1.5rem !important;
        justify-content: center;
        width: 100%;
        padding: 0;
    }

    .logo {
        font-size: 1.2rem !important;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* --- Catalog: 2-column grid on mobile --- */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem 3%;
    }

    /* Cards were flex-row — must switch to column so image stacks above text */
    .product-card {
        flex-direction: column !important;
    }

    /* Give the image a fixed column-friendly height so it's visible */
    .product-image {
        height: 130px !important;
        width: 100% !important;
        flex-shrink: 0;
    }

    /* Ensure the <img> inside fills the container */
    .product-image img {
        display: block;
        max-width: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-info {
        padding: 0.6rem 0.5rem;
    }

    .product-info h3 {
        font-size: 0.75rem;
        letter-spacing: 0.3px;
        line-height: 1.2;
    }

    .product-info p {
        display: none; /* hide description — too cramped in 2-col */
    }

    .price {
        font-size: 0.85rem;
        margin: 0.3rem 0;
    }

    /* Stack the two CTA buttons vertically */
    .product-info > div[style*="display: flex"] {
        flex-direction: column;
        gap: 0.3rem;
    }

    .neon-button {
        padding: 6px 8px;
        font-size: 0.6rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    header nav ul {
        flex-wrap: wrap;
        gap: 1rem !important;
    }
    /* Keep 2-column grid even on narrowest phones */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* Admin Consolidated Menu */
.admin-menu-container {
    position: relative;
    display: inline-block;
}

.admin-submenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-mid);
    border: 1px solid var(--accent-red);
    padding: 0.8rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--neon-glow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.admin-submenu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-sub-btn {
    text-decoration: none;
    font-size: 0.75rem;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-align: center;
    transition: all 0.2s;
}

.admin-sub-btn.sales {
    background: var(--accent-yellow);
    color: var(--bg-deep);
}

.admin-sub-btn.quotes {
    background: var(--accent-red);
    color: var(--bg-deep);
}

.admin-sub-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.03);
}

/* Global Admin Only Visualization Rule */
.admin-only-hint {
    display: none !important;
}

body.admin-mode .admin-only-hint {
    display: block !important;
}

/* --- AI Chatbot Widget --- */
.chat-widget-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--bg-deep);
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    cursor: pointer;
    box-shadow: var(--neon-glow);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chat-widget-btn:hover {
    background: var(--accent-red);
    color: var(--bg-deep);
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--bg-deep);
    border: 1px solid var(--accent-red);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--neon-glow);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: var(--bg-mid);
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    color: var(--accent-yellow);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s;
}
.chat-close-btn:hover { color: var(--accent-red); }

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: var(--bg-mid);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 2px;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--accent-red-transparent);
    border: 1px solid var(--accent-red);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 12px;
    background: var(--bg-mid);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    margin-bottom: 0;
    padding: 10px;
    font-size: 0.85rem;
    border-radius: 20px;
}

.chat-send-btn {
    background: var(--accent-red);
    border: none;
    color: var(--bg-deep);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.chat-send-btn:hover { transform: scale(1.1); }