/* ============================================================
   Nagovss Digital Products - design system
   Fonts: Sora (headings) / Inter (body) - loaded via Google Fonts in header.php
   ============================================================ */

:root {
    --ink: #16182B;
    --ink-soft: #3B3E5C;
    --muted: #6B6E85;
    --border: #E6E5F0;
    --border-soft: #EFEEF7;
    --bg: #F7F7FB;
    --bg-tint: #F1F0FA;
    --surface: #FFFFFF;

    --accent: #4338CA;
    --accent-dark: #362DA3;
    --accent-tint: #EEECFB;
    --gold: #F59E0B;
    --gold-tint: #FEF3E2;

    --success: #157A47;
    --success-bg: #E7F7EE;
    --error: #B3261E;
    --error-bg: #FDECEA;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(22, 24, 43, 0.06);
    --shadow: 0 8px 24px rgba(22, 24, 43, 0.08);
    --shadow-lg: 0 20px 48px rgba(22, 24, 43, 0.14);

    --tab-bar-height: 60px;
    --buy-bar-height: 68px;

    /* Flash sale / offer accents - deliberately louder than the rest of the palette
       above, used only on price/deal/timer elements to create urgency without
       reskinning the whole site. */
    --flash-grad: linear-gradient(120deg, #8B5CF6 0%, #EC4899 55%, #FB923C 100%);
    --flash-pink: #EC4899;
    --flash-pink-tint: #FDF2F8;
    --flash-purple: #8B5CF6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

h1, h2, h3, .logo, .stat-card .num {
    font-family: "Sora", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em;
}

a { color: var(--accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    padding-top: calc(16px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    z-index: 40;
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.site-header .logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.site-header .logo img { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a {
    margin-left: 4px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.site-header nav a:hover { background: var(--bg-tint); color: var(--accent); }

/* ---------- App-style bottom tab bar (mobile only - see media query) ---------- */
.tab-bar {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: stretch;
}
.tab-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    padding: 6px 2px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    min-height: 48px;
    transition: color 0.15s ease, background 0.15s ease;
}
.tab-bar-item svg { width: 22px; height: 22px; }
.tab-bar-item:active { background: var(--bg-tint); }
.tab-bar-item.active { color: var(--accent); }

/* ---------- App-style sticky purchase bar on the product page (mobile only) ---------- */
.mobile-buy-bar {
    display: none;
    position: fixed;
    left: 0; right: 0;
    bottom: var(--tab-bar-height);
    z-index: 45;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(22, 24, 43, 0.08);
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mobile-buy-bar-price { display: block; font-weight: 700; font-size: 16px; }
.mobile-buy-bar-note { display: block; font-size: 12px; color: var(--muted); }
.mobile-buy-bar .btn { padding: 12px 22px; }
.mobile-buy-bar-spacer { display: none; }

/* ---------- App-style sticky "pay" bar on checkout (mobile only) ----------
   Same pattern as .mobile-buy-bar above: without this, a buyer has to scroll
   past the whole order-summary card just to find the submit button, then
   scroll back up if they want to double-check the total - this keeps the
   total and the CTA on screen the entire time they're filling in the form. */
.mobile-checkout-bar {
    display: none;
    position: fixed;
    left: 0; right: 0;
    bottom: var(--tab-bar-height);
    z-index: 45;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(22, 24, 43, 0.08);
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mobile-checkout-bar-total { display: flex; flex-direction: column; line-height: 1.3; flex-shrink: 0; }
.mobile-checkout-bar-total span:first-child { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.mobile-checkout-bar-total span:last-child { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.mobile-checkout-bar .btn { padding: 12px 20px; font-size: 14px; flex-shrink: 0; }
.mobile-checkout-bar-spacer { display: none; }

/* ---------- Horizontally-scrollable wrapper for wide admin tables ---------- */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 32px 0 28px;
    color: var(--muted);
    font-size: 14px;
    background: var(--bg);
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; padding-bottom: 20px; margin-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.site-footer .footer-brand { color: var(--ink); font-weight: 600; }
.site-footer .footer-tagline { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 360px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.site-footer > .wrap > p { margin: 0; font-size: 13px; }

/* ---------- Legal / policy pages ---------- */
.legal-page { max-width: 720px; }
.legal-page .updated { color: var(--muted); font-size: 13px; margin: 4px 0 32px; }
.legal-page h2 { font-size: 19px; margin: 34px 0 10px; }
.legal-page h2:first-of-type { margin-top: 24px; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }

main.wrap { padding-top: 40px; padding-bottom: 60px; min-height: 60vh; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 48px; overflow: hidden; z-index: 0; }
/* Soft blurred colour blobs behind the hero copy - purely decorative, gives the
   top of the page some warmth instead of a flat white background. */
.hero::before, .hero::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.5; pointer-events: none;
}
.hero::before { width: 340px; height: 340px; background: radial-gradient(circle, var(--accent) 0%, transparent 72%); top: -140px; right: -40px; }
.hero::after { width: 300px; height: 300px; background: radial-gradient(circle, var(--flash-pink) 0%, transparent 72%); bottom: -160px; left: 8%; }
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-tint);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.hero h1 { font-size: 42px; line-height: 1.15; margin: 0 0 16px; max-width: 720px; }
.hero p { color: var(--muted); max-width: 620px; font-size: 17px; }

/* ---------- Homepage image slider ---------- */
.hero-slider {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    margin: 8px 0 40px; box-shadow: var(--shadow-lg); background: var(--bg-tint);
    min-height: 380px; /* fallback for browsers without aspect-ratio support */
    aspect-ratio: 20 / 9;
}
.hero-slider-track { position: relative; width: 100%; height: 100%; }
.hero-slide {
    position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr;
    text-decoration: none; color: inherit; opacity: 0; visibility: hidden;
    transition: opacity 0.6s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide-media { position: relative; background: var(--bg-tint); overflow: hidden; }
.hero-slide-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slide-info {
    display: flex; flex-direction: column; justify-content: center; gap: 8px;
    padding: 32px 40px; background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-tint) 130%);
}
.hero-slide-info h2 { font-size: 27px; margin: 4px 0 0; }
.hero-slide-info p { color: var(--muted); font-size: 14px; margin: 0; max-width: 40ch; }
.hero-slide-cta { width: fit-content; margin-top: 6px; }

.hero-slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-sm);
    font-size: 22px; line-height: 1; color: var(--ink); display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}
.hero-slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.hero-slider-arrow.prev { left: 16px; }
.hero-slider-arrow.next { right: 16px; }
.hero-slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 7px; }
.hero-slider-dot {
    width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px;
    background: rgba(255, 255, 255, 0.65); cursor: pointer; transition: width 0.25s ease, background 0.2s ease;
}
.hero-slider-dot.active { width: 24px; background: #fff; }

/* ---------- Trust bar ---------- */
.trust-bar {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    margin: 0 0 52px;
}
.trust-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 10px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
}
.trust-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* ---------- Section heading (above the product grid) ---------- */
.section-heading { text-align: center; margin: 0 0 8px; }
.section-heading h2 { font-size: 26px; margin: 0 0 6px; }
.section-heading .note { font-size: 14.5px; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #C7ECD7; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #F5CBC7; }

/* ---------- Product grid / cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; margin-top: 28px; }
.product-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D8D6EE; }
.product-card .thumb, .thumb-large { position: relative; background: var(--bg-tint); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.badge-flash-corner { position: absolute; top: 10px; left: 10px; z-index: 2; margin-bottom: 0; }
.product-card .thumb img, .thumb-large img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { color: var(--muted); font-size: 14px; font-weight: 500; }
.product-card .content { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.category {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
    font-weight: 700; background: var(--accent-tint); display: inline-block; padding: 3px 9px; border-radius: 999px;
}
.product-card h2 { font-size: 18px; margin: 4px 0 0; }
.product-card p { color: var(--muted); font-size: 14px; margin: 0; }
.price-row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 14px; gap: 10px; }
.price { font-weight: 700; font-size: 16px; }

/* ---------- Offer pricing: MRP strike-through + offer price + discount pill ----------
   Used on the product grid, product detail page, checkout summary, and mobile buy bar. */
.price-cluster { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-mrp { color: var(--muted); text-decoration: line-through; font-weight: 500; font-size: 0.82em; }
.price-gst-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.price-gst-note.note { margin-top: -4px; }
.discount-pill {
    display: inline-flex; align-items: center; gap: 2px;
    background: var(--flash-grad); color: #fff; font-weight: 800; font-size: 11.5px;
    padding: 3px 9px; border-radius: 999px; letter-spacing: 0.01em; white-space: nowrap;
}
/* A gradient-clipped-text price looked striking in testing, but background-clip:text
   silently fails in some rendering engines and leaves the price literally invisible
   (transparent text with no gradient showing through) - too risky for the actual
   price, so this stays a solid, reliably-visible color instead. */
.price-offer-flash { color: var(--flash-pink); }

/* ---------- Flash sale badge + live countdown timer -----------
   The badge/timer combo is intentionally bright and a little playful (gradient,
   soft pulse, an emoji or two) - it's meant to read as a limited-time deal, not
   as part of the site's everyday visual language. */
.badge-flash {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--flash-grad); color: #fff; font-weight: 800; font-size: 12.5px;
    padding: 6px 14px; border-radius: 999px; margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.32);
    animation: flashPulse 1.8s ease-in-out infinite;
}
.badge-flash-mini {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--flash-pink-tint); color: var(--flash-pink); font-weight: 700; font-size: 12px;
    padding: 4px 10px; border-radius: 999px; margin-top: 8px; width: fit-content;
}
.badge-flash-admin {
    display: inline-flex; align-items: center; gap: 4px; background: var(--flash-grad); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 6px;
}
@keyframes flashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(236, 72, 153, 0.32); }
    50% { transform: scale(1.035); box-shadow: 0 9px 22px rgba(236, 72, 153, 0.48); }
}

.price-box-flash { border-color: transparent; background: linear-gradient(180deg, var(--flash-pink-tint), var(--bg)); position: relative; overflow: hidden; }

.flash-timer {
    background: var(--flash-grad);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 14px 0 8px;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.flash-timer-label { font-size: 13px; font-weight: 700; opacity: 0.95; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.flash-timer-clock { display: flex; align-items: center; gap: 5px; font-family: "Sora", sans-serif; }
.flash-timer-unit {
    background: rgba(255, 255, 255, 0.22); border-radius: 8px; padding: 6px 9px; min-width: 40px; text-align: center;
    font-weight: 800; font-size: 18px; line-height: 1;
}
.flash-timer-sep { font-weight: 800; font-size: 18px; opacity: 0.85; }
.flash-human-note { font-size: 13.5px; color: var(--flash-pink); font-weight: 500; margin: 0; }
.countdown-ended .flash-timer-unit { opacity: 0.6; }

.mobile-buy-bar-flash { background: linear-gradient(180deg, var(--flash-pink-tint), var(--surface)); }

/* ---------- Admin: flash sale scheduling box ---------- */
.flash-sale-admin-box {
    border: 1px dashed #E7BFE0;
    background: linear-gradient(135deg, #FDF2FA, #FFF7EE);
    border-radius: var(--radius);
    padding: 16px 18px 4px;
    margin: 4px 0 20px;
}
.flash-sale-admin-box > strong { display: block; margin-bottom: 4px; font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--border);
    color: var(--ink); text-decoration: none; background: var(--surface); cursor: pointer;
    font-size: 14px; font-weight: 600; font-family: inherit; touch-action: manipulation;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.btn:hover { border-color: #C9C7E4; background: var(--bg-tint); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px rgba(67, 56, 202, 0.28); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Product detail + gallery ---------- */
.product-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.product-detail .info h1 { margin-top: 8px; font-size: 30px; }
.price-box { margin: 20px 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.price-box .price { font-size: 26px; display: block; }
.price-box .note { color: var(--muted); font-size: 13px; }
.hosting-note { background: var(--gold-tint); border: 1px solid #F6DFB0; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; margin-bottom: 18px; }

.product-gallery-main { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.product-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery-thumbs img {
    width: 76px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; opacity: 0.75; transition: opacity 0.15s ease, border-color 0.15s ease;
}
.product-gallery-thumbs img:hover, .product-gallery-thumbs img.active { opacity: 1; border-color: var(--accent); }

.gallery-manage { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 18px; }
.gallery-manage-item { text-align: center; font-size: 12px; }
.gallery-manage-item img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; margin-bottom: 4px; }
.gallery-manage-item a { color: var(--error); text-decoration: none; }

/* ---------- Forms ---------- */
form label { display: block; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
form label.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; }
form input[type=text], form input[type=email], form input[type=number], form input[type=url],
form input[type=tel], form input[type=password], form input[type=date], form input[type=file], form textarea, form select {
    display: block; width: 100%; min-height: 44px; padding: 12px 13px; margin-top: 6px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 16px; font-family: inherit; color: var(--ink);
    background: var(--surface); font-weight: 400; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form input:focus, form textarea:focus, form select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}

.checkout .order-summary { display: flex; justify-content: space-between; padding: 16px 18px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 22px; font-weight: 600; }

/* Honeypot spam-trap field (checkout, support, review forms) - moved off-screen
   rather than display:none, since some bots specifically skip hidden inputs. A
   real visitor never sees or can tab to it (tabindex="-1"); anything that fills
   it in is treated as automated. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Checkout ---------- */
.checkout-eyebrow {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase; color: var(--success); margin-bottom: 12px;
}
.checkout-eyebrow svg { width: 14px; height: 14px; flex-shrink: 0; }
.checkout-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.checkout-step { display: flex; align-items: center; gap: 8px; }
.checkout-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-tint); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.checkout-step.active { color: var(--accent); }
.checkout-step.active .checkout-step-num { background: var(--accent); color: #fff; }
.checkout-step.done .checkout-step-num { background: var(--success); color: #fff; }
.checkout-step-sep { color: var(--border); }

.checkout-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }

.checkout-order-card { border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); position: sticky; top: 90px; }
.checkout-order-thumb { position: relative; aspect-ratio: 16/10; min-height: 190px; background: var(--bg-tint); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.checkout-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.checkout-order-chip {
    position: absolute; left: 12px; bottom: 12px; z-index: 2;
    background: rgba(22, 24, 43, 0.78); color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.checkout-order-info { padding: 20px; }
.checkout-order-info h2 { margin: 4px 0 10px; font-size: 19px; }

.checkout-price-rows { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.checkout-price-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--ink-soft); padding: 4px 0; }
.checkout-price-row-discount { color: var(--success); }
.checkout-price-row-subtotal { font-weight: 600; color: var(--ink); padding-top: 6px; border-top: 1px dashed var(--border); }

/* Total due gets its own highlighted box instead of just a line, so it's the
   one number a buyer's eye lands on before they scroll to the payment form. */
.checkout-total-box {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 14px; padding: 14px 16px; background: var(--accent-tint);
    border-radius: var(--radius-sm); font-size: 17.5px; font-weight: 700; color: var(--accent-dark);
}
.checkout-total-box span:last-child { font-variant-numeric: tabular-nums; }

/* GST tax breakdown on checkout - styled like a small official tax-invoice
   excerpt (tinted box, GSTIN in the header, tabular rows) rather than a
   plain muted note, since this is the one moment a customer decides whether
   the business looks legitimate enough to hand a card number to. Sits
   between the discount line and the final Total due row. */
.checkout-tax-breakdown {
    margin: 12px 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); position: relative;
}
.checkout-tax-breakdown::before {
    content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 3px;
    background: var(--flash-grad); border-radius: 0 0 3px 3px; opacity: 0.7;
}
.checkout-tax-breakdown-head {
    display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px;
    font-size: 12.5px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em;
    margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.checkout-gstin { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); text-transform: none; background: var(--surface); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); }
.checkout-tax-breakdown .checkout-price-row { font-size: 13.5px; color: var(--ink-soft); padding: 3px 0; }
.checkout-tax-breakdown .checkout-price-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.checkout-tax-note { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.checkout-form-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; background: var(--surface); box-shadow: var(--shadow); }

/* Small inline icon that sits before a form label's text (Full name, Email, Phone) */
.label-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; color: var(--muted); }

/* Coupon field collapsed behind a plain-language toggle by default - a
   Stripe-style "Add promotion code" link - so the form doesn't lead with a
   field most buyers will leave blank. Opens automatically if a coupon was
   already typed in (e.g. the page reloaded after a validation error). */
.coupon-toggle { margin: -4px 0 18px; }
.coupon-toggle summary {
    cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent);
    list-style: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 0;
}
.coupon-toggle summary::-webkit-details-marker { display: none; }
.coupon-toggle summary::before { content: '+'; font-size: 16px; line-height: 1; width: 10px; display: inline-block; }
.coupon-toggle[open] summary::before { content: '\2212'; }
.coupon-toggle label { margin-top: 10px; margin-bottom: 0; }

.checkout-submit-btn {
    width: 100%; text-align: center; font-size: 15.5px; padding: 15px; letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.checkout-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(67, 56, 202, 0.34); }
.checkout-submit-btn .btn-icon, .mobile-checkout-bar .btn-icon { width: 16px; height: 16px; flex-shrink: 0; }

.checkout-trust-bar { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border-soft); justify-content: space-between; }
/* Flatten the shared .trust-item pill styling just here - a quieter row of
   plain icon+text confirmations reads calmer under a payment form than a
   row of badges, without touching how .trust-item looks on the homepage. */
.checkout-trust-bar .trust-item { background: none; border: none; box-shadow: none; padding: 0; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.checkout-trust-bar .trust-item svg { color: var(--success); }

.checkout-payment-pending { text-align: center; padding: 30px 10px; }
.checkout-payment-pending p { margin: 6px 0; }
.checkout-payment-pending .btn { margin-top: 14px; }
.checkout-spinner {
    display: inline-block; width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--accent-tint); border-top-color: var(--accent);
    animation: spin 0.8s linear infinite; margin-bottom: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success page ---------- */
.success h1 { margin-bottom: 8px; }
.success-banner { display: flex; align-items: flex-start; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--success-bg); border: 1px solid #C7ECD7; margin-bottom: 22px; }
.success-check {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--success); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(21, 122, 71, 0.28);
}
.success-banner p { margin: 4px 0 0; color: var(--ink-soft); }

.success-order-card { display: flex; gap: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 26px; background: var(--surface); box-shadow: var(--shadow-sm); }
.success-order-thumb { width: 96px; height: 72px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-tint); display: flex; align-items: center; justify-content: center; }
.success-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.success-order-meta { flex: 1; min-width: 0; }
.success-order-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--ink-soft); border-bottom: 1px solid var(--border-soft); }
.success-order-row:last-child { border-bottom: none; }
.copyable { display: flex; align-items: center; gap: 8px; }
.copy-btn { border: 1px solid var(--border); background: var(--bg); color: var(--ink-soft); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.copy-btn:hover { background: var(--bg-tint); }

.downloads-heading { font-size: 17px; margin: 26px 0 12px; }
.refer-cta { background: var(--flash-pink-tint); border-color: #F8D6E7; }

/* ---------- Generic "here's what happened" state pages (download errors, etc.) ---------- */
.download-state { display: flex; justify-content: center; padding: 30px 0; }
.state-card { max-width: 440px; text-align: center; padding: 36px 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--surface); }
.state-icon { font-size: 40px; display: block; margin-bottom: 14px; }
.state-card h1 { font-size: 21px; margin-bottom: 10px; }
.state-card p { color: var(--ink-soft); font-size: 14.5px; }
.state-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

.hosting-cta { margin-top: 32px; padding: 24px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }

/* Cookie consent notice - a plain dismiss-once bar, not a full preference
   center, since every cookie this app sets is functional (session, referral
   attribution) rather than third-party ad tracking. Sits above the mobile
   tab bar so it never gets stuck underneath it. */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--ink); box-shadow: 0 -6px 24px rgba(22,24,43,0.18); transition: bottom 0.15s ease; }
