/* ==========================================================================
   MHB STORE — «AURORA NOIR» Design System v2.0
   Ultra-modern dark-first theme · 2026 edition
   Layered depth · gradient borders · spotlight surfaces · fluid type
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

@font-face {
    font-family: 'VantaCircuit';
    src: url('../fonts/vanta-circuit-grotesque-regular.ttf') format('truetype'),
         url('./vanta-circuit-grotesque-regular.ttf') format('truetype'),
         url('../../vanta-circuit-grotesque-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Base — deep space charcoal with a violet undertone (not flat black) */
    --bg: #06060a;
    --bg-elevated: #0b0b12;
    --bg-soft: #101018;

    --surface: rgba(255, 255, 255, 0.033);
    --surface-2: rgba(255, 255, 255, 0.055);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-active: rgba(255, 255, 255, 0.12);

    --text: #f5f5f7;
    --text-muted: #a2a2b3;
    --text-faint: #6c6c7e;

    --border: rgba(255, 255, 255, 0.085);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(200, 245, 66, 0.38);

    /* Brand — Electric Lime core (matches the 3D maze engine) */
    --accent: #c8f542;
    --accent-hover: #dcff6b;
    --accent-deep: #9fd41f;
    --accent-soft: rgba(200, 245, 66, 0.12);
    --accent-text: #0a0f02;
    --glow: rgba(200, 245, 66, 0.28);
    --glow-strong: rgba(200, 245, 66, 0.5);

    /* Aurora companions */
    --aurora-violet: #8b5cf6;
    --aurora-cyan: #22d3ee;
    --aurora-pink: #ec4899;

    /* Signature gradients */
    --grad-accent: linear-gradient(135deg, #dcff6b 0%, #c8f542 45%, #86e01a 100%);
    --grad-aurora: linear-gradient(120deg, var(--accent) 0%, var(--aurora-cyan) 45%, var(--aurora-violet) 100%);
    --grad-border: linear-gradient(160deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 35%, rgba(200, 245, 66, 0.16) 100%);

    /* Green-ink diffusion palette (جوهر سبز در آب) */
    --ink-900: #020a05;
    --ink-700: #06331b;
    --ink-500: #0b7a39;
    --ink-300: #37c26a;
    --ink-glow: rgba(55, 194, 106, 0.22);
    --grad-ink: linear-gradient(135deg, #c8f542 0%, #37c26a 40%, #0b7a39 75%, #06331b 100%);
    --grad-ink-deep: radial-gradient(circle at 30% 30%, rgba(55, 194, 106, 0.16) 0%, rgba(11, 122, 57, 0.1) 40%, transparent 70%);

    --danger: #ff4d5e;
    --danger-soft: rgba(255, 77, 94, 0.12);
    --success: #34d399;

    --shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 12px 34px rgba(0, 0, 0, 0.35);

    --radius-xl: 26px;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 9px;

    --nav-h: 76px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font: 'Vazirmatn', 'VantaCircuit', 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-en: 'Space Grotesk', 'VantaCircuit', 'Vazirmatn', system-ui, sans-serif;
    --max: 1440px;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
    scroll-padding-top: 110px;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--accent);
    color: var(--accent-text);
}

img { max-width: 100%; display: block; }

/* --------------------------------------------------------------------------
   3. Ambient Scenery — Aurora Orbs, Grid & Film Grain
   -------------------------------------------------------------------------- */
#threeCanvas {
    opacity: 0.85 !important;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12;
    animation: floatOrb 22s infinite ease-in-out alternate;
    will-change: transform;
}

.orb-1 {
    top: -12%;
    right: 14%;
    width: 520px;
    height: 520px;
    background: var(--accent);
}

.orb-2 {
    bottom: 18%;
    left: 4%;
    width: 620px;
    height: 620px;
    background: var(--aurora-violet);
    animation-delay: -7s;
}

.orb-3 {
    top: 42%;
    right: -12%;
    width: 460px;
    height: 460px;
    background: var(--aurora-cyan);
    opacity: 0.09;
    animation-delay: -14s;
}

@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 45px) scale(1.12); }
}

