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

        :root {
            --bg: #eef3f8;
            --bg-elev: #ffffff;
            --bg-muted: #e2eaf2;
            --text: #0f172a;
            --text-soft: #475569;
            --text-faint: #64748b;
            --line: #d5e0ea;
            --nav: rgba(238, 243, 248, 0.86);
            --accent: #0d9488;
            --accent-2: #0284c7;
            --shadow: 0 18px 40px -18px rgb(15 23 42 / 0.18);
        }

        html.dark {
            --bg: #070b14;
            --bg-elev: #101826;
            --bg-muted: #162033;
            --text: #f1f5f9;
            --text-soft: #94a3b8;
            --text-faint: #64748b;
            --line: #243044;
            --nav: rgba(7, 11, 20, 0.82);
            --accent: #2dd4bf;
            --accent-2: #38bdf8;
            --shadow: 0 22px 50px -20px rgb(0 0 0 / 0.55);
        }

        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }

        body {
            font-family: 'Inter', system-ui, sans-serif;
            background: var(--bg);
            color: var(--text);
            transition: background .25s ease, color .25s ease;
            min-height: 100vh;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: -1;
            background:
                radial-gradient(900px 500px at 12% -10%, rgba(13,148,136,.22), transparent 55%),
                radial-gradient(800px 480px at 110% 8%, rgba(2,132,199,.18), transparent 50%),
                radial-gradient(700px 420px at 50% 120%, rgba(13,148,136,.12), transparent 55%),
                linear-gradient(180deg, var(--bg), var(--bg));
        }

        html.dark body::before {
            background:
                radial-gradient(900px 520px at 8% -8%, rgba(45,212,191,.16), transparent 55%),
                radial-gradient(820px 500px at 108% 0%, rgba(56,189,248,.14), transparent 52%),
                radial-gradient(640px 400px at 50% 115%, rgba(45,212,191,.08), transparent 55%),
                linear-gradient(180deg, #070b14, #0b1220);
        }

        .grid-overlay {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: -1;
            background-image:
                linear-gradient(to right, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
                linear-gradient(to bottom, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
            background-size: 48px 48px;
            mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
            opacity: .45;
        }

        .logo-font {
            font-family: 'Space Grotesk', 'Inter', sans-serif;
            font-weight: 600;
            letter-spacing: -0.025em;
        }

        .section-header {
            font-size: 2.25rem;
            line-height: 2.5rem;
            font-weight: 700;
            letter-spacing: -0.025em;
        }

        nav.site-nav {
            z-index: 80;
        }
        nav.site-nav, #mobile-menu, footer.site-footer {
            background: var(--nav);
            border-color: var(--line);
            backdrop-filter: blur(16px);
        }
        #mobile-menu { position: relative; z-index: 80; }

        a.nav-link { color: var(--text-soft); transition: color .2s ease; }
        a.nav-link:hover { color: var(--accent); }

        .nav-drop { position: relative; }
        .nav-drop-menu {
            position: absolute;
            top: calc(100% + 10px);
            left: 50%;
            transform: translateX(-50%) translateY(6px);
            min-width: 220px;
            padding: 8px;
            border-radius: 18px;
            background: var(--bg-elev);
            border: 1px solid var(--line);
            box-shadow: var(--shadow);
            opacity: 0;
            pointer-events: none;
            transition: opacity .18s ease, transform .18s ease;
            z-index: 90;
        }
        .nav-drop-menu::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: -14px;
            height: 14px;
        }
        .nav-drop:hover .nav-drop-menu,
        .nav-drop:focus-within .nav-drop-menu {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) translateY(0);
        }
        .nav-drop-menu a {
            display: block;
            padding: 10px 12px;
            border-radius: 12px;
            color: var(--text-soft);
            font-size: 13px;
            font-weight: 500;
            text-decoration: none;
        }
        .nav-drop-menu a:hover {
            background: var(--bg-muted);
            color: var(--text);
        }
        .mobile-cats { display: none; padding: 0 0 8px 12px; }
        .mobile-cats.open { display: flex; flex-direction: column; }

        .card {
            background: var(--bg-elev);
            border: 1px solid var(--line);
            transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
            box-shadow: var(--shadow);
        }
        .card:hover {
            transform: translateY(-4px);
            border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
        }

        .muted { color: var(--text-soft); }
        .faint { color: var(--text-faint); }
        .line { border-color: var(--line); }

        .btn-primary { background: #0f172a; color: #fff; }
        html.dark .btn-primary { background: #f8fafc; color: #0f172a; }
        .btn-ghost {
            border: 1px solid var(--line);
            color: var(--text);
            background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
        }
        .btn-ghost:hover { background: var(--bg-muted); }

        .icon-btn { color: var(--text-soft); }
        .icon-btn:hover { color: var(--text); background: var(--bg-muted); }

        .chip { background: var(--bg-muted); color: var(--text-soft); }

        .placeholder {
            background: var(--bg-muted);
            color: color-mix(in srgb, var(--text-faint) 70%, transparent);
        }

        .logo-btn img {
            height: 52px;
            width: 52px;
            object-fit: cover;
            border-radius: 14px;
            box-shadow: 0 8px 20px -10px rgb(15 23 42 / .45);
        }

        .product-photo, .gallery-photo, .pdp-main-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .catalog-img-wrap { cursor: zoom-in; }

        .product-title-link {
            color: inherit;
            text-decoration: none;
        }
        .product-title-link:hover { color: var(--accent); }

        .thumb {
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: 12px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: border-color .2s ease, transform .2s ease;
        }
        .thumb.active, .thumb:hover {
            border-color: var(--accent);
            transform: translateY(-1px);
        }

        body.product-open .home-view,
        body.checkout-open .home-view { display: none; }
        body.product-open .product-view { display: block; }
        .product-view, .checkout-view { display: none; }
        body.checkout-open .checkout-view { display: block; }
        body.checkout-open .product-view { display: none; }

        #lightbox {
            position: fixed;
            inset: 0;
            z-index: 80;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(7, 11, 20, .88);
            backdrop-filter: blur(10px);
        }
        #lightbox.open { display: flex; }

        #lightbox img {
            max-width: min(92vw, 980px);
            max-height: 78vh;
            object-fit: contain;
            border-radius: 16px;
            box-shadow: 0 24px 60px -20px rgb(0 0 0 / .6);
            user-select: none;
            -webkit-user-drag: none;
        }

        .lb-btn {
            position: absolute;
            width: 48px;
            height: 48px;
            border-radius: 16px;
            border: 0;
            background: rgba(255,255,255,.12);
            color: #fff;
            cursor: pointer;
        }
        .lb-btn:hover { background: rgba(255,255,255,.22); }
        .lb-close { top: 18px; right: 18px; }
        .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
        .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
        .lb-counter {
            position: absolute;
            bottom: 22px;
            left: 50%;
            transform: translateX(-50%);
            color: #e2e8f0;
            font-size: 14px;
        }

        .cart-badge {
            position: absolute;
            top: 4px;
            right: 4px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: var(--text);
            color: var(--bg);
            font-size: 10px;
            font-weight: 700;
            line-height: 18px;
            text-align: center;
            transform: scale(0);
            transform-origin: center;
            transition: transform .22s ease;
        }
        html.dark .cart-badge {
            background: #f8fafc;
            color: #0f172a;
        }
        .cart-badge.show { transform: scale(1); }
        .cart-badge.pop { animation: badge-pop .28s ease; }
        @keyframes badge-pop {
            0% { transform: scale(.7); }
            55% { transform: scale(1.18); }
            100% { transform: scale(1); }
        }

        .qty-wrap {
            display: inline-flex;
            align-items: center;
            height: 40px;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
            overflow: hidden;
        }
        .qty-wrap button {
            width: 38px;
            height: 40px;
            border: 0;
            background: transparent;
            color: var(--text-soft);
            cursor: pointer;
        }
        .qty-wrap button:hover { color: var(--text); background: var(--bg-muted); }
        .qty-wrap span {
            min-width: 22px;
            text-align: center;
            font-size: 14px;
            font-weight: 600;
        }

        .add-cart-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            height: 40px;
            padding: 0 16px;
            border-radius: 999px;
            border: 1px solid var(--line);
            background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
            color: var(--text);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: background .2s ease, border-color .2s ease;
        }
        .add-cart-btn:hover {
            background: var(--bg-muted);
            border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
        }

        .cart-drawer {
            position: fixed;
            top: 5rem;
            right: 0;
            width: min(400px, 100vw);
            height: calc(100vh - 5rem);
            z-index: 70;
            background: var(--bg-elev);
            border-left: 1px solid var(--line);
            transform: translateX(100%);
            transition: transform .32s ease;
            display: flex;
            flex-direction: column;
            box-shadow: -24px 0 50px -28px rgb(15 23 42 / .35);
        }
        .cart-drawer.open { transform: translateX(0); }

        .cart-backdrop {
            position: fixed;
            top: 5rem;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 65;
            background: rgb(15 23 42 / .35);
            opacity: 0;
            pointer-events: none;
            transition: opacity .32s ease;
        }
        .cart-backdrop.open {
            opacity: 1;
            pointer-events: auto;
        }

        .cart-line-img {
            width: 64px;
            height: 64px;
            object-fit: cover;
            border-radius: 14px;
            background: var(--bg-muted);
        }
        .trash-btn {
            width: 40px;
            height: 40px;
            border: 0;
            border-radius: 14px;
            background: transparent;
            color: var(--text-faint);
            cursor: pointer;
        }
        .trash-btn:hover {
            color: #be123c;
            background: var(--bg-muted);
        }

        .pay-card {
            width: 100%;
            text-align: left;
            background: var(--bg-elev);
            border: 1px solid var(--line);
            border-radius: 24px;
            padding: 18px 20px;
            cursor: pointer;
            transition: border-color .2s ease, box-shadow .2s ease;
        }
        .pay-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
        .pay-card.selected {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
        }
        .pay-detail {
            display: none;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--line);
            font-size: 13px;
            color: var(--text-soft);
        }
        .pay-card.selected .pay-detail { display: block; }
        .copy-chip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            width: 100%;
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 14px;
            background: var(--bg-muted);
            color: var(--text);
            font-weight: 600;
            font-size: 13px;
            border: 0;
            cursor: pointer;
        }
        .pay-qr {
            display: none;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--line);
            text-align: center;
        }
        .pay-qr.show { display: block; }
        .pay-qr img {
            width: min(280px, 78%);
            height: auto;
            aspect-ratio: 1;
            margin: 0 auto 10px;
            border-radius: 12px;
            background: #fff;
            padding: 8px;
        }


        .gallery-carousel {
            position: relative;
            max-width: 560px;
            margin: 0 auto;
            border-radius: 20px;
            overflow: hidden;
            background: var(--card);
            border: 1px solid var(--line);
            box-shadow: 0 12px 28px -22px rgb(15 23 42 / .4);
        }
        .gallery-viewport {
            position: relative;
            aspect-ratio: 4 / 3;
            overflow: hidden;
        }
        @media (max-width: 700px) {
            .gallery-carousel { max-width: 340px; }
            .gallery-viewport { aspect-ratio: 4 / 3; }
        }
        .gallery-track { position: absolute; inset: 0; }
        .gallery-slide {
            position: absolute;
            inset: 0;
            opacity: 0;
            transform: scale(1.03);
            transition: opacity .7s ease, transform .7s ease;
            pointer-events: none;
        }
        .gallery-slide.active {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        .gallery-slide img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center center;
            display: block;
            background: #111;
        }
        .gallery-slide .cap {
            position: absolute;
            left: 0; right: 0; bottom: 0;
            padding: 18px 16px 14px;
            background: linear-gradient(to top, rgba(8,10,16,.55), transparent);
            color: #fff;
        }
        .gallery-slide .cap strong { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .01em; }
        .gallery-slide .cap span { display: none; }
        .gallery-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 32px; height: 32px;
            border-radius: 999px;
            border: 0;
            background: rgba(255,255,255,.88);
            color: #111;
            display: grid;
            place-items: center;
            cursor: pointer;
            z-index: 2;
            box-shadow: 0 8px 20px -12px rgb(0 0 0 / .5);
        }
        .gallery-nav.prev { left: 10px; }
        .gallery-nav.next { right: 10px; }
        .gallery-dots {
            position: absolute;
            left: 0; right: 0; bottom: 12px;
            display: flex;
            justify-content: center;
            gap: 7px;
            z-index: 2;
            pointer-events: none;
        }
        .gallery-dots button {
            pointer-events: auto;
            width: 7px; height: 7px;
            border-radius: 99px;
            border: 0;
            background: rgba(255,255,255,.45);
            cursor: pointer;
            padding: 0;
        }
        .gallery-dots button.on { background: #fff; width: 18px; }

        .view-toggle {
            display: flex;
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            background: var(--card);
        }
        .view-toggle button {
            width: 38px; height: 34px;
            border: 0;
            background: transparent;
            color: var(--muted);
            cursor: pointer;
        }
        .view-toggle button.on {
            background: var(--bg-muted);
            color: var(--text);
        }
        #catalog-all-link.hidden-link { display: none !important; }

        .catalog-grid.view-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        @media (min-width: 900px) {
            .catalog-grid.view-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
        }
        .catalog-grid.view-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .cat-card {
            background: var(--card);
            border: 1px solid var(--line);
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .cat-card .shot {
            aspect-ratio: 1 / 1;
            overflow: hidden;
            background: var(--bg-muted);
            border: 0;
            padding: 0;
            cursor: pointer;
        }
        .cat-card .shot img {
            width: 100%; height: 100%;
            object-fit: contain;
            object-position: center;
        }
        .cat-card .meta {
            padding: 10px 12px 12px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-height: 86px;
        }
        .cat-card .meta h3 {
            font-size: 13px;
            font-weight: 600;
            line-height: 1.3;
            margin: 0;
        }
        .cat-card .price { font-size: 13px; font-weight: 600; }
        .cat-card .row {
            margin-top: auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .cat-card .add-cart-btn, .cat-card .qty-wrap {
            transform: scale(.9);
            transform-origin: right center;
        }

        .cat-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 10px;
            background: var(--card);
            border: 1px solid var(--line);
            border-radius: 14px;
        }
        .cat-row .shot {
            width: 64px; height: 64px;
            border-radius: 10px;
            overflow: hidden;
            background: var(--bg-muted);
            border: 0; padding: 0;
            flex-shrink: 0;
            cursor: pointer;
        }
        .cat-row .shot img {
            width: 100%; height: 100%;
            object-fit: contain;
            object-position: center;
        }
        .cat-row .info { min-width: 0; flex: 1; }
        .cat-row h3 { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.3; }
        .cat-row .price { font-size: 12px; margin-top: 2px; }