.cookie-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 13.5px; color: #fff; line-height: 1.5; max-width: 640px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .btn { flex-shrink: 0; min-height: 38px; padding: 8px 20px; }

.login-wrap { max-width: 400px; margin: 60px auto; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.download-item, .ticket-message { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.note { color: var(--muted); font-size: 13px; }
.rating-stars { color: var(--gold); letter-spacing: 2px; }
.review-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.review-item .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ticket-message { display: block; }
.ticket-message.from-admin { background: var(--bg); }
.ticket-message .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--bg-tint); color: var(--ink-soft); font-weight: 600; }

.reviews-section { margin-top: 60px; border-top: 1px solid var(--border); padding-top: 30px; }
.related-section { margin-top: 60px; border-top: 1px solid var(--border); padding-top: 30px; }
.related-section .product-grid { margin-top: 20px; }

code { background: var(--bg-tint); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ---------- Admin ---------- */
body.admin { background: var(--bg); }
.admin-header { background: var(--ink); border-bottom: none; position: static; backdrop-filter: none; }
.admin-header .logo, .admin-header nav a { color: #fff; }
.admin-header .logo img { border-radius: 8px; }
.admin-header nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th { text-align: left; padding: 12px 14px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg-tint); }
.admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); font-size: 14px; vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0 30px; }
.stat-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card .num { display: block; font-size: 26px; font-weight: 700; }
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-grid-shop { text-align: center; }
.stat-grid-shop .stat-card { text-align: center; }