/* Faint blueprint grid fading into the void */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 15%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 15%, transparent 75%);
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.032;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Scroll progress beam */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: var(--grad-aurora);
    z-index: 100000;
    box-shadow: 0 0 14px var(--glow);
    transition: width 0.12s linear;
    border-radius: 0 0 0 4px;
}

/* --------------------------------------------------------------------------
   4. Typography & Links
   -------------------------------------------------------------------------- */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.text-gradient {
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   5. Floating Glass Navbar
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 16px;
    z-index: 100;
    margin-bottom: 32px;
}

.nav-glass {
    background: rgba(11, 11, 17, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 26px;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.nav-glass:hover {
    border-color: var(--border-strong);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 34px rgba(200, 245, 66, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'VantaCircuit', var(--font-en), sans-serif !important;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    direction: ltr;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-logo span {
    font-family: 'VantaCircuit', var(--font-en), sans-serif !important;
}

.brand-logo .dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 14px var(--glow-strong);
    display: inline-block;
    animation: dotPulse 2.6s infinite ease-in-out;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px var(--glow-strong); opacity: 1; }
    50%      { box-shadow: 0 0 20px var(--glow-strong); opacity: 0.72; }
}

.brand-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: none !important;
    border: none !important;
    padding: 0;
    filter: drop-shadow(0 0 10px var(--glow));
    transition: transform 0.4s var(--ease-spring), filter 0.4s var(--ease);
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.14) rotate(-6deg);
    filter: drop-shadow(0 0 18px var(--accent));
}

.brand-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 11px;
    border-radius: 99px;
    border: 1px solid rgba(200, 245, 66, 0.22);
    margin-right: 8px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--glow-strong);
    transition: width 0.3s var(--ease);
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 22px;
}

.nav-link.active {
    color: var(--text);
}

/* --------------------------------------------------------------------------
   6. Mega Menu
   -------------------------------------------------------------------------- */
.nav-item-megamenu {
    position: static;
}

.megamenu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(12, 12, 18, 0.96);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 26px 28px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85), 0 0 60px rgba(200, 245, 66, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
    transform: translateY(12px) scale(0.985);
    z-index: 9999;
}

.megamenu-dropdown::before {
    content: '';
    position: absolute;
    top: -22px;
    left: 0;
    right: 0;
    height: 24px;
    background: transparent;
}

.nav-item-megamenu:hover .megamenu-dropdown,
.nav-item-megamenu:focus-within .megamenu-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.products-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.megamenu-grid {
    display: grid;
    grid-template-columns: 2.2fr 2.2fr 1.6fr;
    gap: 22px;
}

.megamenu-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.megamenu-title {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.megamenu-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 34px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--glow-strong);
}

.megamenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid transparent;
    transition: all 0.25s var(--ease);
    text-decoration: none;
}

.megamenu-item:hover {
    background: var(--accent-soft);
    border-color: rgba(200, 245, 66, 0.24);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 18px rgba(200, 245, 66, 0.08);
}

