/* ============================================================
   Adarna — Shopee/Mercari-style marketplace UI
   Orange primary · sans-serif · dense cards · social proof
   ============================================================ */

:root {
    /* Brand */
    --primary: #ee4d2d;       /* Shopee orange */
    --primary-dark: #d73211;
    --primary-soft: #fff4f1;
    --gold: #fbbf24;          /* star yellow */
    --green: #26aa99;         /* free-ship pill */
    --discount: #ee4d2d;

    /* Surface */
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --line: #ececec;
    --line-strong: #d8d8d8;

    /* Ink */
    --fg: #222222;
    --fg-2: #444444;
    --muted: #757575;
    --muted-2: #9e9e9e;

    /* Semantic */
    --success: #1f8a3a;
    --danger:  #ee4d2d;
    --warn:    #f59e0b;
    --info:    #2563eb;

    /* System */
    --radius:    2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow:    0 1px 6px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.10);

    /* Type */
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 14px/1.5 var(--sans);
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; transition: color .12s; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
    font-family: var(--sans);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.25;
    color: var(--fg);
    margin: 0;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ============ Header ============ */
.site-header {
    /* Warm vertical gradient instead of a flat slab — feels less Shopee, more brand. */
    background: linear-gradient(180deg, #f55a36 0%, var(--primary) 65%, #e44621 100%);
    color: #fff;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 12px rgba(207, 60, 30, .18);
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.admin-header {
    background: #1a1a1a; color: #f1f1f1;
    border-bottom: 1px solid #2a2a2a;
    position: sticky; top: 0; z-index: 50;
}
.admin-header a, .admin-header .muted { color: #d4d4d4; }

.header-inner {
    display: flex; align-items: center; gap: 20px;
    min-height: 72px;     /* was 96px — slimmer, more modern */
    padding: 8px 0;
}
.brand {
    color: #fff;
    display: inline-flex; align-items: center; gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}
.brand:hover { color: #fff; opacity: .92; }
.brand-mark-img {
    height: 44px; width: auto; display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.brand-text {
    font-family: 'Pacifico', 'Brush Script MT', cursive;
    font-weight: 400; font-size: 30px;
    letter-spacing: .005em;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0,0,0,.18);
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(0,0,0,.18);
    /* Pull the italic baseline up a hair so it sits visually centered next to the mark. */
    transform: translateY(-1px);
}
.admin-header .brand-mark-img { height: 36px; }
.admin-header .brand-text { font-size: 22px; color: #fff; font-weight: 600; }

/* Global search bar in the orange band ---------------------------------- */
.header-search {
    flex: 1; max-width: 720px;
    display: flex; gap: 6px;
    background: #fff;
    border-radius: 12px;          /* softer rect instead of full pill */
    padding: 4px 4px 4px 4px;
    border: 1px solid rgba(0,0,0,.04);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.6);
    transition: box-shadow .15s ease, transform .12s ease;
}
.header-search:hover { box-shadow: 0 3px 12px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.6); }
.header-search:focus-within {
    box-shadow: 0 0 0 3px rgba(255,255,255,.42), 0 4px 14px rgba(0,0,0,.16);
}
.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 8px 0 10px;
}
.search-field .search-icon {
    width: 18px; height: 18px;
    color: #9ca3af;
    flex-shrink: 0;
}
.header-search:focus-within .search-icon { color: var(--primary, #ee4d2d); }
.header-search input[type=search] {
    flex: 1; min-width: 0;
    border: 0; padding: 9px 0;
    font: inherit; font-size: 14px;
    background: transparent; outline: none;
    color: var(--fg);
}
.header-search input[type=search]::-webkit-search-cancel-button { display: none; }
.header-search input[type=search]::placeholder { color: #9ca3af; }
.search-clear[hidden] { display: none; }
.search-clear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border: 0; padding: 0;
    background: #e5e7eb; color: #4b5563;
    border-radius: 50%; cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.search-clear:hover { background: #d1d5db; color: #111827; }
.search-clear svg { width: 12px; height: 12px; }
.search-submit {
    background: linear-gradient(180deg, #f15a3a 0%, var(--primary) 100%);
    color: #fff;
    border: 0;
    padding: 0 20px;
    font: inherit; font-weight: 600; font-size: 13px;
    letter-spacing: .02em;
    cursor: pointer;
    border-radius: 9px;          /* match the parent's softened rect */
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px;
    flex-shrink: 0;
    transition: filter .15s ease, transform .12s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,.10);
}
.search-submit:hover { filter: brightness(1.06); }
.search-submit:active { transform: translateY(1px); }
.search-submit svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
    .search-submit span { display: none; }
    .search-submit { padding: 0 12px; }
}

.primary-nav {
    display: flex; gap: 20px; flex-wrap: wrap;
}
.primary-nav a {
    color: #fff; font-size: 13px; font-weight: 500;
    opacity: .92;
}
.primary-nav a:hover { color: #fff; opacity: 1; text-decoration: underline; }
.admin .primary-nav a { color: #d4d4d4; }
.admin .primary-nav a:hover { color: #fff; }

.header-actions {
    display: flex; gap: 4px; align-items: center;
    font-size: 13px; color: #fff;
}
/* Generic action links get a hover pill so they read as interactive without
   competing with the Sell CTA. */
.header-actions > a {
    display: inline-flex; align-items: center; gap: 6px;
    color: #fff; opacity: .94;
    padding: 7px 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: background .12s ease, opacity .12s ease;
}
.header-actions > a:hover {
    color: #fff; opacity: 1;
    background: rgba(255,255,255,.14);
}
.header-actions .inline-form .link-btn {
    color: #fff !important; opacity: .94;
    background: transparent; border: 0; cursor: pointer;
    padding: 7px 12px; border-radius: 8px;
    font: inherit; font-weight: 500;
    transition: background .12s ease, opacity .12s ease;
}
.header-actions .inline-form .link-btn:hover { background: rgba(255,255,255,.14); opacity: 1; }

.cart-link {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
    position: relative;
}
.cart-link .badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.20); color: #fff;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px; font-size: 11px; font-weight: 700;
    border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(2px);
}
/* When there's actually something in the cart, draw attention: switch to
   a solid white pill with brand color. */
.cart-link:has(.badge:not(:empty)) .badge:not([data-zero]) { /* placeholder selector — kept for future */ }
.sell-cta {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(180deg, #ffd76b 0%, var(--gold, #f9c44a) 100%);
    color: #2a1a05 !important;
    padding: 8px 14px; border-radius: 9px;
    font-weight: 700; font-size: 13px;
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 2px 6px rgba(212, 130, 0, .35);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    margin-right: 6px;
}
.sell-cta:hover {
    color: #1a0f00 !important;
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 10px rgba(212, 130, 0, .45);
}
.icon { width: 16px; height: 16px; display: inline-block; vertical-align: -2px; }

/* Category sub-nav under the orange header */
.cat-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.cat-bar-inner {
    display: flex; gap: 28px; padding: 12px 16px;
    max-width: 1240px; margin: 0 auto;
    white-space: nowrap;
}
.cat-bar a {
    color: var(--fg-2); font-size: 13px; font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.cat-bar a:hover { color: var(--primary); }
.cat-bar a.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============ Footer ============ */
.site-footer {
    margin-top: 64px; padding: 40px 0 24px;
    border-top: 4px solid var(--primary);
    background: var(--surface);
    color: var(--fg-2); font-size: 13px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding-bottom: 28px;
}
.footer-cols h4 {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--fg); margin-bottom: 14px;
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-cols a { color: var(--fg-2); font-size: 13px; }
.footer-cols a:hover { color: var(--primary); }
.footer-bottom {
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted);
}

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--fg);
    cursor: pointer;
    font: 500 13px/1.4 var(--sans);
    text-decoration: none;
    transition: all .12s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
    background: var(--primary); color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark); border-color: var(--primary-dark); color: #fff;
}
.btn-primary[disabled],
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-ghost {
    background: var(--primary-soft); color: var(--primary);
    border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 12px 28px; font-size: 14px; }
.btn-block { display: block; width: 100%; text-align: center; }
.link-btn {
    background: none; border: none; color: var(--primary);
    cursor: pointer; padding: 0; font: inherit;
}
.link-btn.danger { color: var(--danger); }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: inline; }

/* ============ Flash ============ */
.flash-stack { margin: 12px auto 0; padding: 0 16px; max-width: 1240px; display: grid; gap: 6px; }
.flash {
    padding: 10px 14px; border-radius: var(--radius-md);
    border: 1px solid transparent; font-size: 13px;
}
.flash-success { background: #e7f6ec; border-color: #b9e3c4; color: #1b5e2c; }
.flash-error   { background: #fcebe9; border-color: #f4c1bb; color: #7a1d12; }
.flash-info    { background: #e8f0fa; border-color: #c4d8ee; color: #1f4068; }

/* ============ Hero / Promo banner ============ */
.hero {
    background: linear-gradient(135deg, #ff6b3d 0%, #ee4d2d 100%);
    color: #fff;
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
    display: grid; grid-template-columns: 1.4fr 1fr;
    gap: 32px; align-items: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(255,255,255,.18) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.10) 0%, transparent 40%);
    pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero .crumb {
    color: rgba(255,255,255,.85); font-size: 11px;
    text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
    margin-bottom: 14px;
}
.hero h1 {
    font-size: clamp(28px, 4.5vw, 44px);
    line-height: 1.05; letter-spacing: -.02em;
    margin: 0 0 14px; color: #fff;
}
.hero h1 .accent {
    color: #fff;
    position: relative;
    white-space: nowrap;
}
.hero h1 .accent::after {
    content: ""; position: absolute;
    left: 0; right: 0; bottom: 4px; height: 8px;
    background: rgba(255,255,255,.25); border-radius: 2px;
    z-index: -1;
}
.hero p {
    color: rgba(255,255,255,.92); margin: 0 0 22px;
    font-size: 15px; line-height: 1.55; max-width: 480px;
}
.hero .btn-primary {
    background: #fff; color: var(--primary); border-color: #fff;
}
.hero .btn-primary:hover {
    background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary-soft);
}
.hero-badge {
    display: flex; justify-content: center; align-items: center;
    position: relative; z-index: 1;
}
.badge-circle {
    width: 220px; height: 220px; border-radius: 50%;
    background: #fff; color: var(--primary);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0,0,0,.20),
                inset 0 0 0 6px var(--gold-soft, #fff4e1),
                inset 0 0 0 8px #fff;
    font-weight: 600;
    position: relative;
    transform: rotate(-4deg);
}
.badge-circle::before {
    content: "✦"; position: absolute; top: 28px;
    font-size: 18px; color: var(--gold);
}
.badge-circle strong {
    font-size: 32px; font-weight: 800; letter-spacing: -.02em;
    color: var(--primary);
    line-height: 1;
}
.badge-circle .sub {
    margin-top: 4px; font-size: 14px; font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase; letter-spacing: .08em;
}
.badge-circle .price-line {
    margin-top: 8px;
    padding-top: 8px; border-top: 1px solid var(--line);
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 500;
}

/* ============ Sections ============ */
.section { margin-top: 32px; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface);
    padding: 16px 20px;
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
    border-radius: var(--radius-md);
}
.section-head h2 {
    margin: 0; font-size: 18px; color: var(--primary);
    text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.link {
    color: var(--primary); font-size: 12px;
    font-weight: 500;
}

/* ============ Product grid + card (Shopee/Mercari) ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 8px;
}
.product-card {
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: all .15s;
    position: relative;
}
.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.product-card-link {
    color: var(--fg); text-decoration: none; display: block; padding: 0;
}
.product-card-link:hover { color: var(--fg); }

.product-thumb {
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .25s;
}
.product-card:hover .product-thumb img { transform: scale(1.04); }

/* Discount badge (top-left) */
.discount-badge {
    position: absolute; top: 0; left: 0;
    background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 7px;
    border-radius: 0 0 var(--radius-md) 0;
    z-index: 2;
    letter-spacing: -.01em;
}
/* Condition pill (top-right) */
.condition-pill {
    position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,.65); color: #fff;
    font-size: 10px; font-weight: 600;
    padding: 2px 7px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .04em;
    z-index: 2;
}
.condition-pill.like_new { background: rgba(38,170,153,.92); }
.condition-pill.good     { background: rgba(245,158,11,.92); }
.condition-pill.fair     { background: rgba(0,0,0,.70); }
.condition-pill.new      { background: var(--primary); }

.thumb-placeholder {
    font-size: 56px; color: var(--muted-2); font-weight: 700;
    width: 100%; height: 100%; display: flex;
    align-items: center; justify-content: center;
}
.thumb-placeholder.lg { font-size: 96px; }

/* Card body */
.product-card-body { padding: 10px 12px 12px; }
.product-card h3 {
    font-family: var(--sans);
    font-size: 13px; font-weight: 400;
    line-height: 1.35; color: var(--fg);
    margin: 0 0 6px; min-height: 36px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.price-row {
    display: flex; align-items: baseline; gap: 6px;
    flex-wrap: wrap;
}
.product-card .price {
    color: var(--primary); font-weight: 600;
    font-size: 17px; letter-spacing: -.01em;
}
.product-card .original-price {
    color: var(--muted); font-size: 12px; text-decoration: line-through;
}
.free-ship-pill {
    display: inline-block;
    background: rgba(38,170,153,.10);
    color: var(--green);
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: var(--radius);
    margin-top: 6px;
    text-transform: uppercase; letter-spacing: .04em;
}
.seller-row {
    margin-top: 6px; font-size: 11px;
    display: flex; align-items: center; gap: 4px;
    color: var(--muted);
}
.seller-row::before {
    content: ""; width: 4px; height: 4px; border-radius: 50%;
    background: var(--primary); display: inline-block; flex: none;
}
.seller-name {
    color: var(--fg-2); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; font-size: 11px; color: var(--muted);
}
.meta-row .rating {
    display: inline-flex; align-items: center; gap: 3px;
    color: var(--muted);
}
.meta-row .rating .stars { color: var(--gold); letter-spacing: -.5px; }
.meta-row .location {
    display: inline-flex; align-items: center; gap: 2px;
    color: var(--muted);
}

.add-to-cart { padding: 0 12px 12px; }
.add-to-cart .btn {
    font-size: 11px; padding: 8px 10px;
    letter-spacing: .04em; text-transform: uppercase;
}
.card-cta {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 6px;
}
.card-cta .btn-cart {
    background: #fff;
    color: var(--primary, #ee4d2d);
    border: 1px solid var(--primary, #ee4d2d);
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    text-transform: none; letter-spacing: 0;
    border-radius: var(--radius);
    cursor: pointer;
}
.card-cta .btn-cart:hover {
    background: #fff5f0;
}
.card-cta .btn-cart .icon { width: 16px; height: 16px; }
.card-cta .btn-buy { padding: 8px 6px; }

/* ============ Shop layout ============ */
.shop-layout {
    display: grid; grid-template-columns: 220px 1fr; gap: 16px;
    margin-top: 16px;
}
.shop-sidebar {
    background: var(--surface);
    padding: 16px 14px;
    border-radius: var(--radius-md);
    align-self: start;
}
.shop-sidebar h3 {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 600;
    margin: 0 0 10px;
    padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.cat-list { list-style: none; padding: 0; margin: 0 0 20px; }
.cat-list li { margin-bottom: 1px; }
.cat-list a {
    display: block; padding: 7px 10px; border-radius: var(--radius);
    color: var(--fg-2); font-size: 13px;
    transition: all .12s;
}
.cat-list a:hover { color: var(--primary); }
.cat-list a.is-active {
    color: var(--primary); font-weight: 600;
}
.search-form { display: flex; flex-direction: column; gap: 8px; }
.search-form input {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface); font: inherit; font-size: 13px;
    transition: border-color .12s;
}
.search-form input:focus {
    outline: none; border-color: var(--primary);
}
.search-form .btn { width: 100%; }

.shop-main h1 {
    font-size: 22px; margin: 0 0 16px;
    color: var(--fg); font-weight: 600;
}

/* ============ Product detail ============ */
.product-detail {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
    margin-top: 16px;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
}
.product-detail-image {
    background: var(--surface-2);
    border-radius: var(--radius-md); aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info h1 {
    margin: 12px 0 14px; font-size: 22px;
    line-height: 1.3; font-weight: 500;
}
.price-lg-wrap {
    background: var(--surface-2);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.price-lg {
    font-size: 32px; color: var(--primary);
    font-weight: 600; letter-spacing: -.02em;
}
.price-lg-original {
    color: var(--muted); font-size: 14px;
    text-decoration: line-through; margin-left: 10px;
}
.price-lg-discount {
    background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 7px; border-radius: var(--radius);
    margin-left: 8px; letter-spacing: -.01em;
}
.crumb {
    color: var(--muted); margin: 0 0 8px;
    font-size: 12px; font-weight: 500;
}
.detail-meta {
    display: flex; gap: 24px; align-items: center;
    margin: 12px 0 18px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.detail-meta .rating { color: var(--gold); }
.detail-meta .muted { color: var(--muted); }
.stock {
    font-size: 12px; margin: 12px 0 16px;
    font-weight: 500;
}
.stock.in  { color: var(--success); }
.stock.out { color: var(--danger); }
.desc { color: var(--fg-2); line-height: 1.7; font-size: 14px; }
.add-to-cart-full {
    display: flex; align-items: end; gap: 12px; margin-top: 20px;
}
.add-to-cart-full input[type=number] {
    width: 72px; padding: 10px;
    border-radius: var(--radius-md); border: 1px solid var(--line);
    background: var(--surface); font: inherit;
}

/* Sold-by seller card on product detail (Shopee-style) */
.seller-card {
    display: flex; align-items: center; gap: 14px;
    margin-top: 24px; padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
}
.seller-avatar {
    flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px;
    letter-spacing: -.02em;
}
.seller-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seller-meta strong {
    font-size: 14px; font-weight: 600; color: var(--fg);
    line-height: 1.2;
}
.seller-meta .muted { font-size: 12px; }
.btn-sm { padding: 6px 14px; font-size: 11px; }

/* ============ Not-in-city ============ */
.not-in-city {
    max-width: 640px; margin: 40px auto; padding: 32px;
    background: var(--surface); border-radius: var(--radius-md);
    text-align: left;
}
.not-in-city h1 { margin: 0 0 12px; font-size: 22px; }

/* ============ Auth (Login / Register) ============ */
.auth-layout {
    display: grid; grid-template-columns: 1fr 460px; gap: 32px;
    max-width: 1080px; margin: 32px auto;
    align-items: start;
}
.auth-pitch {
    background: linear-gradient(135deg, #ff6b3d 0%, #ee4d2d 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    position: relative; overflow: hidden;
    min-height: 380px;
}
.auth-pitch::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(255,255,255,.18) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.10) 0%, transparent 45%);
    pointer-events: none;
}
.auth-pitch h1 {
    color: #fff; font-size: 32px; line-height: 1.1;
    letter-spacing: -.02em; margin-bottom: 14px;
    position: relative; z-index: 1;
}
.auth-pitch .lead {
    color: rgba(255,255,255,.92); font-size: 15px;
    line-height: 1.55; margin: 0 0 28px;
    position: relative; z-index: 1;
}
.auth-list {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: 12px;
    position: relative; z-index: 1;
}
.auth-list li {
    display: flex; gap: 12px; align-items: center;
    font-size: 14px; color: #fff;
    background: rgba(255,255,255,.12);
    padding: 10px 14px; border-radius: var(--radius-md);
}
.auth-list li span { font-size: 18px; line-height: 1; }
.auth-card {
    background: var(--surface);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.auth-card h2 {
    font-size: 24px; margin-bottom: 20px;
    color: var(--fg);
}
.auth-form { display: grid; gap: 16px; }
.auth-form textarea {
    display: block; width: 100%;
    padding: 10px 12px; margin-top: 4px;
    font: 14px var(--sans);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    resize: vertical;
}
.auth-form textarea:focus { outline: none; border-color: var(--primary); }

/* Contact layout — reuses auth-layout shell but with channel list */
.contact-layout { /* same as auth-layout */
    display: grid; grid-template-columns: 1fr 460px; gap: 32px;
    max-width: 1080px; margin: 32px auto;
    align-items: start;
}
.contact-pitch {
    background: linear-gradient(135deg, #ff6b3d 0%, #ee4d2d 100%);
    color: #fff; border-radius: var(--radius-lg);
    padding: 48px 40px; min-height: 380px;
    position: relative; overflow: hidden;
}
.contact-pitch::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(255,255,255,.18) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.10) 0%, transparent 45%);
    pointer-events: none;
}
.contact-pitch h1 {
    color: #fff; font-size: 32px; line-height: 1.1;
    letter-spacing: -.02em; margin-bottom: 14px;
    position: relative; z-index: 1;
}
.contact-pitch .lead {
    color: rgba(255,255,255,.92); font-size: 15px;
    line-height: 1.55; margin: 0 0 28px;
    position: relative; z-index: 1;
}
.contact-channels {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: 14px;
    position: relative; z-index: 1;
}
.contact-channels li {
    display: flex; gap: 14px; align-items: center;
    background: rgba(255,255,255,.12);
    padding: 14px 16px; border-radius: var(--radius-md);
}
.contact-channels .ico { font-size: 22px; line-height: 1; }
.contact-channels strong {
    display: block; color: #fff; font-weight: 600;
    font-size: 14px; margin-bottom: 2px;
}
.contact-channels a { color: #fff; text-decoration: underline; font-size: 13px; }
.contact-channels .muted { color: rgba(255,255,255,.78); font-size: 13px; }
.contact-card {
    background: var(--surface);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.contact-card h2 {
    font-size: 24px; margin-bottom: 20px;
    color: var(--fg);
}

/* ============ Listing form (/sell) ============ */
.sell-page { max-width: 1180px; margin: 24px auto 64px; padding: 0 16px; }

/* Hero band */
.sell-hero {
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(238,77,45,.10) 0%, transparent 55%),
        linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
}
.sell-hero-text h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: "opsz" 144;
    font-size: 38px;
    letter-spacing: -.01em;
    margin: 0 0 6px;
    color: #fff;
}
.sell-hero-text p { color: rgba(255,255,255,.78); margin: 0; font-size: 15px; line-height: 1.5; max-width: 460px; }
.sell-hero-perks {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 14px;
}
.sell-hero-perks li {
    display: flex; align-items: flex-start; gap: 10px;
    color: rgba(255,255,255,.92);
    font-size: 13px; line-height: 1.4;
}
.sell-hero-perks li svg { color: var(--primary); flex: none; margin-top: 2px; }
.sell-hero-perks strong { color: #fff; font-size: 14px; font-weight: 600; }

/* Two-column form layout */
.sell-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}
.sell-form { min-width: 0; }

/* Right rail */
.sell-rail {
    position: sticky; top: 96px;
    display: flex; flex-direction: column; gap: 16px;
}
.sell-preview-wrap {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}
.sell-rail-label {
    font-size: 11px; color: var(--muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    margin: 0 4px 10px;
}
.sell-preview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}
.sell-preview-card .product-thumb img {
    background: #fff; object-fit: contain; padding: 8px;
}
.sell-preview-card .product-card-body { padding: 12px; }
.sell-preview-card h3 { font-size: 13px; }

.sell-tips {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
}
.sell-tips h3 {
    font-size: 14px; font-weight: 700; margin: 0 0 10px;
    letter-spacing: -.005em;
}
.sell-tips ul { margin: 0; padding-left: 18px; }
.sell-tips li { font-size: 13px; line-height: 1.5; color: var(--fg-2); margin-bottom: 6px; }
.sell-tips li:last-child { margin-bottom: 0; }
.sell-tips strong { color: var(--fg); }

@media (max-width: 980px) {
    .sell-hero { grid-template-columns: 1fr; padding: 28px 24px 22px; }
    .sell-hero-text h1 { font-size: 30px; }
    .sell-hero-perks { grid-template-columns: 1fr; gap: 10px; }
    .sell-layout { grid-template-columns: 1fr; }
    .sell-rail { position: static; flex-direction: column; }
}

/* Legacy form-head kept for any other view that still uses it */
.listing-form { max-width: 720px; margin: 24px auto; }
.listing-form-head { padding: 0 4px 16px; }
.listing-form-head h1 { font-size: 28px; margin-bottom: 6px; }
.listing-form-head .muted { font-size: 14px; }

.listing-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.listing-section > header {
    display: flex; gap: 14px; align-items: flex-start;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.listing-section h2 {
    font-size: 17px; margin: 0 0 2px;
    color: var(--fg); font-weight: 600;
}
.listing-section header .muted { font-size: 13px; margin: 0; }
.step-no {
    flex: none;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.step-no.ai {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    font-size: 16px;
}

/* AI Quick Start (top of /sell) */
.ai-quickstart {
    background:
        radial-gradient(circle at 100% 0%, rgba(168,85,247,.06) 0, transparent 55%),
        var(--surface);
    border: 1px solid rgba(99, 102, 241, .15);
}
.ai-quickstart h2 .small { font-size: 12px; font-weight: 500; }
.ai-quickstart-row {
    display: flex; gap: 10px;
}
.ai-quickstart-row input[type=url] {
    flex: 1; min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    font: inherit; font-size: 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-quickstart-row input[type=url]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.ai-quickstart-row .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    border-color: transparent;
    color: #fff;
    white-space: nowrap;
    transition: filter .15s ease, transform .15s ease;
}
.ai-quickstart-row .btn:hover { filter: brightness(1.06); border-color: transparent; color: #fff; }
.ai-quickstart-row .btn:disabled {
    background: var(--line-strong);
    color: #fff;
    cursor: wait;
    filter: none;
}
.ai-status {
    margin: 12px 0 0;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    line-height: 1.45;
}
.ai-status.loading {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.ai-status.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.ai-status.err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
@media (max-width: 600px) {
    .ai-quickstart-row { flex-direction: column; }
    .ai-quickstart-row .btn { justify-content: center; }
}

/* Photo dropzone */
.dropzone {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 220px;
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    cursor: pointer; position: relative;
    transition: all .15s;
    overflow: hidden;
}
.dropzone:hover, .dropzone.is-dragging {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.dropzone-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--muted); text-align: center; padding: 32px;
}
.dropzone-empty svg {
    width: 40px; height: 40px; color: var(--muted-2);
}
.dropzone-empty strong { color: var(--fg); font-size: 15px; }
.dropzone-empty span { font-size: 13px; }
.dropzone img {
    width: 100%; max-height: 360px; object-fit: contain;
    background: #fff;
}
#photoRemove {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,.65); color: #fff;
    border: 0; padding: 6px 12px; border-radius: var(--radius);
    cursor: pointer; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
}
#photoRemove:hover { background: rgba(0,0,0,.85); }

/* Inline form fields */
.field {
    display: block; margin-bottom: 18px;
}
.field:last-child { margin-bottom: 0; }
.field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 13px; font-weight: 600; color: var(--fg);
    margin-bottom: 6px;
    letter-spacing: 0;
}
.field-label .muted { font-weight: 400; font-size: 12px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
    display: block; width: 100%;
    padding: 11px 14px; margin: 0;
    font: 14px var(--sans);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(238,77,45,.10);
}
.field textarea { resize: vertical; min-height: 100px; }

/* Condition cards (radio group) */
.condition-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.condition-card {
    display: block; cursor: pointer; position: relative;
}
.condition-card input { position: absolute; opacity: 0; pointer-events: none; }
.condition-card > span {
    display: block;
    padding: 14px 16px;
    border: 1.5px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    transition: all .12s;
}
.condition-card strong {
    display: block; font-size: 13px; font-weight: 600; color: var(--fg);
    margin-bottom: 2px;
}
.condition-card small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.condition-card:hover > span { border-color: var(--line-strong); }
.condition-card input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 2px rgba(238,77,45,.12);
}

/* Price row with currency-prefix inputs + live discount preview */
.price-row-form {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; align-items: end;
    position: relative;
}
.price-input {
    display: flex; align-items: center; gap: 0;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    transition: border-color .12s, box-shadow .12s;
}
.price-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(238,77,45,.10);
}
.price-input span {
    padding: 11px 12px;
    background: var(--surface-2);
    color: var(--muted); font-weight: 600; font-size: 14px;
    border-right: 1px solid var(--line);
}
.price-input input {
    flex: 1; padding: 11px 14px;
    border: 0; background: transparent; font: 14px var(--sans);
}
.price-input input:focus { outline: none; }
.discount-preview {
    grid-column: 1 / -1;
    padding: 10px 14px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    font-size: 13px; color: var(--fg-2);
    display: flex; align-items: center; justify-content: space-between;
}
.discount-preview strong {
    color: var(--primary); font-weight: 700; font-size: 15px;
}

/* Submit footer */
.listing-submit {
    display: flex; justify-content: space-between; align-items: center;
    gap: 18px; flex-wrap: wrap;
    background: var(--surface);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}
.listing-submit .muted { margin: 0; flex: 1; max-width: 400px; }
.listing-submit .small { font-size: 12px; line-height: 1.5; }

@media (max-width: 800px) {
    .auth-layout, .contact-layout { grid-template-columns: 1fr; }
    .listing-form { margin: 16px 12px; }
    .listing-section { padding: 20px; }
    .listing-section > header { gap: 10px; }
    .listing-submit { flex-direction: column; align-items: stretch; padding: 18px; }
    .listing-submit .btn { width: 100%; }
    .price-row-form { grid-template-columns: 1fr; }
    .condition-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ Cart / Checkout / Forms ============ */
.data-table {
    width: 100%; border-collapse: collapse; background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.data-table th, .data-table td {
    text-align: left; padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.data-table th {
    background: var(--surface-2); font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    font-size: 11px; color: var(--muted);
}
.ta-right { text-align: right; }

/* ---------- Cart page (revamped) ---------- */
.cart-page { max-width: 1180px; margin: 24px auto 64px; padding: 0 16px; }
.cart-head {
    display: flex; align-items: baseline; gap: 16px;
    margin: 8px 0 20px;
}
.cart-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600; font-size: 34px;
    font-variation-settings: "opsz" 144;
    letter-spacing: -.01em;
    margin: 0;
}
.cart-count { color: var(--muted); font-size: 14px; }

/* Empty state — hero + discovery grid below */
.cart-empty {
    background:
        radial-gradient(120% 80% at 50% 0%, var(--primary-soft) 0%, transparent 60%),
        var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 56px 24px 48px;
    text-align: center;
    overflow: hidden;
    position: relative;
}
.cart-empty-hero {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    max-width: 520px; margin: 0 auto;
}
.cart-empty-art {
    color: var(--primary);
    background: #fff;
    width: 156px; height: 156px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    box-shadow: 0 12px 32px rgba(238,77,45,.16), inset 0 0 0 1px var(--primary-soft);
    margin-bottom: 6px;
}
.cart-empty-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: "opsz" 144;
    font-size: 28px;
    margin: 8px 0 0;
    letter-spacing: -.01em;
}
.cart-empty-sub { color: var(--muted); margin: 4px 0 16px; font-size: 15px; line-height: 1.5; }
.cart-empty-cta { padding: 12px 28px; font-weight: 600; font-size: 15px; }

/* Discovery section below empty cart */
.cart-discover { margin-top: 32px; }
.cart-discover-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin: 0 4px 18px;
}
.cart-discover-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: "opsz" 144;
    font-size: 22px;
    margin: 0;
    letter-spacing: -.005em;
}
.cart-discover-sub { color: var(--muted); margin: 0; font-size: 14px; }
.cart-discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
@media (max-width: 640px) {
    .cart-empty { padding: 40px 18px 32px; }
    .cart-empty-art { width: 132px; height: 132px; }
    .cart-empty-title { font-size: 24px; }
    .cart-discover-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Two-column grid */
.cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

/* Items list */
.cart-items {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 110px 130px 110px 36px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item--unavailable { opacity: .65; }

.cart-item-thumb {
    width: 88px; height: 88px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: block;
    flex: none;
}
.cart-item-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .25s ease;
}
.cart-item-thumb:hover img { transform: scale(1.04); }

.cart-item-body { min-width: 0; }
.cart-item-name {
    color: var(--fg);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-name:hover { color: var(--primary); }
.cart-item-meta { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.cart-item-stock { color: var(--warn); font-size: 12px; font-weight: 500; }

.cart-item-price { text-align: right; }
.cart-item-unit { font-size: 15px; color: var(--fg-2); }

.cart-item-total {
    text-align: right;
    font-size: 16px; font-weight: 700; color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.cart-item-remove {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent;
    color: var(--muted-2);
    border-radius: 999px;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.cart-item-remove:hover {
    color: var(--primary); border-color: var(--primary);
    background: var(--primary-soft);
}

/* Qty stepper */
.qty-stepper {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
    height: 36px;
}
.qty-btn {
    width: 32px; height: 100%;
    background: transparent; border: 0;
    font-size: 18px; color: var(--fg-2);
    cursor: pointer;
    transition: background .12s, color .12s;
}
.qty-btn:hover { background: var(--primary-soft); color: var(--primary); }
.qty-input {
    width: 44px; height: 100%; border: 0; background: transparent;
    text-align: center;
    font: 600 14px/1 var(--sans);
    color: var(--fg);
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; background: var(--primary-soft); }

/* Order summary sidebar */
.cart-summary {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    position: sticky; top: 88px;
}
.cart-summary-title {
    margin: 0 0 14px;
    font-size: 16px; font-weight: 700;
    letter-spacing: -.005em;
}
.cart-summary-rows { margin: 0 0 14px; padding: 0; }
.cart-summary-row {
    display: flex; justify-content: space-between;
    padding: 6px 0;
    font-size: 14px; color: var(--fg-2);
}
.cart-summary-row dt, .cart-summary-row dd { margin: 0; }
.cart-summary-row dd { font-variant-numeric: tabular-nums; }
.cart-summary-row .muted { color: var(--muted); font-size: 13px; }

.cart-summary-total {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 14px 0;
    margin: 4px 0 16px;
    border-top: 1px dashed var(--line-strong);
    border-bottom: 1px dashed var(--line-strong);
    font-size: 14px;
}
.cart-summary-total strong {
    font-size: 22px; color: var(--primary); font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.btn-block { display: block; width: 100%; text-align: center; }
.cart-checkout-btn {
    padding: 13px 0;
    font-size: 15px; font-weight: 600;
    letter-spacing: .01em;
    margin-bottom: 8px;
}
.cart-summary .btn-ghost {
    background: transparent; color: var(--fg-2);
    border: 1px solid var(--line-strong);
    padding: 10px 0;
}
.cart-summary .btn-ghost:hover { background: var(--surface-2); color: var(--fg); }

.cart-summary-note {
    margin: 16px 0 0; padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 12px; color: var(--muted);
    display: flex; align-items: flex-start; gap: 8px;
    line-height: 1.45;
}
.cart-summary-note svg { color: var(--green); flex: none; margin-top: 1px; }

/* ---------- Geo first-visit modal ---------- */
.no-scroll { overflow: hidden; }
.geo-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: geoFadeIn .18s ease-out;
}
.geo-modal[hidden] { display: none; }
.geo-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(2px);
}
.geo-modal-card {
    position: relative;
    background: var(--surface);
    border-radius: 14px;
    padding: 28px 26px 24px;
    width: 100%; max-width: 380px;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    display: flex; flex-direction: column;
    animation: geoSlideUp .22s cubic-bezier(.2,.8,.2,1);
}
.geo-modal-x {
    position: absolute; top: 12px; right: 12px;
    width: 30px; height: 30px;
    border: 0; background: transparent;
    color: var(--muted); font-size: 24px; line-height: 1;
    cursor: pointer; border-radius: 50%;
}
.geo-modal-x:hover { background: var(--surface-2); color: var(--fg); }
.geo-modal-art {
    color: var(--primary);
    background: var(--primary-soft);
    width: 76px; height: 76px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 4px auto 14px;
}
.geo-modal h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-variation-settings: "opsz" 144;
    font-size: 22px;
    text-align: center;
    margin: 0 0 4px;
    letter-spacing: -.005em;
}
.geo-modal-sub {
    color: var(--muted); font-size: 14px;
    text-align: center;
    margin: 0 0 18px;
    line-height: 1.45;
}
.geo-modal .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 0;
    font-size: 15px; font-weight: 600;
}
.geo-modal-or {
    display: flex; align-items: center; gap: 10px;
    color: var(--muted-2);
    font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
    margin: 14px 0 10px;
}
.geo-modal-or::before, .geo-modal-or::after {
    content: ""; flex: 1; height: 1px; background: var(--line);
}
.geo-modal select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    font: 14px var(--sans);
}
.geo-modal select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(238,77,45,.12);
}

/* Filterable combobox inside the modal */
.geo-combo { position: relative; }
.geo-combo input {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    font: 14px var(--sans);
    box-sizing: border-box;
}
.geo-combo input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(238,77,45,.12);
}
.geo-combo-caret {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted-2); pointer-events: none;
}
.geo-combo-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 220px; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none; margin: 0; padding: 4px;
    z-index: 10;
}
.geo-combo-list li {
    padding: 9px 12px;
    font-size: 14px; color: var(--fg);
    border-radius: 4px;
    cursor: pointer;
}
.geo-combo-list li:hover,
.geo-combo-list li.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
.geo-combo-list:not([hidden]):empty::before {
    content: "No matches"; display: block;
    padding: 12px; color: var(--muted); font-size: 13px; text-align: center;
}
.geo-modal-skip {
    margin-top: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    padding: 8px 0;
}
.geo-modal-skip:hover { color: var(--fg); background: transparent; }
@keyframes geoFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes geoSlideUp { from { transform: translateY(12px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

/* Generic badge (used for "Out of stock") */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px; font-weight: 600;
    letter-spacing: .02em;
}
.badge--warn { background: #fff4e5; color: #b86b00; }

/* Tablet/Mobile */
@media (max-width: 980px) {
    .cart-grid { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 720px) {
    .cart-title { font-size: 28px; }
    .cart-item {
        grid-template-columns: 72px 1fr 28px;
        grid-template-areas:
            "thumb body  remove"
            "thumb price price"
            "thumb qty   total";
        row-gap: 8px;
        padding: 14px;
    }
    .cart-item-thumb { width: 72px; height: 72px; grid-area: thumb; }
    .cart-item-body  { grid-area: body; }
    .cart-item-price { grid-area: price; text-align: left; }
    .cart-item-qty   { grid-area: qty;   justify-self: start; }
    .cart-item-total { grid-area: total; }
    .cart-item-remove { grid-area: remove; align-self: start; }
}

.form-narrow, .form-wide {
    max-width: 480px; margin: 32px auto;
    background: var(--surface); padding: 32px;
    border-radius: var(--radius-md);
    display: grid; gap: 14px;
}
.form-wide { max-width: 760px; }
label {
    display: block; font-weight: 500; color: var(--fg-2);
    font-size: 12px; letter-spacing: .02em;
}
label input, label select, label textarea, .stock-form input[type=number] {
    display: block; width: 100%;
    padding: 10px 12px; margin-top: 4px;
    font: 14px var(--sans);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color .12s;
}
label input:focus, label select:focus, label textarea:focus {
    outline: none; border-color: var(--primary);
}
label.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; }
label.checkbox input { width: auto; margin: 0; }
.err { color: var(--danger); font-size: 12px; margin-top: 3px; display: block; }
.form-hint { font-size: 12px; color: var(--muted); text-align: center; }
.form-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px;
}

.grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.grid-2 .span-2 { grid-column: 1 / -1; }

/* ============ Checkout ============ */
.checkout {
    display: grid; gap: 16px; margin-top: 16px; max-width: 880px;
}
.card {
    background: var(--surface);
    border-radius: var(--radius-md); padding: 24px;
}
.card h2 {
    margin: 0 0 16px; font-size: 17px;
    color: var(--primary);
    text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.card h3 {
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 600; margin: 18px 0 6px;
}
.radio-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 4px; border-bottom: 1px solid var(--line);
    font-weight: 400;
}
.radio-row:last-child { border-bottom: none; }
.radio-row.disabled { opacity: .55; }
.radio-row input { margin-top: 4px; }
.window-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.window-option {
    border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 12px 14px; cursor: pointer; display: flex; gap: 10px;
    align-items: center; font-weight: 400;
    transition: all .12s;
}
.window-option:hover { border-color: var(--primary); }
.window-option:has(input:checked) {
    border-color: var(--primary); background: var(--primary-soft);
}
.window-label { display: flex; flex-direction: column; }
.window-label strong { font-weight: 600; }
.muted { color: var(--muted); }
.summary table { margin-top: 4px; }
.banner-success {
    background: #e7f6ec; border: 1px solid #b9e3c4;
    padding: 18px 20px; border-radius: var(--radius-md); margin-bottom: 18px;
}
.banner-success h2 { margin: 0 0 4px; color: #1b5e2c; text-transform: none; letter-spacing: 0; }
.banner-success p { margin: 0; color: #1b5e2c; }
.banner-warn {
    background: #fdf6e3; border: 1px solid #e8cf8a;
    color: #5a4400; padding: 14px 16px;
    border-radius: var(--radius-md); margin-bottom: 14px;
}
.banner-warn p { margin: 4px 0 0; font-size: 13px; }

/* ============ Status pills ============ */
.status {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em;
}
.status-received          { background: #e8f0fa; color: #1f4068; }
.status-preparing         { background: #fdf6e3; color: #5a4400; }
.status-out_for_delivery  { background: #ffeed9; color: #6e3a0e; }
.status-delivered         { background: #e7f6ec; color: #1b5e2c; }
.status-cancelled         { background: #efefef; color: #5a544a; }
.status-payment-pending   { background: #fdf6e3; color: #5a4400; }
.status-payment-paid      { background: #e7f6ec; color: #1b5e2c; }
.status-payment-refunded  { background: #fcebe9; color: #7a1d12; }
.status-payment-failed    { background: #efefef; color: #5a544a; }
.status-big {
    font-size: 12px; padding: 4px 12px; display: inline-block;
}

/* ============ Admin ============ */
.page-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 16px; margin-bottom: 16px;
}
.page-head h1 { font-size: 22px; }
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin: 16px 0;
}
.stat {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.stat-num {
    font-size: 26px; font-weight: 700; color: var(--primary);
    letter-spacing: -.02em;
}
.stat-label {
    color: var(--muted); font-size: 11px;
    text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.status-filters {
    display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0;
}
.status-filters a {
    padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--fg-2); font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em; font-weight: 500;
    transition: all .12s;
}
.status-filters a:hover { border-color: var(--primary); color: var(--primary); }
.status-filters a.is-active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

.stock-form { display: flex; align-items: center; gap: 6px; }
.stock-form span { min-width: 28px; font-weight: 600; }
.stock-form input { width: 72px; }

/* ============ Errors / empty ============ */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 {
    font-size: 80px; margin: 0; color: var(--primary);
    letter-spacing: -.02em;
}
.error-page p { color: var(--muted); }
.empty {
    color: var(--muted); padding: 48px 24px;
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius-md);
}
.empty p { margin: 0 0 6px; font-size: 14px; color: var(--fg-2); }
.empty .muted { font-size: 12px; }

/* Empty marketplace splash on the homepage */
.empty-marketplace {
    background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    text-align: center;
}
.empty-marketplace svg {
    width: 72px; height: 72px;
    color: var(--primary); opacity: .85;
    margin-bottom: 16px;
}
.empty-marketplace h3 {
    font-size: 22px; margin: 0 0 8px;
    color: var(--fg);
}
.empty-marketplace p {
    color: var(--muted); margin: 0 auto 24px;
    max-width: 480px; font-size: 14px;
}
.empty-marketplace-actions {
    display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

/* Trust pillars under the hero */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.trust-tile {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
}
.trust-ico {
    font-size: 28px; margin-bottom: 10px; line-height: 1;
}
.trust-tile strong {
    display: block; font-size: 14px; margin-bottom: 6px;
    color: var(--fg); font-weight: 600;
}
.trust-tile p {
    margin: 0; font-size: 12px; line-height: 1.5;
    color: var(--muted);
}

/* ============ Responsive ============ */
@media (max-width: 1000px) {
    .header-search { max-width: 380px; }
    .hero { padding: 36px 28px; }
    .hero h1 { font-size: 30px; }
    .badge-circle { width: 150px; height: 150px; }
}
@media (max-width: 800px) {
    .wrap { padding: 0 12px; }
    .header-inner { flex-wrap: wrap; min-height: auto; padding: 12px 0; gap: 10px; }
    .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
    .hero {
        grid-template-columns: 1fr; padding: 32px 20px;
        text-align: center;
    }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-badge { order: -1; }
    .badge-circle { width: 120px; height: 120px; }
    .badge-circle strong { font-size: 20px; }
    .shop-layout { grid-template-columns: 1fr; gap: 12px; }
    .shop-sidebar { display: none; }
    .product-detail { grid-template-columns: 1fr; padding: 12px; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-2 .span-2 { grid-column: auto; }
    .primary-nav { display: none; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
    .shop-main h1 { font-size: 18px; }
    .section { margin-top: 20px; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .product-card h3 { font-size: 12px; min-height: 32px; }
    .product-card .price { font-size: 15px; }
    .product-card-body { padding: 8px 10px 10px; }
    .add-to-cart { padding: 0 10px 10px; }
    .add-to-cart .btn { padding: 7px 8px; font-size: 10px; }
    .hero { padding: 24px 16px; }
    .hero h1 { font-size: 24px; }
}

/* Checkout · simplified payment block ------------------------------------ */
.pay-method-block {
    border: 1px solid var(--border, #e5e5e5);
    background: #fafbfc;
    border-radius: var(--radius-md, 10px);
    padding: 16px;
}
.pay-method-row {
    display: flex; align-items: center; gap: 12px;
}
.pay-method-row > div { min-width: 0; }
.pay-method-row strong { display: block; font-size: 14px; color: #1a1f36; }
.pay-method-row .muted { font-size: 12px; line-height: 1.45; margin-top: 2px; }
.pay-method-mark {
    flex-shrink: 0;
    width: 40px; height: 40px;
    background: #fff;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: var(--primary, #ee4d2d);
    letter-spacing: .04em;
}
.pay-method-notes {
    list-style: none;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--border, #e5e5e5);
    font-size: 12px;
    color: #6b7c93;
}
.pay-method-notes li { padding: 2px 0; }

/* Payment page · Shopee-style on-brand ----------------------------------- */
.adn-pay {
    display: flex; justify-content: center;
    padding: 32px 16px 64px;
}
.adn-pay-card {
    width: 100%; max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(238, 77, 45, .07);
    overflow: hidden;
}
.adn-pay-head {
    padding: 18px 26px 22px;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
    border-bottom: 1px solid var(--border, #e5e5e5);
}
.adn-pay-trust {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600;
    color: var(--primary);
    background: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #f6dad0;
    margin-bottom: 12px;
}
.adn-pay-eyebrow {
    margin: 0 0 10px;
    font-size: 12px; font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.adn-pay-amount {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.05;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}
.adn-pay-currency {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    vertical-align: 6px;
    margin-right: 2px;
}
.adn-pay-order {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
}
.adn-pay-order code {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--border, #e5e5e5);
    padding: 2px 8px;
    border-radius: var(--radius-md);
    color: #1a1a1a;
    margin-left: 4px;
}
.adn-pay-qr-wrap {
    padding: 22px 26px 18px;
    text-align: center;
    background: #fff;
}
.adn-pay-qr {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 20px rgba(238, 77, 45, .12);
}
.adn-pay-qr img {
    display: block;
    width: 240px; height: 240px;
    max-width: 100%;
}
.adn-pay-banks {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.adn-pay-banks span {
    background: var(--surface-2, #fafafa);
    border: 1px solid var(--border, #e5e5e5);
    color: #4b5563;
    font-size: 11px; font-weight: 500;
    padding: 3px 9px;
    border-radius: 999px;
}
.adn-pay-howto {
    padding: 16px 26px;
    background: var(--primary-soft);
    border-top: 1px solid var(--border, #e5e5e5);
    border-bottom: 1px solid var(--border, #e5e5e5);
}
.adn-pay-howto-row {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}
.adn-pay-howto-row strong { color: #1a1a1a; font-weight: 600; }
.adn-pay-step {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.adn-pay-status {
    padding: 14px 26px;
    background: #fff;
    border-bottom: 1px solid var(--border, #e5e5e5);
}
.adn-pay-status-row[hidden] { display: none; }
.adn-pay-status-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
    color: #4b5563;
}
.adn-pay-status-row strong { color: #1a1a1a; }
.adn-pay-status-row.is-paid { color: #047857; }
.adn-pay-status-row.is-paid strong { color: #047857; }
.adn-pay-status.is-paid {
    background: #ecfdf5;
    border-bottom-color: #a7f3d0;
}
.adn-pay-pulse {
    flex-shrink: 0;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(238, 77, 45, .55);
    animation: adn-pay-pulse 1.4s ease-in-out infinite;
}
@keyframes adn-pay-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(238, 77, 45, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(238, 77, 45, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(238, 77, 45, 0);   }
}
.adn-pay-foot {
    padding: 12px 26px 18px;
    text-align: center;
    background: #fff;
}
.adn-pay-cancel {
    background: none; border: 0; padding: 4px 8px;
    font: inherit;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #d1d5db;
    text-underline-offset: 3px;
}
.adn-pay-cancel:hover { color: #b91c1c; text-decoration-color: #b91c1c; }
@media (max-width: 480px) {
    .adn-pay { padding: 18px 12px 48px; }
    .adn-pay-head { padding: 18px 18px 16px; }
    .adn-pay-amount { font-size: 30px; }
    .adn-pay-qr-wrap { padding: 18px 18px 14px; }
    .adn-pay-qr img { width: 220px; height: 220px; }
    .adn-pay-howto, .adn-pay-status, .adn-pay-foot {
        padding-left: 18px; padding-right: 18px;
    }
}

/* ============================================================
   Shopee-style homepage redesign
   ============================================================ */

.shopee-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin: 16px 0 14px;
}
.shopee-hero-main {
    position: relative;
    overflow: hidden;
    padding: 36px 36px 32px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 90% 110%, rgba(255,255,255,.18) 0, transparent 45%),
        linear-gradient(120deg, #ff7a4f 0%, var(--primary) 50%, #d73211 100%);
    color: #fff;
    min-height: 280px;
    display: flex; flex-direction: column; justify-content: center;
}
.shopee-hero-main::after {
    content: '';
    position: absolute;
    right: -40px; bottom: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
}
.shopee-hero-eyebrow {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.12);
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 14px;
}
.shopee-hero-main h1 {
    font-size: 36px;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 12px;
    font-weight: 700;
    max-width: 90%;
}
.shopee-hero-main h1 .accent {
    color: #fff8e7;
    text-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.shopee-hero-main p {
    color: rgba(255,255,255,.92);
    font-size: 14px;
    margin: 0 0 18px;
    max-width: 480px;
    line-height: 1.5;
}
.shopee-hero-cta {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.btn-ghost-light {
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.45);
}
.btn-ghost-light:hover {
    background: rgba(255,255,255,.28);
    color: #fff;
    border-color: #fff;
}
.shopee-hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}
.shopee-hero-promo {
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 134px;
    position: relative; overflow: hidden;
}
.shopee-hero-promo .tag {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    background: rgba(255,255,255,.2);
    padding: 3px 8px;
    border-radius: 999px;
    align-self: flex-start;
}
.shopee-hero-promo strong {
    font-size: 18px;
    line-height: 1.25;
    color: #fff;
    font-weight: 700;
}
.shopee-hero-promo-1 {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}
.shopee-hero-promo-2 {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

/* Benefits inline bar */
.shopee-benefits {
    display: flex; justify-content: space-around; flex-wrap: wrap;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    gap: 8px;
}
.shopee-benefit {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600;
    color: var(--fg);
}
.shopee-benefit span {
    font-size: 18px;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,.04));
}

/* Section head — Shopee-style with orange left bar */
.shopee-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 18px 0 10px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}
.shopee-section-head h2 {
    font-size: 18px; font-weight: 700;
    color: var(--fg);
    margin: 0;
}

/* Categories tile grid */
.shopee-cat-tile-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 4px 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.shopee-cat-tile-section .shopee-section-head { margin-top: 12px; }
.shopee-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.shopee-cat-tile {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px;
    padding: 14px 6px;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--fg);
    background: var(--surface);
    transition: background .15s ease, transform .15s ease;
    border: 1px solid transparent;
}
.shopee-cat-tile:hover {
    background: var(--primary-soft);
    border-color: #fde0d7;
    color: var(--primary);
    transform: translateY(-1px);
}
.shopee-cat-ico {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.shopee-cat-name {
    font-size: 12px; font-weight: 500;
    line-height: 1.25;
    color: inherit;
}

/* Flash / Daily Discover band */
.shopee-flash {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 16px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.shopee-flash-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.shopee-flash-title {
    display: flex; align-items: center; gap: 10px;
}
.shopee-flash-flag {
    background: linear-gradient(135deg, var(--primary), #fb923c);
    color: #fff;
    font-size: 18px;
    width: 32px; height: 32px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(238,77,45,.25);
}
.shopee-flash-title h2 {
    font-size: 18px; font-weight: 700;
    color: var(--fg); margin: 0;
}
.shopee-flash-sub {
    font-size: 12px; color: var(--muted);
    padding-left: 8px;
    border-left: 1px solid var(--line);
    margin-left: 4px;
}
.shopee-flash-link {
    font-size: 13px; font-weight: 600;
    color: var(--primary);
    display: inline-flex; align-items: center; gap: 4px;
}
.shopee-flash-link span { font-size: 18px; line-height: 1; }
.shopee-flash-link:hover { color: var(--primary-dark); }

/* Why-Adarna section uses white card */
.shopee-why {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* Wishlist heart on product cards */
.product-card { position: relative; }
.product-wish {
    position: absolute;
    top: 8px; right: 8px;
    width: 30px; height: 30px;
    border: 0;
    background: rgba(255,255,255,.92);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    color: #9ca3af;
    z-index: 2;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}
.product-wish svg { width: 16px; height: 16px; }
.product-wish:hover { background: #fff; color: var(--primary); transform: scale(1.08); }
.product-wish.is-saved { color: var(--primary); }
.product-wish.is-saved svg { fill: var(--primary); }
.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    transition: box-shadow .18s ease, transform .18s ease;
}

/* Shop sort bar (Shopee-style chips) */
.shop-sortbar {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 10px 0 14px;
    box-shadow: var(--shadow-sm);
}
.shop-sortbar-label {
    font-size: 13px; color: var(--muted);
    margin-right: 4px;
}
.shop-sort-chip {
    background: var(--surface-2);
    color: var(--fg-2);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 12px; font-weight: 500;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.shop-sort-chip:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.shop-sort-chip.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.shop-sort-chip.is-active:hover {
    background: var(--primary-dark);
    color: #fff;
}
.shop-sortbar-count {
    margin-left: auto;
    font-size: 12px; color: var(--muted);
}

@media (max-width: 900px) {
    .shopee-hero { grid-template-columns: 1fr; }
    .shopee-hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
    .shopee-hero-main h1 { font-size: 28px; }
}
@media (max-width: 600px) {
    .shopee-hero-side { grid-template-columns: 1fr; }
    .shopee-hero-main { padding: 24px 20px; }
    .shopee-hero-main h1 { font-size: 24px; }
    .shopee-benefits { padding: 10px; }
    .shopee-benefit { font-size: 12px; }
    .shopee-cat-tiles { grid-template-columns: repeat(4, 1fr); }
    .shopee-cat-ico { width: 40px; height: 40px; font-size: 20px; }
    .shopee-cat-name { font-size: 11px; }
    .shop-sortbar-count { width: 100%; margin-left: 0; margin-top: 4px; }
}

/* Share row on product detail ------------------------------------------- */
.share-row {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 8px;
    padding: 12px 14px;
    background: var(--surface-2, #fafafa);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius-md);
}
.share-label {
    font-size: 12px; font-weight: 600;
    color: var(--muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-right: 4px;
}
.share-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border, #e5e5e5);
    background: #fff;
    color: #4b5563;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.share-btn:hover { transform: translateY(-1px); }
.share-fb:hover   { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-wa:hover   { background: #25d366; color: #fff; border-color: #25d366; }
.share-msgr:hover { background: #0084ff; color: #fff; border-color: #0084ff; }
.share-tw:hover   { background: #000;    color: #fff; border-color: #000; }
.share-native:hover, .share-copy:hover {
    background: var(--primary-soft, #fff5f0);
    color: var(--primary, #ee4d2d);
    border-color: var(--primary, #ee4d2d);
}
.share-toast {
    font-size: 12px;
    color: var(--success, #1f8a3a);
    opacity: 0;
    transition: opacity .2s ease;
    margin-left: 4px;
}
.share-toast.is-on { opacity: 1; }

/* Launch promo banner -------------------------------------------------- */
.promo-banner {
    background: linear-gradient(90deg, #1a1a1a 0%, #292929 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: relative;
    z-index: 60;
}
.promo-banner-inner {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 16px;
    min-height: 36px;
}
.promo-tag {
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .14em;
    background: var(--primary, #ee4d2d);
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}
.promo-banner p {
    margin: 0;
    font-size: 13px;
    color: #f5f5f5;
    flex: 1;
    line-height: 1.4;
}
.promo-banner strong { color: #fff; }
.promo-code {
    background: rgba(255,255,255,.12);
    border: 1px dashed rgba(255,255,255,.4);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12px;
    color: #ffe5d6;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.promo-code:hover {
    background: rgba(255,255,255,.22);
    color: #fff;
}
.promo-close {
    background: none; border: 0; padding: 4px 8px;
    color: #cfcfcf; cursor: pointer;
    font-size: 22px; line-height: 1;
    border-radius: 50%;
    transition: color .15s ease;
}
.promo-close:hover { color: #fff; }
@media (max-width: 640px) {
    .promo-banner-inner { padding: 6px 12px; }
    .promo-banner p { font-size: 12px; }
    .promo-tag { display: none; }
}

/* Promo row + discount line ------------------------------------------- */
.promo-row {
    margin: 14px 0 12px;
    padding: 12px;
    background: var(--primary-soft, #fff5f0);
    border: 1px dashed var(--primary, #ee4d2d);
    border-radius: var(--radius-md);
}
.promo-row .field-label { font-size: 12px; color: var(--muted, #6b7280); }
.promo-row input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line-strong, #d1d5db);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    letter-spacing: .04em;
    background: #fff;
}
.promo-row input:focus {
    outline: none;
    border-color: var(--primary, #ee4d2d);
    box-shadow: 0 0 0 2px rgba(238,77,45,.15);
}
.cart-table .discount-row td {
    color: var(--success, #047857);
    font-weight: 600;
}

/* Admin order — delivery & courier events form -------------------------- */
.admin-delivery-form {
    display: flex; flex-direction: column; gap: 10px;
    background: var(--surface-2, #fafafa);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 8px 0 12px;
}
.admin-delivery-form .admin-field label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 12px; color: var(--muted, #6b7280);
}
.admin-delivery-form .admin-field input {
    padding: 7px 10px;
    border: 1px solid var(--line-strong, #d1d5db);
    border-radius: var(--radius);
    font: inherit; font-size: 13px;
    background: #fff;
}
.admin-delivery-form .admin-field input:focus {
    outline: none;
    border-color: var(--primary, #ee4d2d);
    box-shadow: 0 0 0 2px rgba(238,77,45,.12);
}
.admin-delivery-form .btn-sm {
    align-self: flex-start;
    padding: 6px 14px;
    font-size: 13px;
}
.admin-delivery-form .muted { color: var(--muted, #6b7280); font-weight: 400; }
.admin-delivery-form .small { font-size: 11px; }

/* Header search autosuggest dropdown ------------------------------------- */
.search-suggest {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius-md, 10px);
    box-shadow: 0 14px 36px rgba(0,0,0,.12);
    max-height: 460px;
    overflow-y: auto;
    z-index: 60;
    color: var(--fg, #1f2937);
}
.suggest-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background .12s ease;
}
.suggest-row:last-of-type { border-bottom: 0; }
.suggest-row:hover,
.suggest-row.is-active {
    background: #fff5f0;
}
.suggest-row img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
}
.suggest-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.suggest-name {
    font-size: 14px;
    line-height: 1.3;
    color: var(--fg, #1f2937);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.suggest-name mark {
    background: transparent;
    color: var(--primary, #ee4d2d);
    font-weight: 700;
    padding: 0;
}
.suggest-meta {
    font-size: 11px;
    color: var(--muted, #6b7280);
    margin-top: 2px;
}
.suggest-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary, #ee4d2d);
    font-variant-numeric: tabular-nums;
}
.suggest-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted, #6b7280);
    font-size: 13px;
}
.suggest-empty strong { color: var(--fg, #1f2937); }
.suggest-all {
    display: block;
    padding: 12px 14px;
    text-align: center;
    background: #fafafa;
    color: var(--primary, #ee4d2d);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #eee;
}
.suggest-all:hover { background: #fff5f0; }