/* Homepage: category quick-filter pills */
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 18px; }
.category-pill {
    display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
    font-size: 13.5px; font-weight: 600; text-decoration: none; transition: all .15s ease;
}
.category-pill:hover { border-color: var(--accent); color: var(--accent); }
.category-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Homepage: search + sort bar (customer-facing equivalent of .admin-filter-bar) */
.shop-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.shop-filter-bar input[type=text], .shop-filter-bar select { margin: 0; min-height: 40px; padding: 8px 12px; font-size: 14px; width: auto; }
.shop-filter-bar input[type=text] { flex: 1 1 220px; min-width: 160px; }
.shop-filter-bar .btn { min-height: 40px; padding: 8px 18px; }

/* Pagination - shares the admin listing pages' look, aliased here so a class
   name with "admin" in it never has to appear on a customer-facing page. */
.pagination { display: flex; gap: 6px; margin: 18px 0 8px; flex-wrap: wrap; justify-content: center; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); color: var(--ink-soft); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.pagination a:hover { background: var(--bg-tint); }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Product card social proof */
.card-rating-stars { margin: 2px 0 6px; font-size: 13px; }
.card-rating-stars .note { font-size: 12px; }
.sold-badge {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    background: rgba(22, 24, 43, 0.78); color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 999px; letter-spacing: 0.01em;
}

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.testimonial-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.testimonial-text { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; flex-grow: 1; }
.testimonial-meta { color: var(--muted); font-size: 13px; }
.testimonial-meta a { color: var(--accent); }