.megamenu-icon {
    font-size: 1.15rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.megamenu-item strong {
    display: block;
    font-size: 0.87rem;
    color: var(--text);
    font-weight: 700;
}

.megamenu-item span {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.megamenu-spotlight {
    background: linear-gradient(160deg, rgba(200, 245, 66, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
    border: 1px solid rgba(200, 245, 66, 0.16);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.megamenu-spotlight::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 245, 66, 0.55), transparent);
}

@media (max-width: 992px) {
    .megamenu-dropdown {
        width: 95vw;
        right: 50%;
        transform: translateX(50%) translateY(10px);
        position: fixed;
        border-radius: 20px;
        padding: 16px;
    }
    .megamenu-grid {
        grid-template-columns: 1fr;
        max-height: 65vh;
        overflow-y: auto;
    }
}

/* --------------------------------------------------------------------------
   7. Nav Actions — Search & Cart
   -------------------------------------------------------------------------- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 9px 16px 9px 40px;
    font-size: 0.87rem;
    width: 195px;
    transition: all 0.35s var(--ease);
    color: var(--text);
}

.search-input::placeholder { color: var(--text-faint); }

.search-input:focus {
    width: 255px;
    border-color: rgba(200, 245, 66, 0.55);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(200, 245, 66, 0.1), 0 0 24px rgba(200, 245, 66, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-faint);
    pointer-events: none;
    width: 15px;
    height: 15px;
    transition: color 0.25s ease;
}

.search-box:focus-within .search-icon {
    color: var(--accent);
}

/* Live Predictive Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: rgba(14, 18, 26, 0.97);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(200, 245, 66, 0.08);
    z-index: 99999;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.search-result-item:hover {
    background: rgba(200, 245, 66, 0.08);
    transform: translateX(-3px);
}

.search-result-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
    margin-top: 2px;
}

.cart-btn {
    position: relative;
    overflow: hidden;
    background: var(--grad-accent);
    color: var(--accent-text);
    border-radius: 99px;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
    box-shadow: 0 4px 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cart-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s var(--ease);
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px var(--glow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: brightness(1.05);
}

.cart-btn:hover::after {
    left: 130%;
}

.cart-count {
    background: rgba(6, 10, 2, 0.85);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
}

/* Header Outline Line Wishlist Button */
.nav-wishlist-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    text-decoration: none;
    transition: all 0.25s var(--ease);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-wishlist-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.5);
    color: #ff4757;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-wishlist-btn .wishlist-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4757;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    border: 2px solid #07090e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

/* --------------------------------------------------------------------------
   8. Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 9px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.13);
    border-radius: 99px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --------------------------------------------------------------------------
   9. Toasts
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(13, 13, 19, 0.94);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(200, 245, 66, 0.5);
    color: var(--text);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6), 0 0 30px rgba(200, 245, 66, 0.12);
    animation: toastIn 0.4s var(--ease-spring) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(24px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------------------------------------------------
   10. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: var(--grad-accent);
    color: var(--accent-text);
    font-weight: 800;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
    font-size: 0.94rem;
    box-shadow: 0 6px 26px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s var(--ease);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px var(--glow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: brightness(1.05);
}

.btn-primary:hover::after {
    left: 135%;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.095);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    width: fit-content;
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(200, 245, 66, 0.28);
    text-shadow: 0 0 18px rgba(200, 245, 66, 0.4);
}

.badge-outline {
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

/* --------------------------------------------------------------------------
   11. Cart Drawer
   -------------------------------------------------------------------------- */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 6, 0.72);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 440px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0d0d14 0%, #09090f 100%);
    border-right: 1px solid var(--border-strong);
    z-index: 1001;
    transform: translateX(-105%);
    transition: transform 0.5s var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.65);
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    padding: 26px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s var(--ease);
}

.close-btn:hover {
    background: var(--danger-soft);
    border-color: rgba(255, 77, 94, 0.4);
    color: var(--danger);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: flex;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    position: relative;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
    animation: toastIn 0.35s var(--ease);
}

.cart-item:hover {
    border-color: var(--border-glow);
    background: var(--surface-hover);
}

.cart-item img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    background: #000;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 0.92rem;
    font-weight: 700;
}