/* FAQ accordion - plain CSS max-height transition, no JS animation library */
.faq-list { max-width: 760px; margin: 18px auto 8px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq-question {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px; background: none; border: none; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
}
.faq-icon { flex-shrink: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-tint); color: var(--accent); font-size: 16px; line-height: 1; transition: transform .2s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-answer { max-height: 240px; }
.faq-answer p { margin: 0; padding: 0 18px 16px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

/* Revenue trend - a dependency-free CSS bar chart (no Chart.js/canvas), each
   bar's height is just a percentage of the highest day in the 30-day window.
   Hover/tap a bar (title attribute) for the exact date + amount. */
.revenue-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 10px; }
.revenue-bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.revenue-bar { width: 100%; min-height: 2px; background: var(--accent-tint); border-radius: 2px 2px 0 0; transition: background 0.15s ease; }
.revenue-bar-col:hover .revenue-bar { background: var(--accent); }
.revenue-chart-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 4px 12px 0; margin-bottom: 20px; }
.status { padding: 3px 10px; border-radius: 999px; font-size: 12px; text-transform: capitalize; font-weight: 600; }
.status-paid { background: var(--success-bg); color: var(--success); }
.status-pending { background: var(--gold-tint); color: #93690B; }
.status-failed { background: var(--error-bg); color: var(--error); }

/* Small inline forms embedded inside a table cell (e.g. "set this referrer's
   commission rate") - override the default block/full-width form input styling
   so the input + button sit neatly side by side instead of stacking. */
.inline-rate-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.inline-rate-form input[type=number] { display: inline-block; width: 100px; margin-top: 0; min-height: 38px; padding: 7px 10px; }
.inline-rate-form .btn { min-height: 38px; padding: 7px 14px; }

/* Search/filter bar above the Orders and Products admin tables - all the
   controls sit in one row on desktop and wrap/stack cleanly on mobile. */
.admin-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-filter-bar input[type=text], .admin-filter-bar select, .admin-filter-bar input[type=date] { margin: 0; min-height: 38px; padding: 7px 12px; font-size: 13.5px; width: auto; }
.admin-filter-bar input[type=text] { flex: 1 1 220px; min-width: 160px; }
.admin-filter-bar .btn { min-height: 38px; padding: 7px 16px; }
.admin-filter-date { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0; }
.admin-filter-date input { margin: 0 !important; }

.admin-bulk-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.admin-bulk-bar select { margin: 0; min-height: 38px; padding: 7px 12px; font-size: 13.5px; width: auto; }
.admin-bulk-bar .btn { min-height: 38px; padding: 7px 16px; }
.admin-table .col-select { width: 36px; text-align: center; }

.admin-pagination { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.admin-pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); color: var(--ink-soft); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.admin-pagination a:hover { background: var(--bg-tint); }
.admin-pagination a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* One-click Active/Hidden toggle styled to match the existing .status pill,
   but as a real button so it's obviously clickable. */
.status-toggle-btn { border: none; cursor: pointer; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-toggle-btn.status-paid { background: var(--success-bg); color: var(--success); }
.status-toggle-btn.status-failed { background: var(--bg-tint); color: var(--muted); }

/* A <button> made to look like an inline text link, for actions (like
   "Duplicate") that need a POST + CSRF token rather than a plain <a href>. */
.link-btn { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; font-family: inherit; cursor: pointer; }
.link-btn:hover { color: var(--accent-dark); }

/* Order detail page (Admin -> Orders -> click an order number) */
.order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 30px; }
.order-detail-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.order-detail-card h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.order-detail-card form { margin-bottom: 10px; }
.order-detail-card .success-order-row { font-size: 13.5px; }
.order-detail-card code { word-break: break-all; }

/* ============================================================
   Responsive - "app" breakpoint at 768px
   Below 768px: top nav links are replaced by the bottom tab bar,
   content gets edge-to-edge spacing, and buttons/inputs grow to
   comfortable touch-target sizes.
   ============================================================ */
@media (max-width: 768px) {
    .wrap { padding: 0 16px; }

    /* Top header collapses to just the logo - the tab bar below takes over navigation */
    .site-header .wrap { gap: 8px; }
    .site-header .logo { font-size: 16px; }
    .site-header .site-nav { display: none; }

    /* Bottom tab bar + mobile buy bar switch on; leave room for them at the bottom of the page.
       The footer stays visible (it carries the required Privacy/Terms/Refund/Shipping links),
       just gets extra bottom padding so it clears the fixed tab bar once scrolled all the way down. */
    .tab-bar { display: flex; }
    main.wrap { padding-top: 20px; }
    .site-footer { padding-bottom: calc(28px + var(--tab-bar-height) + env(safe-area-inset-bottom)); }
    .footer-top { flex-direction: column; gap: 14px; }

    .hero { padding: 28px 0 32px; }
    .hero .eyebrow { font-size: 12px; padding: 5px 12px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }

    /* Slide stacks image-on-top, info-below instead of side-by-side; taller aspect
       ratio so the info panel has room to breathe on a narrow screen. */
    .hero-slider { aspect-ratio: 3 / 4; min-height: 420px; margin-bottom: 28px; }
    .hero-slide { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .hero-slide-info { padding: 18px 20px; gap: 6px; }
    .hero-slide-info h2 { font-size: 20px; }
    .hero-slide-info p { display: none; } /* keep the mobile card compact */
    .hero-slider-arrow { width: 34px; height: 34px; font-size: 18px; }

    .trust-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; margin-bottom: 36px; -webkit-overflow-scrolling: touch; }
    .trust-item { flex-shrink: 0; }

    .section-heading h2 { font-size: 21px; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 20px; }
    .product-card .content { padding: 12px 14px 14px; gap: 5px; }
    .product-card h2 { font-size: 15px; }
    .product-card p { font-size: 13px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .price-row { padding-top: 10px; }
    .price { font-size: 15px; }

    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-detail .info h1 { font-size: 24px; }
    .product-gallery-thumbs img { width: 62px; height: 46px; }

    /* Checkout: summary card moves above the form instead of sitting beside it,
       and stops being sticky since there's no side-by-side scroll to follow. */
    .checkout-layout { grid-template-columns: 1fr; gap: 18px; }
    .checkout-order-card { position: static; }
    .checkout-order-thumb { aspect-ratio: 21/9; min-height: 150px; }
    .checkout-form-card { padding: 18px; }
    .checkout-steps { font-size: 11.5px; gap: 4px; margin-bottom: 20px; }
    .checkout-step span:not(.checkout-step-num) { white-space: nowrap; }
    .checkout-trust-bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
    .checkout-trust-bar .trust-item { flex-shrink: 0; }

    /* Replace the inline submit button with the fixed bottom bar, same
       swap .buy-btn-inline/.mobile-buy-bar already does on the product page -
       one CTA on screen at a time instead of two competing "pay" buttons. */
    .checkout-submit-btn { display: none; }
    .mobile-checkout-bar { display: flex; }
    .mobile-checkout-bar-spacer { display: block; height: var(--buy-bar-height); }

    /* Success page: banner and order card stack their inner content tighter on narrow screens */
    .success-banner { flex-direction: column; gap: 10px; text-align: left; padding: 18px; }
    .success-order-card { flex-direction: column; }
    .success-order-thumb { width: 100%; height: 140px; }
    .state-card { padding: 28px 18px; }

    /* Replace the inline Buy button with the fixed bottom bar */
    .buy-btn-inline { display: none; }
    .mobile-buy-bar { display: flex; }
    .mobile-buy-bar-spacer { display: block; height: var(--buy-bar-height); }

    /* Stack above the fixed bottom tab bar instead of hiding underneath it */
    .cookie-banner { bottom: var(--tab-bar-height); }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-banner .btn { width: 100%; text-align: center; }

    .login-wrap { margin: 24px auto; padding: 24px 20px; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .num { font-size: 21px; }

    /* Admin: 9 nav links won't fit - let them scroll horizontally like an app's segmented tab strip */
    .admin-header nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .admin-header nav a { white-space: nowrap; }
    .admin-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .admin-toolbar .btn { text-align: center; }

    .admin-filter-bar { flex-direction: column; align-items: stretch; }
    .admin-filter-bar input[type=text], .admin-filter-bar select, .admin-filter-bar .btn, .admin-filter-bar .admin-filter-date { width: 100%; }
    .admin-filter-bar .btn { text-align: center; }
    .order-detail-grid { grid-template-columns: 1fr; }

    /* Admin tables become a stack of cards instead of a horizontally-scrolling
       table - each row is its own card, each cell shows a small label (filled in
       by the script in admin/includes/admin_footer.php) above its value. Reads
       far better on a phone than panning a wide table sideways. */
    .table-scroll { overflow-x: visible; }
    .admin-table { border: none; box-shadow: none; background: transparent; border-radius: 0; }
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr { display: block; width: 100%; }
    .admin-table tr {
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 4px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
    }
    .admin-table td {
        display: block; border: none; border-bottom: 1px dashed var(--border-soft);
        padding: 9px 0; font-size: 14px; text-align: left;
    }
    .admin-table td:last-child { border-bottom: none; }
    .admin-table td::before {
        content: attr(data-label); display: block; font-size: 10.5px; text-transform: uppercase;
        letter-spacing: 0.05em; color: var(--muted); font-weight: 700; margin-bottom: 4px;
    }
    .admin-table td:not([data-label])::before { content: none; margin-bottom: 0; } /* empty-state rows */
}

@media (max-width: 420px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
    .tab-bar-item span { font-size: 10px; }
    .hero h1 { font-size: 25px; }
}

/* Respect the notch / home-indicator area on the bottom bars themselves */
@supports (padding: max(0px)) {
    .tab-bar { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
}