.cart-item-price {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.qty-btn {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.qty-btn:hover {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 0 14px var(--glow);
}

.cart-footer {
    padding: 24px 28px;
    border-top: 1px solid var(--border);
    background: rgba(8, 8, 13, 0.92);
    backdrop-filter: blur(12px);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   12. Quick View Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 6, 0.82);
    backdrop-filter: blur(14px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(180deg, #0e0e15 0%, #0a0a10 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), 0 0 60px rgba(200, 245, 66, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.94) translateY(14px);
    transition: transform 0.4s var(--ease-spring);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 36px;
}

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

.modal-img-container {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer {
    margin: 90px 0 44px;
    padding: 54px 50px 32px;
    background: linear-gradient(165deg, rgba(16, 16, 24, 0.85) 0%, rgba(10, 10, 16, 0.9) 100%);
    backdrop-filter: blur(26px) saturate(170%);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(200, 245, 66, 0.5) 35%, rgba(34, 211, 238, 0.35) 65%, transparent 100%);
    pointer-events: none;
}

/* Ambient glow bloom inside the footer */
.footer::after {
    content: '';
    position: absolute;
    bottom: -140px;
    right: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 245, 66, 0.09) 0%, transparent 70%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 600px) {
    .footer {
        padding: 34px 24px 26px;
        margin: 48px 0 26px;
        border-radius: var(--radius);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.9;
    max-width: 340px;
}

.footer-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.89rem;
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
    display: inline-block;
    width: fit-content;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(-5px);
    text-shadow: 0 0 20px rgba(200, 245, 66, 0.35);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--text-faint);
    position: relative;
    z-index: 1;
}

/* Back-to-top floating action */
.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(13, 13, 19, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    pointer-events: none;
    transition: all 0.35s var(--ease-spring);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover {
    color: var(--accent);
    border-color: var(--border-glow);
    box-shadow: 0 0 24px rgba(200, 245, 66, 0.18);
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   14. Form Elements (shared across auth / checkout / support pages)
   -------------------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], select, textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

input:focus, select:focus, textarea:focus {
    border-color: rgba(200, 245, 66, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(200, 245, 66, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

select option {
    background: #0d0d14;
    color: var(--text);
}

.form-group { margin-bottom: 4px; }

/* Gateway / payment cards */
.gateway-card, .admin-tab-content {
    animation: fadeUp 0.5s var(--ease);
}

.gateway-header {
    font-weight: 800;
    margin-bottom: 10px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Focus-visible ring for keyboard users */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   15. Mobile Responsive Engine
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .navbar {
        top: 8px;
        margin-bottom: 20px;
    }

    .nav-glass {
        padding: 10px 14px;
        border-radius: 20px;
        gap: 8px;
    }

    .nav-links {
        display: none;
    }

    .brand-logo {
        font-size: 1.05rem;
    }

    .brand-logo-img {
        width: 31px;
        height: 31px;
    }

    .search-input {
        width: 120px;
        padding: 8px 12px 8px 32px;
        font-size: 0.78rem;
    }

    .search-input:focus {
        width: 160px;
    }

    .cart-btn span:not(.cart-count) {
        display: none;
    }

    .cart-btn {
        padding: 9px 13px;
    }

    .cart-drawer {
        width: 100vw;
        max-width: 100vw;
    }

    .modal-content {
        padding: 18px;
        width: 94%;
        border-radius: 20px;
    }

    .modal-grid {
        padding: 22px;
    }

    .btn-primary, .btn-secondary {
        padding: 11px 18px;
        font-size: 0.86rem;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 96px;
    }

    .back-to-top {
        bottom: 96px;
        right: 16px;
    }
}

/* --------------------------------------------------------------------------
   16. Mobile Floating Bottom Dock
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 480px;
    background: rgba(12, 12, 18, 0.85);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 8px 10px;
    display: none;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75), 0 0 30px rgba(200, 245, 66, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 99999;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-faint);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px 13px;
    border-radius: 16px;
    transition: all 0.25s var(--ease);
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--accent);
    background: var(--accent-soft);
    text-shadow: 0 0 16px rgba(200, 245, 66, 0.5);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: 84px;
    }
    .nav-links {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   17.5 LIGHT THEME — «Green Ink on Paper» (toggle via html[data-theme])
   Dark is the default brand experience; light is a soft watercolor paper.
   -------------------------------------------------------------------------- */
html[data-theme="light"] {
    --bg: #f6f7f2;
    --bg-elevated: #ffffff;
    --bg-soft: #eef0e9;

    --surface: rgba(24, 32, 18, 0.045);
    --surface-2: rgba(24, 32, 18, 0.07);
    --surface-hover: rgba(24, 32, 18, 0.1);
    --surface-active: rgba(24, 32, 18, 0.15);

    --text: #1a1f16;
    --text-muted: #575e50;
    --text-faint: #8b9282;

    --border: rgba(24, 32, 16, 0.13);
    --border-strong: rgba(24, 32, 16, 0.22);
    --border-glow: rgba(90, 150, 30, 0.55);

    /* Darker lime for AA contrast on paper */
    --accent: #4d9e0f;
    --accent-hover: #3f8a0a;
    --accent-deep: #357a08;
    --accent-soft: rgba(90, 160, 20, 0.13);
    --accent-text: #f6ffee;
    --glow: rgba(90, 160, 20, 0.28);
    --glow-strong: rgba(90, 160, 20, 0.45);

    --grad-accent: linear-gradient(135deg, #6cc422 0%, #4d9e0f 45%, #357a08 100%);
    --grad-aurora: linear-gradient(120deg, #4d9e0f 0%, #0e9488 45%, #7c5cd6 100%);
    --grad-ink: linear-gradient(135deg, #6cc422 0%, #2f9e55 40%, #0b7a39 75%, #06331b 100%);

    --shadow: 0 32px 90px rgba(30, 40, 25, 0.16);
    --shadow-sm: 0 12px 34px rgba(30, 40, 25, 0.1);
}

/* Surfaces that were hard-coded dark — repapered */
html[data-theme="light"] .nav-glass { background: rgba(255, 255, 255, 0.72); box-shadow: 0 18px 48px rgba(30, 40, 25, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
html[data-theme="light"] .megamenu-dropdown { background: rgba(255, 255, 255, 0.97); box-shadow: 0 40px 100px rgba(30, 40, 25, 0.22), inset 0 1px 0 #fff; }
html[data-theme="light"] .cart-drawer { background: linear-gradient(180deg, #ffffff 0%, #f4f6ef 100%); }
html[data-theme="light"] .modal-content { background: linear-gradient(180deg, #ffffff 0%, #f6f8f2 100%); }
html[data-theme="light"] .footer { background: linear-gradient(165deg, rgba(255,255,255,0.92) 0%, rgba(244,246,239,0.92) 100%); }
html[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.96); }
html[data-theme="light"] .mobile-bottom-nav { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] .float-chip { background: rgba(255, 255, 255, 0.92); box-shadow: 0 16px 40px rgba(30, 40, 25, 0.14), inset 0 1px 0 #fff; }
html[data-theme="light"] .icon-action-btn { background: rgba(255, 255, 255, 0.9); }
html[data-theme="light"] .cart-footer { background: rgba(246, 248, 242, 0.94); }
html[data-theme="light"] .back-to-top { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] .cursor-ring { border-color: rgba(77, 158, 15, 0.5); }
html[data-theme="light"] .grid-overlay {
    background-image:
        linear-gradient(rgba(24, 32, 16, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 32, 16, 0.05) 1px, transparent 1px);
}
html[data-theme="light"] .noise-overlay { opacity: 0.02; }
html[data-theme="light"] .ticker { background: linear-gradient(90deg, rgba(90, 160, 20, 0.07) 0%, rgba(255,255,255,0.75) 50%, rgba(90, 160, 20, 0.07) 100%); }
html[data-theme="light"] .preloader {
    background:
        radial-gradient(ellipse 70% 50% at 50% 45%, rgba(90, 160, 20, 0.1) 0%, transparent 70%),
        #f6f7f2;
}

/* Neutralize dark inline gradients on cards & form fields (paper pass) */
html[data-theme="light"] .bento-card {
    background: linear-gradient(165deg, rgba(255,255,255,0.92) 0%, rgba(246,248,241,0.92) 100%) !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 4px 20px rgba(30, 40, 25, 0.06);
}
html[data-theme="light"] .bento-card:hover {
    box-shadow: 0 24px 54px rgba(30, 40, 25, 0.14), 0 0 42px rgba(90, 160, 20, 0.1), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .hero-card,
html[data-theme="light"] .metric-card { background: linear-gradient(165deg, #ffffff 0%, #f2f5ec 100%) !important; }
html[data-theme="light"] .category-vibe-card { background: linear-gradient(150deg, rgba(90,160,20,0.08) 0%, rgba(255,255,255,0.92) 100%) !important; }
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .search-input { background: rgba(255, 255, 255, 0.8) !important; color: var(--text); }
html[data-theme="light"] .search-input:focus,
html[data-theme="light"] input:focus { background: #ffffff !important; }
html[data-theme="light"] select option { background: #ffffff; }
html[data-theme="light"] .promo-code-box { background: rgba(90, 160, 20, 0.06); text-shadow: none; }
html[data-theme="light"] .cart-count { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] .product-img-wrapper { background: #eceee6; }
html[data-theme="light"] .cart-item img { background: #eceee6; }
html[data-theme="light"] .modal-img-container { background: #eceee6; }
html[data-theme="light"] .metric-num,
html[data-theme="light"] .hero-stat-num { filter: none; }

/* Theme toggle button */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--border-glow);
    transform: rotate(18deg) scale(1.08);
    box-shadow: 0 0 18px var(--glow);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Smooth cross-fade when switching themes */
html.theme-anim,
html.theme-anim body,
html.theme-anim .bento-card,
html.theme-anim .nav-glass,
html.theme-anim .footer,
html.theme-anim .cart-drawer,
html.theme-anim .ticker {
    transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease) !important;
}

/* --------------------------------------------------------------------------
   17.6 Accessibility — reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .preloader { display: none !important; }
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* ==========================================================================
   18. INK EDITION — Preloader · Custom Cursor · Ticker · Kinetic Hero
   «قطره جوهر سبز در آب» signature layer
   ========================================================================== */

/* --- 18.1 Ink Drop Preloader -------------------------------------------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 300000;
    background:
        radial-gradient(ellipse 70% 50% at 50% 45%, rgba(11, 122, 57, 0.12) 0%, transparent 70%),
        #06060a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    transition: opacity 0.7s var(--ease), visibility 0.7s ease, transform 0.7s var(--ease);
}

body.loaded .preloader {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-3%);
    pointer-events: none;
}

/* CSS-only safety fallback: force-hide even if JS never runs */
@keyframes preloaderAutoHide {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.preloader {
    animation: preloaderAutoHide 0.8s ease 3.2s forwards;
}

.preloader-drop {
    width: 46px;
    height: 46px;
    background: var(--grad-ink);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 0 40px rgba(55, 194, 106, 0.45), 0 0 90px rgba(200, 245, 66, 0.2);
    animation: dropDrip 1.4s var(--ease) infinite;
    position: relative;
}

/* expanding ink ripple ring around the drop */
.preloader-drop::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px solid rgba(55, 194, 106, 0.55);
    transform: rotate(45deg);
    animation: inkRipple 1.4s ease-out infinite;
}

@keyframes dropDrip {
    0%, 100% { transform: rotate(-45deg) scale(1); }
    50%      { transform: rotate(-45deg) scale(0.82); }
}

@keyframes inkRipple {
    0%   { transform: rotate(45deg) scale(0.6); opacity: 0.9; }
    100% { transform: rotate(45deg) scale(2.1); opacity: 0; }
}

.preloader-brand {
    font-family: 'VantaCircuit', var(--font-en), sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    direction: ltr;
    color: var(--text);
    text-transform: uppercase;
}

.preloader-brand span { color: var(--accent); }

.preloader-bar {
    width: 170px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.preloader-bar i {
    display: block;
    height: 100%;
    width: 40%;
    background: var(--grad-ink);
    border-radius: 99px;
    animation: barSlide 1.1s var(--ease) infinite;
    box-shadow: 0 0 12px var(--glow);
}

@keyframes barSlide {
    0%   { transform: translateX(220%); }
    100% { transform: translateX(-320%); }
}

/* --- 18.2 Custom Cursor — ink dot & lagging ring ------------------------ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 250000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--glow-strong);
    transition: opacity 0.25s ease, width 0.25s var(--ease), height 0.25s var(--ease);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(55, 194, 106, 0.5);
    background: radial-gradient(circle, rgba(55, 194, 106, 0.07) 0%, transparent 65%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s ease, opacity 0.25s ease;
}

/* grows over interactive elements */
body.cursor-hovering .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: rgba(200, 245, 66, 0.8);
}

body.cursor-hovering .cursor-dot {
    width: 4px;
    height: 4px;
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* --- 18.3 Announcement Ticker (Awwwards marquee) ------------------------ */
.ticker {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-block: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(6, 51, 27, 0.28) 0%, rgba(11, 11, 17, 0.55) 50%, rgba(6, 51, 27, 0.28) 100%);
    padding: 11px 0;
    margin-bottom: 46px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    direction: ltr;
    animation: tickerScroll 36s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 34px;
    padding: 0 17px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    direction: rtl;
}

.ticker-item::after {
    content: '✦';
    color: var(--accent);
    font-size: 0.7rem;
    text-shadow: 0 0 12px var(--glow-strong);
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- 18.4 Section Headers — editorial display type ---------------------- */
.section-head {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-eyebrow::before {
    content: '';
    width: 34px;
    height: 2px;
    background: var(--grad-ink);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow);
}

.section-title {
    font-size: clamp(1.65rem, 3.4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.section-title .stroke-text {
    font-family: var(--font-en);
    color: transparent;
    -webkit-text-stroke: 1.2px rgba(200, 245, 66, 0.55);
    letter-spacing: 0.01em;
    display: inline-block;
}

.section-sub {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin-top: 10px;
    max-width: 560px;
    line-height: 1.8;
}

/* --- 18.5 Kinetic Hero Stage ------------------------------------------- */
.hero-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 44px;
    align-items: center;
    padding: 44px 0 58px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .hero-stage {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 24px 0 40px;
    }
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 99px;
    background: var(--accent-soft);
    border: 1px solid rgba(200, 245, 66, 0.3);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 22px;
    width: fit-content;
}

.hero-kicker .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.6);
    animation: kickerPulse 2s infinite;
}

@keyframes kickerPulse {
    0%   { box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(200, 245, 66, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 245, 66, 0); }
}

.hero-display {
    font-size: clamp(2.1rem, 5vw, 3.9rem);
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    text-wrap: balance;
}

.hero-display .ink-word {
    position: relative;
    display: inline-block;
    background: var(--grad-ink);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(55, 194, 106, 0.3));
}

.hero-lede {
    color: var(--text-muted);
    font-size: clamp(0.95rem, 1.4vw, 1.06rem);
    line-height: 1.9;
    max-width: 520px;
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 38px;
}

.hero-stats {
    display: flex;
    gap: 38px;
    flex-wrap: wrap;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.hero-stat-num {
    font-family: var(--font-en);
    font-size: 1.55rem;
    font-weight: 700;
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-weight: 600;
    margin-top: 3px;
}

/* Blob-morph product frame — a drop of ink holding the hero product */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

.ink-glow-pool {
    position: absolute;
    width: 130%;
    height: 130%;
    border-radius: 50%;
    background: var(--grad-ink-deep);
    filter: blur(46px);
    animation: poolDrift 11s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes poolDrift {
    from { transform: translate(-14px, -8px) scale(1); }
    to   { transform: translate(16px, 12px) scale(1.12); }
}

.blob-frame {
    position: relative;
    width: min(430px, 82vw);
    aspect-ratio: 1;
    border-radius: 58% 42% 55% 45% / 46% 54% 46% 54%;
    overflow: hidden;
    border: 1px solid rgba(200, 245, 66, 0.28);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 70px rgba(55, 194, 106, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: blobMorph 13s ease-in-out infinite;
    z-index: 1;
}

.blob-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.hero-visual:hover .blob-frame img {
    transform: scale(1.07);
}

@keyframes blobMorph {
    0%, 100% { border-radius: 58% 42% 55% 45% / 46% 54% 46% 54%; }
    33%      { border-radius: 45% 55% 48% 52% / 56% 44% 58% 42%; }
    66%      { border-radius: 52% 48% 60% 40% / 42% 58% 44% 56%; }
}

/* floating chips over the blob */
.float-chip {
    position: absolute;
    z-index: 2;
    background: rgba(12, 12, 18, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: chipFloat 5.5s ease-in-out infinite;
}

.float-chip .chip-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-faint);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
}

.float-chip .chip-value {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text);
}

.float-chip .chip-value.accent { color: var(--accent); }

.chip-price { top: 9%; left: 2%; animation-delay: -1.2s; }
.chip-tag   { bottom: 13%; right: 0%; animation-delay: -3s; }
.chip-ship  { top: 44%; left: -4%; animation-delay: -4.4s; }

@keyframes chipFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* --- 18.6 Magnetic Elements -------------------------------------------- */
.magnetic {
    transition: transform 0.25s var(--ease-spring);
    will-change: transform;
}

/* --- 18.7 Smart-Home Hardware Cards ------------------------------------- */
.hw-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    background: linear-gradient(150deg, rgba(55, 194, 106, 0.16) 0%, rgba(6, 51, 27, 0.3) 100%);
    border: 1px solid rgba(55, 194, 106, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 24px rgba(55, 194, 106, 0.08);
    margin-bottom: 16px;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease);
}

.bento-card:hover .hw-icon {
    transform: translateY(-4px) rotate(-5deg) scale(1.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 36px rgba(55, 194, 106, 0.2);
}

.hw-spec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 99px;
    font-family: var(--font-en);
    direction: ltr;
}

/* --- 18.8 Entrance stagger for hero elements ---------------------------- */
.hero-stage .hero-kicker,
.hero-stage .hero-display,
.hero-stage .hero-lede,
.hero-stage .hero-cta,
.hero-stage .hero-stats {
    animation: heroRise 0.85s var(--ease) both;
}

.hero-stage .hero-display { animation-delay: 0.08s; }
.hero-stage .hero-lede    { animation-delay: 0.16s; }
.hero-stage .hero-cta     { animation-delay: 0.24s; }
.hero-stage .hero-stats   { animation-delay: 0.32s; }

.hero-stage .hero-visual {
    animation: heroRise 1s var(--ease) 0.2s both;
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(34px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stage .hero-kicker, .hero-stage .hero-display, .hero-stage .hero-lede,
    .hero-stage .hero-cta, .hero-stage .hero-stats, .hero-stage .hero-visual,
    .ticker-track, .blob-frame, .float-chip {
        animation: none !important;
    }
}

/* ==========================================================================
   20. Cinema-Grade Page Transition Loader (Awwwards / Cyberpunk Luxury)
   ========================================================================== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 45%, #0e1420 0%, #05070a 100%);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
    will-change: opacity, transform;
    pointer-events: all;
    user-select: none;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    pointer-events: none;
}

.page-loader.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: all;
}

/* Ambient Radial Glow */
.loader-aura {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 245, 66, 0.28) 0%, rgba(55, 194, 106, 0.12) 40%, transparent 70%);
    filter: blur(40px);
    animation: auraPulse 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes auraPulse {
    0%   { transform: scale(0.85); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* Central Logo & Orbital Ring Wrapper */
.loader-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}

/* Orbital Perspective Rings */
.loader-orbital-ring {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 1.5px dashed rgba(200, 245, 66, 0.4);
    box-shadow: 0 0 20px rgba(200, 245, 66, 0.15);
    animation: ringSpin 9s linear infinite;
    pointer-events: none;
}

.loader-orbital-ring-2 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    animation: ringSpinReverse 6s linear infinite;
    pointer-events: none;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ringSpinReverse {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

/* Logo Box & Levitation (100% Transparent, No Box/Wave Artifacts) */
.loader-logo-box {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    animation: logoLevitate 2.8s ease-in-out infinite alternate;
}

.loader-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent !important;
    /* Clean contour neon glow hugging only the vector strokes */
    filter: drop-shadow(0 0 16px rgba(200, 245, 66, 0.75)) drop-shadow(0 0 36px rgba(55, 194, 106, 0.35));
    transition: filter 0.3s ease;
}

@keyframes logoLevitate {
    0%   { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.03); }
}

/* Brand Title & Tech Tagline */
.loader-brand {
    font-family: 'VantaCircuit', var(--font-en), sans-serif !important;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 6px;
    text-shadow: 0 0 20px rgba(200, 245, 66, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
}

.loader-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
}

/* High-Tech Progress Bar */
.loader-progress-track {
    width: 220px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.loader-progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #37c26a 0%, #c8f542 100%);
    box-shadow: 0 0 16px var(--accent);
    border-radius: 99px;
    transition: width 0.1s ease-out;
}

.loader-percent {
    margin-top: 10px;
    font-family: var(--font-en);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Smart Home Hardware & IoT Bento Cards
   -------------------------------------------------------------------------- */
.hw-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(200, 245, 66, 0.08);
    border: 1px solid rgba(200, 245, 66, 0.22);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .hw-icon {
    background: var(--accent);
    color: #060805;
    border-color: var(--accent);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 0 28px rgba(200, 245, 66, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hw-spec {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.72rem;
    font-family: var(--font-en);
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.bento-card:hover .hw-spec {
    border-color: rgba(200, 245, 66, 0.25);
    color: var(--accent);
    background: rgba(200, 245, 66, 0.05);
}
