:root {
  /* The storefront only ships a light theme. Declaring "only light" also tells
     Android WebView / WeChat's WebView to stop force-darkening the page: without
     it the whole document (text, buttons, tab bar, placeholders) is rendered
     greyed out inside the WeChat browser even though the page is fine. */
  color-scheme: only light;
  --bg-main: #f7f9fd;
  --bg-secondary: #edf2fb;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --text-primary: #10182e;
  --text-secondary: #5d6880;
  --future-cyan: #00bfe8;
  --future-blue: #2563eb;
  --future-cobalt: #163fb7;
  --future-violet: #7457f5;
  --commerce-orange: #ff642c;
  --commerce-coral: #ff4d57;
  --commerce-gold: #ffbd2e;
  --border-light: #dbe3f1;
  --shadow-soft: 0 18px 50px rgba(31, 52, 105, 0.12);
  --glow-soft: 0 0 0 4px rgba(0, 191, 232, 0.12), 0 16px 36px rgba(37, 99, 235, 0.14);
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --paper: var(--surface);
  --canvas: var(--bg-secondary);
  --line: var(--border-light);
  --brand: var(--future-blue);
  --brand-dark: var(--future-cobalt);
  --brand-pale: #e8f5ff;
  --accent: var(--commerce-orange);
  --accent-pale: #fff0e8;
  --sand: #fff7e8;
  --success: #16855b;
  --warning: #c47a00;
  --danger: #a44444;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 30px;
  --shadow: var(--shadow-soft);
  --container: 1240px;
}

/* CJ Inventory Status V1: short, wrapping SKU state labels that never compete
   with the option-chip row on narrow screens. */
.inventory-status-line {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  line-height: 1.35;
  margin: .45rem 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.inventory-status-line .status-dot {
  flex: 0 0 auto;
}

.inventory-status-line.warehouse-stock { color: #39734f; }
.inventory-status-line.transfer-stock { color: #8a641f; }
.inventory-status-line.out-of-stock { color: #8c4a44; }
.inventory-status-line.unknown { color: #6b6b68; }

.detail-inventory-status,
.cart-inventory-status {
  white-space: normal;
}

@media (max-width: 640px) {
  .detail-rating [data-detail-inventory-status] {
    flex-basis: 100%;
  }

  .inventory-status-line {
    font-size: .84rem;
  }
}

/* Customer Account V1 */
.account-page { min-height: 70vh; }
.login-layout { display: grid; place-items: start center; padding: 3rem 0 5rem; }
.login-card { width: min(100%, 30rem); padding: 2rem; border: 1px solid var(--border, #e5e7eb); border-radius: 1.25rem; background: #fff; box-shadow: 0 18px 45px rgba(15, 23, 42, .08); }
.login-card h2 { margin: 0 0 .5rem; }
.login-card > p { color: var(--muted, #64748b); margin-bottom: 1.5rem; }
.login-card .field { display: grid; gap: .45rem; margin-bottom: 1rem; }
.login-card input { width: 100%; min-height: 3rem; border: 1px solid #cbd5e1; border-radius: .75rem; padding: .7rem .9rem; }
.checkout-login-callout { margin: 0 0 1rem 3.25rem; padding: .85rem 1rem; border-radius: .75rem; background: #f1f5f9; }
.checkout-login-callout a { font-weight: 700; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; padding: 2.5rem 0 5rem; }
.account-orders-panel > h2, .account-profile-card h2, .account-detail-card h2, .account-payment-card h2 { margin-top: 0; }
.account-order-list { display: grid; gap: .9rem; }
.account-order-card, .account-profile-card, .account-detail-card, .account-payment-card, .account-empty { display: block; padding: 1.25rem; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; color: inherit; text-decoration: none; }
.account-order-card:hover { border-color: #94a3b8; box-shadow: 0 10px 30px rgba(15, 23, 42, .07); }
.account-order-head, .account-order-meta, .account-detail-total { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.account-order-head time, .account-order-card p, .account-order-meta span, .account-detail-summary span, .account-detail-summary small { color: #64748b; }
.account-order-meta span { padding: .25rem .6rem; border-radius: 99px; background: #f1f5f9; }
.account-order-meta strong { margin-right: auto; }
.account-profile-card dl { margin: 0 0 1.5rem; }
.account-profile-card dt { margin-top: .9rem; color: #64748b; font-size: .85rem; }
.account-profile-card dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.account-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; padding: 2.5rem 0 5rem; }
.account-detail-main { display: grid; gap: 1rem; }
.account-detail-summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1rem; }
.account-detail-summary > div { display: grid; gap: .2rem; }
.account-order-item { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid #e2e8f0; }
.account-order-item img, .order-item-placeholder { width: 5rem; height: 5rem; object-fit: cover; border-radius: .75rem; background: #f1f5f9; display: grid; place-items: center; }
.account-order-item h3 { margin: 0 0 .35rem; font-size: 1rem; }
.account-order-item p { margin: .15rem 0; color: #64748b; }
.account-detail-total { padding-top: 1rem; font-size: 1.15rem; }
.account-payment-card { text-align: center; border-color: #86efac; background: #f0fdf4; }
.account-payment-card img { display: block; width: min(16rem, 100%); margin: 1rem auto; border-radius: .75rem; }
.account-address p { line-height: 1.75; }
.account-logistics .logistics-row { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dashed #e2e8f0; }
.account-logistics .logistics-row:last-of-type { border-bottom: 0; }
.account-logistics .logistics-row span { color: #64748b; }
.account-logistics .logistics-actions { margin: .75rem 0 0; }
.account-back { display: inline-block; margin-bottom: .5rem; }
.account-error { padding: 4rem 0; text-align: center; }

@media (max-width: 767.98px) {
  .login-layout { padding: 1.5rem 1rem 6rem; }
  .login-card { padding: 1.25rem; }
  .checkout-login-callout { margin-left: 0; }
  .account-layout, .account-detail-layout { grid-template-columns: 1fr; padding: 1.5rem 1rem 6rem; }
  .account-orders-panel { order: 0; }
  .account-profile-card, .account-address { order: 1; }
  .account-detail-summary { grid-template-columns: 1fr; }
  .account-order-item { grid-template-columns: 4rem minmax(0, 1fr); }
  .account-order-item img, .order-item-placeholder { width: 4rem; height: 4rem; }
  .account-order-item > strong { grid-column: 2; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -0.025em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(39, 108, 103, 0.28); outline-offset: 3px; }
.site-container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 2000; transform: translateY(-150%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); color: #fff; }
.eyebrow { margin-bottom: 10px; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section { padding-block: 72px; }
.section-muted { background: var(--canvas); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.section-heading > a { color: var(--brand); font-weight: 800; white-space: nowrap; }

.utility-bar { border-bottom: 1px solid var(--line); background: #fbfcfc; color: var(--ink-soft); font-size: .78rem; }
.utility-inner { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.utility-message { margin: 0; font-weight: 700; }
.utility-controls { display: flex; align-items: center; gap: 18px; }
.utility-controls label { display: flex; align-items: center; gap: 7px; margin: 0; white-space: nowrap; }
.language-control { color: var(--ink); }
.language-globe { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.language-separator { color: var(--ink-soft); }
.utility-controls select { width: auto; max-width: 150px; border: 0; background: transparent; color: var(--ink); font-weight: 700; padding: 3px 18px 3px 2px; }
html[dir="rtl"] .utility-controls select { padding: 3px 2px 3px 18px; }
.site-header { position: sticky; inset-block-start: 0; z-index: 1000; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-main { min-height: 86px; display: grid; grid-template-columns: minmax(190px, .75fr) minmax(320px, 1.8fr) minmax(210px, .8fr); align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.035em; font-size: 1.16rem; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--brand); color: #fff; font-size: 1rem; box-shadow: 0 8px 20px rgba(39,108,103,.2); }
.brand-logo-link { min-width: 0; width: fit-content; overflow: hidden; border-radius: 11px; background: #061326; }
.brand-logo { width: auto; object-fit: contain; }
.brand-logo-header { height: 50px; max-width: 185px; }
.brand-logo-footer { height: 58px; max-width: 210px; }
.global-search { display: flex; min-width: 0; height: 48px; border: 1px solid #cfd8da; border-radius: 999px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.global-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-pale); }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding-inline: 20px; color: var(--ink); }
.global-search button { width: 55px; border: 0; background: var(--brand); color: #fff; font-size: 1.5rem; cursor: pointer; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.header-actions a { position: relative; display: grid; justify-items: center; gap: 1px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.header-actions a > span:first-child { color: var(--ink); font-size: 1.3rem; line-height: 1; }
.cart-badge, .mobile-bottom-nav b { position: absolute; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: .65rem; inset-block-start: -8px; inset-inline-end: -8px; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 1.2rem; }
.nav-row { min-height: 47px; display: flex; align-items: stretch; border-top: 1px solid #eef1f2; }
.category-nav { display: inline-flex; align-items: center; gap: 10px; min-width: 220px; color: var(--brand); font-weight: 800; }
.primary-nav { display: flex; align-items: center; gap: 34px; margin-inline-start: 24px; }
.primary-nav a { padding-block: 12px; font-weight: 700; font-size: .92rem; }

.hero-section { background: linear-gradient(135deg, #f5f4ed 0%, #eef5f4 58%, #e5eff1 100%); }
.hero-grid { min-height: 540px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(480px, 1.15fr); align-items: center; gap: 42px; }
.hero-copy { position: relative; z-index: 2; padding-block: 64px; }
.hero-copy h1 { max-width: 670px; margin-bottom: 20px; font-size: clamp(2.5rem, 5.3vw, 4.75rem); }
.hero-text { max-width: 600px; color: var(--ink-soft); font-size: clamp(1rem, 1.8vw, 1.22rem); }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-block: 30px 24px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .86rem; }
.hero-proof li { display: flex; align-items: center; gap: 7px; }
.hero-proof li span:first-child { color: var(--success); font-weight: 900; }
.hero-image { align-self: stretch; min-height: 430px; background: url("../assets/img/global-mall-hero.png") center / cover no-repeat; border-radius: 0 0 0 90px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
html[dir="rtl"] .hero-image { border-radius: 0 0 90px 0; transform: scaleX(-1); }

.btn-primary, .btn-secondary, .btn-primary-soft, .btn-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 20px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #0d1729; color: #fff; }
.btn-primary-soft { background: var(--brand-pale); color: var(--brand-dark); }
.btn-primary-soft:hover { background: #d5e8e5; color: var(--brand-dark); }
.btn-link { min-height: auto; padding: 8px 2px; border-radius: 0; color: var(--brand); }
.btn-link:hover { color: var(--brand-dark); }
.full { width: 100%; }
.centered { display: flex; width: fit-content; margin: 10px auto 0; }
.disabled, button:disabled { opacity: .48; pointer-events: none; }

.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.category-card { min-height: 118px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.category-card:hover { transform: translateY(-3px); border-color: #bfd1cf; box-shadow: var(--shadow); }
.category-card strong { font-size: .95rem; line-height: 1.25; }
.category-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--brand-pale); color: var(--brand); border-radius: 13px; font-size: 1.15rem; }
html[dir="rtl"] .category-card > span:last-child { transform: scaleX(-1); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-media { position: relative; display: block; aspect-ratio: 1.156 / 1; background-image: url("../assets/img/product-sprite.png"); background-repeat: no-repeat; background-size: 400% 300%; background-position: var(--sprite-x) var(--sprite-y); background-color: #f5f0e8; }
.product-media.has-product-image { background-image: none; }
.product-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.product-media.image-load-failed { display: grid; place-items: center; background-image: none; }
.product-media.image-load-failed::after { content: attr(data-image-failure-label); padding: 14px; color: var(--ink-soft); font-size: .78rem; text-align: center; }
/* Neutral placeholder: a missing real image never falls back to a template demo
   product photo (the sprite is the static preview's own mock catalogue). */
.product-media.media-placeholder { display: grid; place-items: center; background-image: none; }
.product-media.media-placeholder::after { content: "◇"; color: var(--ink-soft); font-size: 1.6rem; }
/* A cart line without any real image: same neutral tile, centered glyph. */
.cart-item a.product-media.media-placeholder { background-color: var(--canvas); }
.discount-badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; padding: 5px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 900; }
.product-card-body { padding: 16px; }
.product-card-meta { min-width: 0; display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: .72rem; }
.product-card-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card-meta > span:last-child { color: var(--warning); white-space: nowrap; }
.product-card h3 { min-height: 44px; margin: 9px 0 8px; font-size: 1rem; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price-row strong { font-size: 1.13rem; }
.price-row del { color: #8993a1; font-size: .82rem; }
.stock-line { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: .76rem; font-weight: 800; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-line.inStock { color: var(--success); }
.stock-line.lowStock { color: var(--warning); }
.stock-line.outOfStock { color: var(--danger); }
.delivery-line { min-height: 36px; margin: 4px 0 12px; color: var(--ink-soft); font-size: .72rem; }
.product-card-actions { display: grid; grid-template-columns: 1fr 42px; gap: 8px; }
.product-card-actions .btn-primary-soft { min-width: 0; padding-inline: 10px; font-size: .82rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.2rem; cursor: pointer; }

.deal-section { padding-block: 28px; }
.deal-card { position: relative; min-height: 300px; display: grid; grid-template-columns: 1fr .75fr; align-items: center; overflow: hidden; padding: 48px clamp(26px, 6vw, 76px); border-radius: var(--radius-lg); background: var(--ink); color: #fff; }
.deal-card > div:first-child { position: relative; z-index: 2; max-width: 590px; }
.deal-card .eyebrow { color: #91d0c9; }
.deal-card h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.deal-card p:not(.eyebrow) { color: #cbd2de; }
.deal-card .btn-secondary { background: #fff; color: var(--ink); }
.deal-shapes { position: absolute; inset-block: 0; inset-inline-end: 0; width: 42%; background: radial-gradient(circle at 70% 50%, rgba(217,100,74,.75), transparent 35%), radial-gradient(circle at 35% 30%, rgba(58,142,133,.9), transparent 30%); }
.deal-shapes span { position: absolute; inset-block-start: 35%; inset-inline-end: 20%; width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.1); font-size: 1.45rem; font-weight: 900; backdrop-filter: blur(10px); }

.service-section { border-top: 1px solid var(--line); padding-block: 44px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-grid article { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.service-grid article > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-pale); color: var(--brand); font-size: 1.25rem; }
.service-grid h2 { margin-bottom: 5px; font-size: 1rem; }
.service-grid p { margin: 0; color: var(--ink-soft); font-size: .86rem; }

.page-main { min-height: 58vh; }
.page-hero { padding-block: 58px; background: linear-gradient(135deg, #eef5f4, #f6f1e8); }
.page-hero.compact { padding-block: 34px; }
.page-hero h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 3.6rem); }
.page-hero p:last-child { max-width: 680px; margin-bottom: 0; color: var(--ink-soft); }

.shop-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; }
.filters-panel { position: sticky; inset-block-start: 155px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.filter-heading h2 { margin: 0; font-size: 1.25rem; }
.text-button { border: 0; padding: 4px; background: transparent; color: var(--brand); font-weight: 800; cursor: pointer; }
.filters-panel fieldset { margin: 0; padding: 18px 0; border: 0; border-top: 1px solid var(--line); }
.filters-panel legend { float: none; width: auto; margin-bottom: 12px; font-size: .9rem; font-weight: 900; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; color: var(--ink-soft); font-size: .84rem; cursor: pointer; }
.check-row input { margin-block-start: 4px; accent-color: var(--brand); }
.range-label { display: grid; gap: 8px; color: var(--ink-soft); font-size: .82rem; }
.range-label input { width: 100%; accent-color: var(--brand); }
.shop-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; align-items: center; gap: 16px; margin-bottom: 24px; }
.shop-search input, .sort-control select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 9px 13px; }
.sort-control { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.sort-control select { width: auto; }
.shop-toolbar > span { color: var(--ink-soft); font-size: .82rem; white-space: nowrap; }
.shop-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; max-width: 100%; margin-top: 32px; }
.pagination button { min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; }
.pagination button.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.pagination .pagination-gap { color: var(--ink-soft); font-weight: 800; }

.product-detail { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(0, 1.1fr); gap: clamp(35px, 7vw, 86px); align-items: start; }
/* The gallery is a grid item: without min-width:0 its automatic minimum size is
   the min-content width of the thumbnail strip, which used to make the whole
   product page wider than an iPhone viewport. */
.detail-gallery { position: sticky; inset-block-start: 170px; min-width: 0; border-radius: var(--radius-lg); overflow: hidden; background: #f5f0e8; }
.detail-media { width: 100%; aspect-ratio: 1.156 / 1; }
.detail-product-image { object-fit: contain; }
.detail-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.detail-thumbnail { flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 10px; background: #f4f6fb; cursor: pointer; }
.detail-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-thumbnail.active { border-color: var(--brand); }
.detail-thumbnail.image-load-failed { cursor: default; opacity: .35; }
.detail-category { color: var(--brand); font-weight: 800; font-size: .82rem; }
/* Categoryless discovery: attribute/tag chips replace the single category link. */
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand); font-weight: 800; font-size: .76rem; text-decoration: none; }
.detail-tag:hover { border-color: #bfd1cf; box-shadow: var(--shadow); }
.filter-group { margin-bottom: 14px; }
.filter-group-title { margin: 0 0 8px; font-size: .78rem; font-weight: 900; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.detail-content h1 { margin: 10px 0 14px; font-size: clamp(2rem, 4vw, 3.2rem); }
.detail-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: var(--warning); }
.detail-rating .stock-line { margin: 0; }
.detail-price { display: flex; gap: 14px; align-items: baseline; margin-block: 22px; }
.detail-price strong { font-size: 2rem; }
.detail-price del { color: #8993a1; }
.detail-description { color: var(--ink-soft); font-size: 1.02rem; }
.option-group { margin-top: 22px; }
.option-label { display: block; margin-bottom: 9px; font-size: .82rem; font-weight: 900; }
.option-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 8px 13px; cursor: pointer; }
.option-chip.active { border-color: var(--brand); background: var(--brand-pale); color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand); }
.purchase-row { margin-block: 22px 14px; }
.purchase-row label { display: flex; align-items: center; gap: 16px; font-size: .82rem; font-weight: 900; }
.quantity-control { display: inline-grid; grid-template-columns: 40px 52px 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.quantity-control button { border: 0; background: var(--canvas); color: var(--ink); cursor: pointer; }
.quantity-control input { min-width: 0; width: 100%; height: 40px; border: 0; border-inline: 1px solid var(--line); text-align: center; appearance: textfield; }
.delivery-callout { display: grid; gap: 2px; padding: 15px; border-radius: 13px; background: var(--canvas); color: var(--ink-soft); font-size: .82rem; }
.delivery-callout strong { color: var(--ink); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block: 18px 30px; }
.detail-notes { border-top: 1px solid var(--line); }
.detail-notes details { border-bottom: 1px solid var(--line); padding-block: 15px; }
.detail-notes summary { font-weight: 800; cursor: pointer; }
.detail-notes p { margin: 10px 0 0; color: var(--ink-soft); }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.cart-list { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 118px minmax(180px, 1fr) 110px 140px 110px; align-items: center; gap: 18px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); }
.cart-thumb { width: 118px; border-radius: 13px; }
.cart-item h2 { margin-bottom: 6px; font-size: 1rem; }
.cart-item p { margin-bottom: 4px; color: var(--ink-soft); font-size: .78rem; }
.cart-unit, .cart-quantity, .cart-subtotal { display: grid; gap: 5px; color: var(--ink-soft); font-size: .76rem; }
.cart-unit strong, .cart-subtotal strong { color: var(--ink); font-size: .96rem; }
.cart-quantity .quantity-control { grid-template-columns: 34px 44px 34px; }
.order-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 30px rgba(23,36,60,.04); }
.order-card h2 { margin-bottom: 20px; font-size: 1.25rem; }
.summary-row, .summary-item { display: flex; justify-content: space-between; gap: 18px; padding-block: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .86rem; }
.summary-row strong, .summary-item strong { color: var(--ink); white-space: nowrap; }
.summary-row.total { font-size: 1rem; }
.shipping-note { display: grid; grid-template-columns: auto 1fr; gap: 9px; margin-block: 20px; padding: 13px; border-radius: 12px; background: var(--brand-pale); color: var(--brand-dark); font-size: .8rem; }
.shipping-note p { margin: 0; }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 14px; min-height: 280px; place-content: center; border: 1px dashed #cbd4d6; border-radius: var(--radius); text-align: center; }
.empty-state > span { font-size: 2.2rem; color: var(--brand); }
.empty-state h2 { max-width: 400px; margin: 0; font-size: 1.3rem; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: start; padding-block: 56px 80px; }
.checkout-main { display: grid; gap: 20px; }
.checkout-section { padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.checkout-heading { display: grid; grid-template-columns: 36px 1fr; gap: 13px; margin-bottom: 24px; }
.checkout-heading > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-pale); color: var(--brand); font-weight: 900; }
.checkout-heading h2 { margin-bottom: 5px; font-size: 1.35rem; }
.checkout-heading p { margin: 0; color: var(--ink-soft); font-size: .84rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { display: grid; gap: 7px; min-width: 0; font-size: .82rem; font-weight: 800; }
.field em { margin-inline-start: 4px; color: var(--ink-soft); font-size: .72rem; font-style: normal; font-weight: 600; }
.field input, .field select, .paste-panel textarea { width: 100%; min-height: 46px; border: 1px solid #cfd8da; border-radius: 11px; background: #fff; color: var(--ink); padding: 10px 12px; outline: 0; }
.field input:focus, .field select:focus, .paste-panel textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-pale); }
.field small { color: var(--ink-soft); font-weight: 500; }
.field small.valid { color: var(--success); }
.field input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(199, 52, 72, .1); }
.field .field-error { color: var(--danger); font-size: .75rem; font-weight: 700; line-height: 1.35; }
.input-action { display: grid; grid-template-columns: 1fr auto; }
.input-action input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-action button { border: 1px solid var(--brand); border-inline-start: 0; border-start-end-radius: 11px; border-end-end-radius: 11px; background: var(--brand-pale); color: var(--brand-dark); padding-inline: 12px; font-size: .78rem; font-weight: 800; }
html[dir="rtl"] .input-action input { border-radius: 0 11px 11px 0; }
html[dir="rtl"] .input-action button { border-inline-start: 0; border-inline-end: 0; border-radius: 11px 0 0 11px; }
.full-span { grid-column: 1 / -1; }
.address-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.address-mode-switch button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-secondary); font-weight: 800; cursor: pointer; transition: border-color .18s, background .18s, color .18s, box-shadow .18s; }
.address-mode-switch button:hover { border-color: var(--future-cyan); color: var(--future-blue); }
.address-mode-switch button.active { border-color: var(--future-blue); background: linear-gradient(135deg, #eef8ff, #f4f2ff); color: var(--future-blue); box-shadow: 0 7px 18px rgba(37,99,235,.09); }
.address-mode-switch svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.paste-panel { display: grid; gap: 9px; padding: 18px; border-radius: 15px; background: var(--canvas); }
.paste-panel > label { font-weight: 900; }
.paste-panel textarea { min-height: 130px; resize: vertical; }
.paste-panel > div { display: flex; align-items: center; gap: 14px; }
.paste-panel small { color: var(--ink-soft); font-size: .74rem; }
.address-card { margin-top: 18px; padding: 20px; border: 1px solid #b8d5d1; border-radius: 15px; background: #f5fbfa; }
.address-card-top { display: flex; justify-content: space-between; gap: 20px; }
.address-card-top h3 { margin-bottom: 2px; font-size: 1.12rem; }
.address-card-top p { margin-bottom: 0; color: var(--ink-soft); }
.address-card-top > span { color: var(--brand); font-size: 1.7rem; }
.address-status { color: var(--warning); font-size: .78rem; }
.address-card[data-confirmed="true"] .address-status { color: var(--success); }
.address-actions { display: flex; gap: 14px; }
.address-fields { margin-top: 18px; }
/* Country-specific field meaning (e.g. the Japanese 都道府県 / 市区町村 layout).
   Shown only for the markets whose administrative fields need explaining. */
.address-region-hint { margin: 0; padding: 10px 12px; border-radius: 11px; background: var(--canvas); color: var(--ink-soft); font-size: .78rem; line-height: 1.45; }
.manual-address-action { display: flex; justify-content: flex-end; padding-top: 3px; }
.confirmation-layout { align-items: start; }
.confirmation-number { margin: 4px 0 0; color: var(--future-blue); font-size: 1.25rem; font-weight: 900; letter-spacing: .04em; }
.confirmation-item { padding: 15px 0; border-bottom: 1px solid var(--border-light); }
.confirmation-item span { display: grid; gap: 4px; }
.confirmation-item small { color: var(--text-secondary); }
.confirmation-address { color: var(--text-secondary); line-height: 1.8; }
.confirmation-address strong { color: var(--text-primary); }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.delivery-options label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.delivery-options input { margin-top: 5px; accent-color: var(--brand); }
.delivery-options span { display: grid; gap: 4px; }
.delivery-options small { color: var(--ink-soft); }
.checkout-sidebar { position: sticky; inset-block-start: 155px; display: grid; gap: 15px; }
.payment-card { box-shadow: none; }
.payment-placeholder { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px; border-radius: 12px; background: var(--canvas); color: var(--ink-soft); font-size: .8rem; }
.payment-placeholder p { margin: 0; }
.temp-payment-options { margin-top: 12px; }
.temp-payment-notice, .temp-payment-warning, .temp-payment-adjustment { color: var(--ink-soft); font-size: .78rem; line-height: 1.6; }
.temp-payment-options label { display: flex; gap: 9px; align-items: flex-start; margin-top: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.temp-payment-options input { margin-top: 4px; accent-color: var(--brand); }
.temp-payment-options label.is-unavailable { cursor: not-allowed; opacity: .58; }
.temp-payment-card { text-align: center; }
.temp-payment-card p { margin-bottom: 9px; }
.temp-payment-method { color: var(--brand); font-weight: 800; }
.temp-payment-amount { color: var(--brand); font-size: 1.35rem; }
.temp-payment-qr { display: block; width: min(100%, 280px); aspect-ratio: 1; object-fit: contain; margin: 14px auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.temp-payment-state { color: var(--warning); font-weight: 800; }
.place-order { min-height: 52px; border: 0; }
.form-message { margin: 0; min-height: 22px; font-size: .82rem; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.order-confirmation { padding: 22px; border: 1px solid #acd1bf; border-radius: var(--radius); background: #f2faf6; text-align: center; }
.order-confirmation > span { width: 40px; height: 40px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--success); color: #fff; }
.order-confirmation h2 { font-size: 1rem; }
.order-confirmation a { color: var(--brand); font-weight: 800; }

.tracking-card { max-width: 850px; }
.tracking-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 34px; }
.tracking-summary div { display: grid; gap: 4px; padding: 17px; border-radius: 13px; background: var(--canvas); }
.tracking-summary span { color: var(--ink-soft); font-size: .75rem; }
.tracking-timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.tracking-timeline::before { content: ""; position: absolute; inset-block: 22px; inset-inline-start: 19px; width: 2px; background: var(--line); }
.tracking-timeline li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 16px; min-height: 92px; }
.tracking-timeline li > span { position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink-soft); font-weight: 900; }
.tracking-timeline li.done > span { border-color: var(--brand); background: var(--brand); color: #fff; }
.tracking-timeline li.current > span { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 6px var(--accent-pale); }
.tracking-timeline h2 { margin-bottom: 5px; font-size: 1rem; }
.tracking-timeline p { color: var(--ink-soft); font-size: .8rem; }
.prototype-callout { padding: 15px; border-radius: 12px; background: var(--accent-pale); color: #7f3d2e; font-size: .82rem; }
.simple-card { max-width: 700px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.not-found { min-height: 55vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.not-found > span { color: var(--brand-pale); font-size: clamp(5rem, 16vw, 11rem); font-weight: 900; line-height: 1; }

.site-footer { background: #121e32; color: #d7deea; padding-block: 56px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr .65fr .75fr 1fr 1.2fr; gap: 30px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.footer-brand p, .newsletter p { max-width: 390px; margin-top: 18px; color: #9eabbc; font-size: .84rem; }
.footer-grid h2 { margin-bottom: 16px; color: #fff; font-size: .9rem; }
.footer-grid > div:not(.footer-brand) > a { display: block; width: fit-content; margin-bottom: 9px; color: #aeb8c7; font-size: .82rem; }
.footer-contact a:first-of-type { overflow-wrap: anywhere; }
.newsletter form { display: flex; max-width: 380px; }
.newsletter input { min-width: 0; flex: 1; min-height: 44px; border: 1px solid #334157; border-radius: 10px 0 0 10px; background: #1b2940; color: #fff; padding: 10px 12px; }
.newsletter button { border: 0; border-radius: 0 10px 10px 0; background: var(--brand); color: #fff; padding: 10px 14px; font-weight: 800; }
html[dir="rtl"] .newsletter input { border-radius: 0 10px 10px 0; }
html[dir="rtl"] .newsletter button { border-radius: 10px 0 0 10px; }
.footer-legal { display: flex; justify-content: space-between; gap: 24px; margin-top: 38px; padding-top: 20px; border-top: 1px solid #29364a; color: #8996a8; font-size: .72rem; }
.footer-legal a { color: #c7d0dd; text-decoration: underline; }
.mobile-bottom-nav { display: none; }
.toast-message { position: fixed; z-index: 2000; inset-inline: 50%; inset-block-end: 26px; transform: translate(50%, 25px); opacity: 0; pointer-events: none; padding: 11px 17px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: .82rem; font-weight: 800; transition: .22s; }
html[dir="ltr"] .toast-message { transform: translate(-50%, 25px); }
.toast-message.show { opacity: 1; transform: translate(50%, 0); }
html[dir="ltr"] .toast-message.show { transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .site-container { width: min(calc(100% - 32px), var(--container)); }
  .header-main { grid-template-columns: 180px minmax(260px, 1fr) 190px; gap: 18px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .cart-item { grid-template-columns: 100px minmax(150px, 1fr) 115px; }
  .cart-thumb { width: 100px; grid-row: span 2; }
  .cart-unit, .cart-quantity, .cart-subtotal { grid-column: auto; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 900px) {
  .utility-message { display: none; }
  .utility-inner { justify-content: center; }
  .header-main { grid-template-columns: 1fr auto; min-height: auto; padding-block: 12px; }
  .brand-logo-header { height: 46px; max-width: 175px; }
  .global-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .nav-toggle { display: block; }
  .header-actions a > span:last-of-type { display: none; }
  .nav-row { display: none; min-height: auto; padding-block: 12px; flex-wrap: wrap; }
  .nav-row.open { display: flex; }
  .category-nav { width: 100%; min-width: 0; padding: 8px 0; }
  .primary-nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-inline-start: 0; }
  .primary-nav a { padding: 10px; border-radius: 9px; background: var(--canvas); text-align: center; }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 0; padding-top: 30px; }
  .hero-copy { padding-block: 36px 24px; }
  .hero-image { min-height: 360px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  html[dir="rtl"] .hero-image { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
  .shop-toolbar { grid-template-columns: 1fr auto; }
  .shop-toolbar .sort-control { grid-column: 1 / -1; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .order-card, .checkout-sidebar, .filters-panel, .detail-gallery { position: static; }
  .checkout-sidebar { grid-row: auto; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .newsletter { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  body { padding-bottom: 66px; font-size: 15px; }
  .site-container { width: min(calc(100% - 24px), var(--container)); }
  .utility-inner { width: 100%; overflow-x: auto; justify-content: flex-start; padding-inline: 12px; scrollbar-width: none; }
  .utility-inner::-webkit-scrollbar { display: none; }
  .utility-message { display: none; }
  .utility-controls { width: max-content; gap: 12px; }
  .utility-controls label { gap: 4px; }
  .utility-controls label > span { font-size: .68rem; }
  .utility-controls select { max-width: 120px; font-size: .72rem; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-logo-header { height: 42px; max-width: 160px; }
  .header-actions { gap: 14px; }
  .header-actions a { min-width: 36px; }
  .global-search { height: 46px; }
  .primary-nav { grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { font-size: clamp(2.05rem, 10vw, 3.1rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-image { min-height: 285px; background-position: 62% center; }
  html[dir="rtl"] .hero-image { background-position: 62% center; }
  .section { padding-block: 48px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 1.55rem; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { min-height: 88px; padding: 13px; grid-template-columns: auto 1fr; }
  .category-card > span:last-child { display: none; }
  .category-icon { width: 36px; height: 36px; }
  .product-grid, .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card-body { padding: 12px; }
  .product-card h3 { min-height: 40px; font-size: .9rem; }
  .product-card-meta { font-size: .65rem; }
  .delivery-line { min-height: 33px; font-size: .66rem; }
  .product-card-actions { grid-template-columns: 1fr 38px; }
  .product-card-actions .btn-primary-soft { min-height: 40px; font-size: .72rem; }
  .icon-button { width: 38px; height: 38px; }
  .deal-card { min-height: 330px; grid-template-columns: 1fr; padding: 34px 24px; }
  .deal-shapes { width: 62%; opacity: .6; }
  .deal-shapes span { width: 90px; height: 90px; inset-block-start: 58%; }
  .service-grid { grid-template-columns: 1fr; gap: 20px; }
  .page-hero { padding-block: 38px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters-panel { padding: 16px; }
  .filters-panel form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .filter-heading { grid-column: 1 / -1; }
  .shop-toolbar { grid-template-columns: 1fr auto; gap: 10px; }
  .shop-toolbar .sort-control { grid-column: 1 / -1; justify-content: space-between; }
  .sort-control select { flex: 1; min-width: 0; }
  .product-detail { grid-template-columns: 1fr; gap: 30px; }
  /* width:100% keeps the gallery on the grid track: auto inline margins alone
     would size it to its thumbnail strip and push the whole page wider than the
     phone viewport. */
  .detail-gallery { width: 100%; max-width: 560px; margin-inline: auto; }
  .detail-actions { position: sticky; inset-block-end: 73px; z-index: 20; padding: 9px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
  .cart-item { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .cart-thumb { width: 82px; grid-row: 1; }
  .cart-item-main { align-self: start; }
  .cart-unit, .cart-quantity, .cart-subtotal { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); }
  .cart-quantity .quantity-control { justify-self: end; }
  .form-grid, .delivery-options { grid-template-columns: 1fr; }
  .full-span { grid-column: auto; }
  .address-mode-switch { grid-template-columns: 1fr 1fr; }
  .address-mode-switch button { min-height: 48px; padding-inline: 8px; font-size: .78rem; }
  .paste-panel > div { align-items: flex-start; flex-direction: column; }
  .tracking-summary { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand, .newsletter { grid-column: 1 / -1; }
  .footer-legal { flex-direction: column; }
  .mobile-bottom-nav { position: fixed; z-index: 1200; inset-inline: 0; inset-block-end: 0; height: 64px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(14px); }
  .mobile-bottom-nav a { position: relative; display: grid; place-items: center; align-content: center; gap: 1px; color: var(--ink-soft); font-size: .64rem; font-weight: 800; }
  .mobile-bottom-nav a > span:first-child { color: var(--ink); font-size: 1.1rem; }
  .mobile-bottom-nav b { inset-inline-end: calc(50% - 20px); inset-block-start: 5px; }
  .toast-message { inset-block-end: 78px; }
}

@media (max-width: 420px) {
  .brand-logo-header { height: 38px; max-width: 146px; }
  .header-actions > a:first-child { display: none; }
  .hero-image { min-height: 235px; }
  .hero-proof { display: grid; }
  .category-card strong { font-size: .8rem; }
  .product-card-actions { grid-template-columns: 1fr; }
  .product-card-actions .icon-button { display: none; }
  .price-row { gap: 5px; }
  .price-row strong { font-size: 1rem; }
  .filters-panel form { grid-template-columns: 1fr; }
  .filter-heading { grid-column: auto; }
  .shop-toolbar { grid-template-columns: 1fr; }
  .shop-toolbar > span { grid-row: 2; }
  .shop-toolbar .sort-control { grid-column: auto; }
  .detail-actions { grid-template-columns: 1fr; }
  .input-action { grid-template-columns: 1fr; }
  .input-action input, html[dir="rtl"] .input-action input { border-radius: 11px 11px 0 0; }
  .input-action button, html[dir="rtl"] .input-action button { min-height: 40px; border: 1px solid var(--brand); border-radius: 0 0 11px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* PHASE 2.5 — Bright Future Commerce visual system */
body {
  background:
    radial-gradient(circle at 8% 4%, rgba(0, 191, 232, .07), transparent 24rem),
    radial-gradient(circle at 92% 14%, rgba(116, 87, 245, .055), transparent 26rem),
    var(--bg-main);
}
:focus-visible { outline-color: rgba(37, 99, 235, .34); }
.section-muted {
  background:
    linear-gradient(rgba(37, 99, 235, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .035) 1px, transparent 1px),
    linear-gradient(135deg, #f1f6ff, #f8f9ff);
  background-size: 32px 32px, 32px 32px, auto;
}
.eyebrow { color: var(--future-blue); }
.section-heading > a, .text-button, .detail-category { color: var(--future-blue); }

.utility-bar {
  border-color: rgba(137, 153, 186, .26);
  background: linear-gradient(90deg, #eef3fb, #fbfcff 52%, #eef4ff);
}
.site-header {
  border-bottom-color: rgba(138, 155, 191, .28);
  background: var(--surface-glass);
  box-shadow: 0 10px 34px rgba(26, 46, 94, .08);
}
.brand-mark {
  background: linear-gradient(145deg, var(--future-cyan), var(--future-blue) 52%, var(--future-violet));
  box-shadow: 0 8px 22px rgba(37, 99, 235, .28), inset 0 1px 0 rgba(255,255,255,.5);
}
.global-search {
  height: 54px;
  border-color: rgba(37, 99, 235, .34);
  box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(37, 99, 235, .08);
}
.global-search:focus-within { border-color: var(--future-cyan); box-shadow: var(--glow-soft); }
.global-search button { background: linear-gradient(135deg, var(--future-cyan), var(--future-blue) 62%, var(--future-violet)); }
.ai-entry {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,191,232,.1), rgba(116,87,245,.1));
  color: var(--future-cobalt);
  padding: 8px 12px;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ai-entry > span:first-child { color: var(--future-violet); font-size: 1.05rem; }
.ai-entry:hover { transform: translateY(-1px); border-color: var(--future-cyan); box-shadow: 0 8px 22px rgba(37,99,235,.15); }
.nav-row { border-top-color: rgba(138,155,191,.18); }
.category-nav { color: var(--future-cobalt); }
.primary-nav a { position: relative; }
.primary-nav a::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 7px; height: 2px; border-radius: 99px; background: linear-gradient(90deg, var(--future-cyan), var(--future-blue)); transform: scaleX(0); transition: transform .2s; }
.primary-nav a:hover::after { transform: scaleX(1); }

.ai-shop-panel {
  position: fixed;
  z-index: 1400;
  inset-block-start: 132px;
  inset-inline-end: max(20px, calc((100vw - var(--container)) / 2));
  width: min(390px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(0,191,232,.38);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(239,245,255,.94));
  box-shadow: 0 26px 70px rgba(16,24,46,.24), 0 0 36px rgba(0,191,232,.12);
  backdrop-filter: blur(18px);
}
.ai-panel-head { display: grid; grid-template-columns: 44px 1fr 34px; align-items: start; gap: 12px; }
.ai-panel-head p { margin: 0 0 3px; color: var(--future-blue); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ai-panel-head h2 { margin: 0; font-size: 1.18rem; }
.ai-panel-head button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; }
.ai-orb { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--future-cyan), var(--future-blue), var(--future-violet)); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.3); }
.ai-shop-panel > p { margin: 18px 0 12px; color: var(--text-secondary); font-size: .86rem; }
.ai-suggestions { display: grid; gap: 8px; }
.ai-suggestions a { padding: 11px 13px; border: 1px solid var(--border-light); border-radius: 12px; background: rgba(255,255,255,.8); color: var(--text-primary); font-size: .82rem; font-weight: 800; transition: border-color .2s, transform .2s, box-shadow .2s; }
.ai-suggestions a:hover { transform: translateX(2px); border-color: var(--future-cyan); box-shadow: 0 8px 20px rgba(37,99,235,.1); color: var(--future-cobalt); }
html[dir="rtl"] .ai-suggestions a:hover { transform: translateX(-2px); }

.hero-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 15%, rgba(0,191,232,.22), transparent 27rem),
    radial-gradient(circle at 84% 18%, rgba(116,87,245,.24), transparent 28rem),
    linear-gradient(135deg, #071326 0%, #0b1f43 52%, #13123a 100%);
  color: #fff;
}
.hero-section::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(101,208,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(101,208,255,.18) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg, #000, transparent 60%); pointer-events: none; }
.hero-grid { min-height: 660px; grid-template-columns: minmax(0, 1fr) minmax(460px, .95fr); gap: clamp(28px, 5vw, 74px); }
.hero-copy { padding-block: 70px; }
.hero-copy .eyebrow { color: #72e8ff; text-shadow: 0 0 18px rgba(0,191,232,.4); }
.hero-copy h1 { max-width: 720px; margin-bottom: 18px; background: linear-gradient(110deg, #fff 8%, #d9f8ff 50%, #ded8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text { color: #c5d5ee; }
.hero-search {
  max-width: 690px;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 6px 7px 6px 18px;
  border: 1px solid rgba(114,232,255,.62);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 0 0 5px rgba(0,191,232,.08), 0 22px 54px rgba(0,0,0,.28);
}
.hero-search > span { color: var(--future-violet); font-size: 1.15rem; }
.hero-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font-size: 1rem; }
.hero-search button { min-height: 54px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--future-cyan), var(--future-blue)); color: #fff; padding-inline: 22px; font-weight: 900; cursor: pointer; }
.trending-links { display: flex; flex-wrap: wrap; gap: 9px 15px; margin-top: 15px; color: #aebfd9; font-size: .76rem; }
.trending-links > span { color: #fff; font-weight: 900; }
.trending-links a { color: #aeeeff; }
.hero-actions { margin-block: 26px 20px; }
.hero-proof { color: #b8c7dc; }
.hero-proof li span:first-child { color: var(--future-cyan); }
.hero-image {
  position: relative;
  align-self: center;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(151,220,255,.36);
  border-radius: 38px;
  background: url("../assets/img/global-mall-ai-future-hero-clean.webp") center / cover no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 30px 80px rgba(0,0,0,.34), 0 0 55px rgba(0,191,232,.16);
}
.hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,14,34,.38)); pointer-events: none; }
html[dir="rtl"] .hero-image { border-radius: 38px; transform: none; }
.hero-signal { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid rgba(168,225,255,.46); border-radius: 14px; background: rgba(7,19,38,.72); color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.25); backdrop-filter: blur(12px); font-size: .75rem; }
.hero-signal span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, var(--future-cyan), var(--future-violet)); }
.signal-ai { inset-block-start: 24px; inset-inline-start: 24px; }
.signal-global { inset-block-start: 42%; inset-inline-end: 20px; }
.signal-fast { inset-block-end: 24px; inset-inline-start: 28px; }

.btn-primary, .btn-secondary, .btn-primary-soft, .btn-link, .btn-future { transition: transform .2s, background .2s, color .2s, box-shadow .2s, border-color .2s; }
.btn-primary {
  background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange) 52%, var(--commerce-coral));
  color: #fff;
  box-shadow: 0 10px 24px rgba(255,100,44,.24), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #ffd15e, #ff713c 52%, #ff5261); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,100,44,.34); }
.btn-secondary { background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange)); color: #1d1730; }
.btn-secondary:hover { background: linear-gradient(135deg, #ffd96f, #ff7540); color: #17101f; transform: translateY(-2px); }
.btn-primary-soft { border-color: rgba(37,99,235,.2); background: var(--brand-pale); color: var(--future-cobalt); }
.btn-primary-soft:hover { background: #d8efff; color: var(--future-cobalt); }
.btn-future { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(114,232,255,.55); border-radius: 999px; background: rgba(0,191,232,.1); color: #dffaff; padding: 10px 20px; font-weight: 900; cursor: pointer; }
.btn-future:hover { transform: translateY(-2px); background: rgba(0,191,232,.2); box-shadow: 0 0 24px rgba(0,191,232,.18); }

.category-card, .product-card, .filters-panel, .cart-item, .order-card, .checkout-section, .simple-card {
  border-color: rgba(151,169,204,.34);
  background: linear-gradient(145deg, #fff, #fbfcff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 30px rgba(31,52,105,.055);
}
.category-card { overflow: hidden; position: relative; }
.category-card::before { content: ""; position: absolute; inset-inline: 16px; inset-block-start: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--future-cyan), transparent); opacity: .65; }
.category-card:hover { border-color: rgba(0,191,232,.58); box-shadow: var(--glow-soft); }
.category-icon { background: linear-gradient(145deg, #e3faff, #e9e6ff); color: var(--future-blue); }
.product-card { position: relative; }
.product-card::before { content: ""; position: absolute; z-index: 2; inset-block-start: 0; inset-inline: 16%; height: 2px; width: 68%; background: linear-gradient(90deg, transparent, var(--future-cyan), transparent); opacity: 0; transition: opacity .2s; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(0,191,232,.45); box-shadow: 0 22px 50px rgba(31,52,105,.16); }
.product-card:hover::before { opacity: 1; }
.product-media { background-color: #f4f6fb; }
.discount-badge { background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange), var(--commerce-coral)); box-shadow: 0 7px 18px rgba(255,100,44,.28); }
.price-row strong, .detail-price strong { color: var(--commerce-coral); font-weight: 900; }
.price-row strong { font-size: 1.24rem; }
.product-card-actions .btn-primary-soft { border: 0; background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange) 60%, var(--commerce-coral)); color: #fff; box-shadow: 0 8px 20px rgba(255,100,44,.2); }
.product-card-actions .btn-primary-soft:hover { background: linear-gradient(135deg, #ffd15e, #ff713c 60%, #ff5261); color: #fff; transform: translateY(-1px); }
.icon-button:hover { border-color: var(--future-cyan); color: var(--future-blue); box-shadow: 0 8px 18px rgba(37,99,235,.12); }

.ai-picks-section { position: relative; }
.ai-picks-section::before { content: "AI"; position: absolute; inset-block-start: 10px; inset-inline-end: 3vw; color: rgba(37,99,235,.045); font-size: clamp(7rem, 17vw, 16rem); font-weight: 950; line-height: 1; pointer-events: none; }
.deal-card {
  border: 1px solid rgba(100,214,255,.26);
  background: radial-gradient(circle at 72% 45%, rgba(116,87,245,.28), transparent 28%), linear-gradient(135deg, #071326, #0c2349 62%, #1c143f);
  box-shadow: 0 28px 70px rgba(16,24,46,.2);
}
.deal-card .eyebrow { color: #76ebff; }
.deal-shapes { background: radial-gradient(circle at 70% 50%, rgba(255,100,44,.82), transparent 34%), radial-gradient(circle at 35% 30%, rgba(0,191,232,.82), transparent 30%); }
.deal-card .btn-secondary { background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange)); color: #21152c; }
.service-grid article > span { background: linear-gradient(145deg, #e3faff, #eae6ff); color: var(--future-blue); }

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 82% 20%, rgba(0,191,232,.13), transparent 20rem), linear-gradient(135deg, #f8fbff, #eaf1fb 55%, #f4f0ff);
}
.page-hero::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 44%; opacity: .25; background-image: linear-gradient(rgba(37,99,235,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.12) 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.page-hero .site-container { position: relative; z-index: 1; }
.filters-panel { box-shadow: 0 16px 42px rgba(31,52,105,.08); }
.check-row input, .range-label input, .delivery-options input { accent-color: var(--future-blue); }
.shop-search input:focus, .sort-control select:focus { border-color: var(--future-cyan); box-shadow: 0 0 0 4px rgba(0,191,232,.1); outline: 0; }
.pagination button.active { border-color: var(--future-blue); background: linear-gradient(135deg, var(--future-cyan), var(--future-blue)); }
.detail-gallery { border: 1px solid rgba(151,169,204,.34); box-shadow: var(--shadow-soft); }
.detail-price strong { font-size: 2.25rem; }
.option-chip.active { border-color: var(--future-blue); background: var(--brand-pale); color: var(--future-cobalt); box-shadow: inset 0 0 0 1px var(--future-blue); }
.delivery-callout, .shipping-note, .payment-placeholder { background: linear-gradient(135deg, #eef8ff, #f2f0ff); color: var(--text-secondary); }
.summary-row.total strong { color: var(--commerce-coral); font-size: 1.2rem; }
.order-card .btn-primary { min-height: 50px; }

.checkout-layout { position: relative; }
.checkout-heading > span { background: linear-gradient(145deg, #dffaff, #e9e5ff); color: var(--future-cobalt); box-shadow: 0 6px 16px rgba(37,99,235,.12); }
.field input:focus, .field select:focus, .paste-panel textarea:focus { border-color: var(--future-cyan); box-shadow: 0 0 0 4px rgba(0,191,232,.11); }
.paste-panel { border: 1px solid rgba(0,191,232,.26); background: radial-gradient(circle at 100% 0, rgba(116,87,245,.1), transparent 13rem), linear-gradient(135deg, #eefaff, #f6f4ff); }
.smart-parse-label { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.smart-parse-label > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, var(--future-cyan), var(--future-blue), var(--future-violet)); color: #fff; box-shadow: 0 7px 18px rgba(37,99,235,.22); }
.smart-parse-label label { margin-inline-end: auto; font-weight: 900; }
.smart-parse-label em { border: 1px solid rgba(37,99,235,.2); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--future-cobalt); padding: 4px 9px; font-size: .7rem; font-style: normal; font-weight: 900; }
.paste-panel > div:not(.smart-parse-label) { display: flex; align-items: center; gap: 14px; }
.address-card { border-color: rgba(37,99,235,.28); background: linear-gradient(135deg, #f1f9ff, #f7f5ff); }
.address-card-top > span { color: var(--future-blue); }
.delivery-options label:has(input:checked) { border-color: var(--future-blue); background: linear-gradient(135deg, #eef8ff, #f4f2ff); box-shadow: 0 8px 22px rgba(37,99,235,.09); }
.place-order { background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange) 55%, var(--commerce-coral)); box-shadow: 0 12px 26px rgba(255,100,44,.3); }
.place-order:hover { box-shadow: 0 16px 34px rgba(255,100,44,.4); }
.order-confirmation { border-color: rgba(22,133,91,.32); background: #f2fbf7; }

.tracking-summary div { border: 1px solid rgba(37,99,235,.12); background: linear-gradient(135deg, #eef8ff, #f5f2ff); }
.tracking-timeline::before { background: linear-gradient(var(--future-cyan), var(--future-blue), var(--border-light)); }
.tracking-timeline li.done > span { border-color: var(--future-blue); background: linear-gradient(145deg, var(--future-cyan), var(--future-blue)); }
.tracking-timeline li.current > span { border-color: var(--commerce-orange); color: var(--commerce-orange); box-shadow: 0 0 0 6px var(--accent-pale); }
.prototype-callout { border: 1px solid rgba(37,99,235,.14); background: linear-gradient(135deg, #eef8ff, #f5f2ff); color: var(--future-cobalt); }

.contact-intro { max-width: 720px; margin-bottom: 24px; color: var(--text-secondary); font-size: 1.04rem; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.contact-card { min-width: 0; padding: 24px; border: 1px solid rgba(151,169,204,.34); border-radius: var(--radius); background: linear-gradient(145deg, #fff, #f7faff); box-shadow: var(--shadow-soft); }
.contact-card > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 13px; background: linear-gradient(145deg, var(--future-cyan), var(--future-blue)); color: #fff; font-weight: 900; }
.contact-card h2 { margin-bottom: 10px; font-size: 1rem; }
.contact-card a, .contact-card p { margin: 0; overflow-wrap: anywhere; color: var(--future-cobalt); font-weight: 800; }
.contact-card a:hover { color: var(--commerce-orange); }
.contact-response { margin: 24px 0 0; color: var(--text-secondary); }

.site-footer { background: radial-gradient(circle at 80% 10%, rgba(116,87,245,.22), transparent 24rem), linear-gradient(135deg, #071326, #0b1e40); }
.newsletter input { border-color: rgba(111,152,210,.35); background: rgba(14,35,72,.75); }
.newsletter button { background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange)); color: #1b1830; }
.footer-legal { border-top-color: rgba(122,153,204,.24); }
.mobile-bottom-nav { border-top-color: rgba(138,155,191,.26); background: rgba(251,253,255,.95); }

@media (max-width: 1100px) {
  .header-main { grid-template-columns: 180px minmax(250px,1fr) minmax(230px,auto); }
  .hero-grid { grid-template-columns: minmax(0,1fr) minmax(390px,.9fr); }
  .hero-image { min-height: 500px; }
}

@media (max-width: 900px) {
  .header-main { grid-template-columns: 1fr auto; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 40px; }
  .hero-copy { padding-block: 18px 10px; }
  .hero-image { width: 100%; min-height: 430px; border-radius: 28px; }
  html[dir="rtl"] .hero-image { border-radius: 28px; }
  .ai-shop-panel { inset-block-start: 156px; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .site-header { backdrop-filter: blur(10px); }
  .utility-inner { width: min(calc(100% - 24px), var(--container)); max-width: calc(100% - 24px); padding-inline: 0; }
  .header-main { gap: 10px; }
  .header-actions { gap: 6px; }
  .global-search { height: 50px; }
  .ai-entry { min-width: 38px; width: 38px; height: 38px; justify-content: center; padding: 0; }
  .ai-entry > span:last-child { display: none; }
  .hero-section::before { background-size: 32px 32px; }
  .hero-grid { padding-block: 22px 34px; }
  .hero-copy { padding-block: 10px 8px; }
  .hero-search { min-height: 60px; border-radius: 18px; padding-inline-start: 14px; }
  .hero-search button { min-height: 48px; border-radius: 14px; padding-inline: 15px; }
  .hero-actions { flex-direction: row; align-items: center; gap: 10px; }
  .hero-image { min-height: 340px; background-position: 54% center; }
  .hero-signal { padding: 8px 10px; font-size: .67rem; }
  .signal-ai { inset-block-start: 14px; inset-inline-start: 14px; }
  .signal-global { inset-inline-end: 12px; }
  .signal-fast { inset-block-end: 14px; inset-inline-start: 14px; }
  .ai-shop-panel { inset-block-start: 150px; inset-inline: 12px; width: auto; max-height: calc(100vh - 170px); overflow-y: auto; backdrop-filter: blur(12px); }
  .product-card:hover { transform: translateY(-2px); }
  .filters-panel form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .filters-panel fieldset:first-of-type { grid-column: 1 / -1; }
  [data-filter-categories], [data-filter-tags] { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px 8px; scrollbar-width: thin; }
  [data-filter-categories] .check-row, [data-filter-tags] .check-row { flex: 0 0 auto; align-items: center; margin: 0; border: 1px solid var(--border-light); border-radius: 999px; background: #fff; padding: 8px 11px; white-space: nowrap; }
  [data-filter-categories] .check-row input, [data-filter-tags] .check-row input { margin-block-start: 0; }
  [data-filter-tags] .filter-group { display: contents; }
  [data-filter-tags] .filter-group-title { flex: 0 0 auto; align-self: center; margin: 0 4px 0 0; font-size: .78rem; font-weight: 900; color: var(--ink-soft); white-space: nowrap; }
  .detail-actions { background: rgba(255,255,255,.95); box-shadow: 0 16px 36px rgba(31,52,105,.18); }
}

@media (max-width: 430px) {
  .contact-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: clamp(2rem, 11vw, 2.8rem); }
  .hero-search { grid-template-columns: auto minmax(0,1fr); padding: 9px 11px; }
  .hero-search button { grid-column: 1 / -1; width: 100%; }
  .trending-links { gap: 8px 12px; }
  .hero-actions > * { flex: 1; padding-inline: 12px; }
  .hero-image { min-height: 270px; }
  .hero-signal { max-width: 145px; }
  .signal-global { inset-block-start: 45%; }
  .ai-panel-head { grid-template-columns: 38px 1fr 32px; }
  .ai-orb { width: 38px; height: 38px; border-radius: 12px; }
  .filters-panel form { grid-template-columns: 1fr 1fr; }
  .filters-panel fieldset:first-of-type { grid-column: 1 / -1; }
}

@media (max-width: 375px) {
  .hero-search > span { display: none; }
  .hero-search { grid-template-columns: 1fr; }
  .hero-search button { grid-column: auto; }
  .hero-image { min-height: 245px; }
  .hero-signal { font-size: .61rem; padding: 6px 8px; }
  .hero-signal span { width: 22px; height: 22px; }
}

/* PHASE 2.6 — one branded AI Search and functional discovery nodes */
.header-main {
  grid-template-columns: minmax(190px, .62fr) minmax(430px, 1.75fr) minmax(145px, .42fr);
  gap: 26px;
}
.global-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 58px;
  align-items: center;
  overflow: hidden;
}
.ai-search-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: stretch;
  padding-inline: 17px 13px;
  border-inline-end: 1px solid rgba(37, 99, 235, .16);
  background: linear-gradient(135deg, rgba(0,191,232,.1), rgba(116,87,245,.08));
  color: var(--future-cobalt);
  font-size: .78rem;
  white-space: nowrap;
}
.ai-search-label > span { color: var(--future-violet); font-size: 1rem; }
.global-search input { width: 100%; padding-inline: 16px; }
.global-search button { width: 58px; height: 100%; }

.hero-grid {
  min-height: 610px;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  gap: clamp(34px, 5vw, 72px);
}
.hero-copy { padding-block: 64px; }
.hero-copy h1 { max-width: 760px; }
.hero-text { max-width: 630px; }
.hero-actions { margin-block: 28px 0; }
.hero-visual { position: relative; align-self: center; min-width: 0; }
.hero-image {
  width: 100%;
  min-height: 480px;
  border-radius: 34px;
}
.hero-image::after {
  background: linear-gradient(180deg, rgba(5,14,34,.12), rgba(5,14,34,.38));
}
html[dir="rtl"] .hero-image { border-radius: 34px; }
.discovery-nodes { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.discovery-node {
  position: absolute;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 180px;
  border: 1px solid rgba(127, 225, 255, .62);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(7,19,38,.88), rgba(21,35,76,.78));
  color: #fff;
  padding: 8px 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(12px);
  font-size: .72rem;
  line-height: 1.2;
  pointer-events: auto;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.discovery-node > span {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--future-cyan), var(--future-blue), var(--future-violet));
  color: #fff;
}
.discovery-node:hover,
.discovery-node:focus-visible {
  color: #fff;
  transform: translateY(-3px) scale(1.025);
  border-color: #b5f4ff;
  background: linear-gradient(135deg, rgba(8,31,66,.96), rgba(36,31,93,.92));
  box-shadow: 0 17px 40px rgba(0,0,0,.32), 0 0 24px rgba(0,191,232,.25);
}
.node-home { inset-block-start: 22px; inset-inline-start: 20px; }
.node-beauty { inset-block-start: 22px; inset-inline-end: 20px; }
.node-electronics { inset-block-start: 42%; inset-inline-start: 18px; }
.node-outdoor { inset-block-start: 42%; inset-inline-end: 18px; }
.node-trending { inset-block-end: 22px; inset-inline-start: 20px; }
.node-recommendation { inset-block-end: 22px; inset-inline-end: 20px; }

@media (max-width: 1100px) {
  .header-main { grid-template-columns: 180px minmax(330px, 1fr) 120px; gap: 18px; }
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(330px, 1fr); gap: 30px; }
  .hero-image { min-height: 450px; }
  .discovery-node { max-width: 150px; padding: 7px 9px; }
}

@media (max-width: 900px) {
  .header-main { grid-template-columns: 1fr auto; gap: 12px; }
  .global-search { grid-column: 1 / -1; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 34px 46px; }
  .hero-copy { padding-block: 10px 0; }
  .hero-visual { width: min(100%, 680px); margin-inline: auto; }
  .hero-image { min-height: 420px; }
}

@media (max-width: 768px) {
  .hero-grid { gap: 16px; }
  .hero-image { min-height: 260px; border-radius: 24px; }
  html[dir="rtl"] .hero-image { border-radius: 24px; }
  .discovery-nodes {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
    margin-top: 10px;
  }
  .discovery-node {
    position: static;
    min-width: 0;
    max-width: none;
    min-height: 54px;
    justify-content: flex-start;
    border-color: rgba(127,225,255,.42);
    background: rgba(9,29,62,.86);
    padding: 8px 9px;
    font-size: .68rem;
  }
  .discovery-node > span { flex-basis: 27px; width: 27px; height: 27px; }
}

@media (max-width: 767px) {
  .ai-search-label { padding-inline: 12px 9px; font-size: .7rem; }
  .global-search { grid-template-columns: auto minmax(0,1fr) 52px; }
  .global-search button { width: 52px; }
  .hero-actions { flex-direction: row; align-items: center; }
}

@media (max-width: 430px) {
  .global-search { grid-template-columns: auto minmax(0,1fr) 48px; }
  .ai-search-label { gap: 5px; padding-inline: 9px 7px; }
  .ai-search-label > span { font-size: .85rem; }
  .global-search input { padding-inline: 9px; font-size: .8rem; }
  .global-search button { width: 48px; }
  .hero-image { min-height: 220px; }
  .discovery-nodes { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 375px) {
  .ai-search-label { font-size: .66rem; }
  .global-search input { font-size: .76rem; }
  .discovery-node { font-size: .64rem; }
}

/* Lightweight loading placeholders: layout only, removed as soon as real API data arrives. */
.product-skeleton,
.detail-skeleton { pointer-events: none; }
.product-skeleton .skeleton-media,
.detail-skeleton .skeleton-media,
.skeleton-line {
  display: block;
  overflow: hidden;
  position: relative;
  background: linear-gradient(110deg, #edf1f7 8%, #f8faff 18%, #edf1f7 33%);
  background-size: 220% 100%;
  animation: skeleton-shift 1.35s linear infinite;
}
.product-skeleton .skeleton-media { aspect-ratio: 1.156 / 1; }
.skeleton-line { height: 12px; margin-block: 8px; border-radius: 999px; }
.skeleton-line.short { width: 38%; }
.skeleton-line.title { width: 78%; height: 18px; }
.skeleton-line.heading { width: 72%; height: 34px; margin-block: 18px; }
.skeleton-line.price { width: 44%; height: 24px; }
.skeleton-line.paragraph { width: 94%; }
.skeleton-line.action { width: 58%; height: 42px; margin-top: 20px; border-radius: 12px; }
.detail-skeleton { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); width: 100%; }
.detail-skeleton .skeleton-media { min-height: 420px; border-radius: 24px; }
@keyframes skeleton-shift { to { background-position-x: -220%; } }
@media (prefers-reduced-motion: reduce) {
  .product-skeleton .skeleton-media,
  .detail-skeleton .skeleton-media,
  .skeleton-line { animation: none; }
}
@media (max-width: 768px) {
  .detail-skeleton { grid-template-columns: 1fr; }
  .detail-skeleton .skeleton-media { min-height: 280px; }
}

/* AI Search live CJ snapshots (V0).
   Temporary, read-only supplier products: same card language as the catalogue,
   clearly marked as realtime and deliberately without cart/checkout actions. */
.realtime-results { margin-bottom: 30px; }
.realtime-tier-heading { grid-column: 1 / -1; margin: 8px 0 2px; color: var(--text-primary); font-size: 1rem; font-weight: 800; }
.realtime-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.realtime-header h2 { margin: 0; font-size: 1.05rem; }
.realtime-header p { margin: 0; color: var(--text-secondary); font-size: .8rem; }
.realtime-hint { margin: 0 0 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; color: var(--text-secondary); font-size: .82rem; }
.realtime-product-card { border-style: dashed; }
.realtime-product-card:hover { transform: none; box-shadow: none; }
.realtime-product-card .product-media { cursor: default; }
.realtime-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: linear-gradient(135deg, var(--commerce-gold), var(--commerce-orange)); color: #211834; font-weight: 900; font-size: .66rem; letter-spacing: .02em; }
.realtime-product-card .product-card-meta > span:last-child { color: var(--future-blue); font-weight: 800; }
.realtime-card-meta { margin: 6px 0 0; color: var(--text-secondary); font-size: .74rem; line-height: 1.5; overflow-wrap: anywhere; }
.realtime-card-range { color: var(--text-primary); font-weight: 700; }
.realtime-card-why { color: var(--text-secondary); font-style: italic; }
/* Progressive title localisation: the localised title is clamped so a longer
   translation can never make the card jump, and the original supplier title
   stays visible as a small secondary line. */
.realtime-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em; }
.realtime-card-original { margin: 4px 0 0; color: var(--text-secondary); font-size: .7rem;
  line-height: 1.4; overflow-wrap: anywhere; }
.realtime-card-original[hidden] { display: none; }
/* Non-blocking search sorting hint: full-width readable status with a subtle continuous pulse. */
.realtime-exploring-note {
  box-sizing: border-box; display: block; width: 100%; max-width: 100%;
  margin: 0 0 14px; padding: 10px 13px;
  border: 1px solid rgba(42, 110, 223, .42); border-radius: 10px;
  background: rgba(42, 110, 223, .09); color: #174a9b;
  font-size: .95rem; font-weight: 800; line-height: 1.5;
  letter-spacing: .005em; overflow-wrap: anywhere;
  animation: arvonelia-sort-hint-pulse 1.3s ease-in-out infinite;
}
.realtime-exploring-note::before {
  content: ""; display: inline-block; vertical-align: .09em;
  width: 8px; height: 8px; margin-inline-end: 8px;
  border-radius: 50%; background: currentColor;
  animation: arvonelia-sort-hint-dot 1.3s ease-in-out infinite;
}
@keyframes arvonelia-sort-hint-pulse {
  0%, 100% { background: rgba(42, 110, 223, .06); box-shadow: 0 0 0 0 rgba(42, 110, 223, .02); }
  50% { background: rgba(42, 110, 223, .17); box-shadow: 0 0 0 3px rgba(42, 110, 223, .09); }
}
@keyframes arvonelia-sort-hint-dot {
  0%, 100% { opacity: .38; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .realtime-exploring-note, .realtime-exploring-note::before { animation: none; }
}
/* AI Demand Explorer V2: waiting feedback as one clear status bar under the
   search/result area.  No fake percentage: a breathing dot plus a full-width
   4px flow bar.  After the first batch the bar steps back (is-soft) but stays
   visible until the exploration really finished, and the block keeps a fixed
   minimum height so the page never jumps. */
.realtime-progress { margin: 0 0 16px; padding: 14px 16px 12px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(16, 24, 46, .06); min-height: 74px; }
.realtime-progress[hidden] { display: none; }
.realtime-progress-row { display: flex; align-items: center; gap: 10px; }
.realtime-progress-text { color: var(--text-primary); font-size: 17px; font-weight: 600;
  line-height: 1.45; letter-spacing: .01em; }
.realtime-progress-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  background: var(--future-blue, #4f7cf7); box-shadow: 0 0 0 4px rgba(79, 124, 247, .14);
  animation: realtime-breathe 1.6s ease-in-out infinite; }
.realtime-progress-track { display: block; margin-top: 12px; height: 4px; border-radius: 999px;
  overflow: hidden; background: rgba(33, 24, 52, .10); }
.realtime-progress-bar { display: block; height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 124, 247, .15), var(--future-blue, #4f7cf7),
  rgba(79, 124, 247, .15));
  animation: realtime-sweep 1.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.realtime-progress.is-soft { opacity: .9; min-height: 58px; padding: 10px 16px 10px;
  background: rgba(79, 124, 247, .07); border-color: transparent; box-shadow: none; }
.realtime-progress.is-soft .realtime-progress-text { font-size: 15px; font-weight: 500;
  color: var(--text-secondary); }
.realtime-progress.is-soft .realtime-progress-dot { width: 8px; height: 8px; opacity: .8;
  box-shadow: none; }
.realtime-progress.is-soft .realtime-progress-track { height: 3px; margin-top: 8px; }
.realtime-progress.is-soft .realtime-progress-bar { width: 100%; animation: none;
  background: linear-gradient(90deg, rgba(79, 124, 247, .35), rgba(79, 124, 247, .18)); }
/* Local "for you" block under the live AI results (published products only). */
.shop-recommend-heading { margin: 6px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.shop-recommend-heading[hidden] { display: none; }
.shop-recommend-heading h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.realtime-sheet-original { margin: 2px 0 0; color: var(--text-secondary); font-size: .78rem;
  line-height: 1.45; overflow-wrap: anywhere; }
.realtime-sheet-original[hidden] { display: none; }
@keyframes realtime-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes realtime-breathe {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.06); }
}
@media (max-width: 767px) {
  /* Mobile first: the same bar, still clearly readable and tappable-free. */
  .realtime-progress { padding: 12px 14px 10px; min-height: 70px; }
  .realtime-progress-text { font-size: 16px; }
  .realtime-progress.is-soft { min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .realtime-progress-bar { animation: none; transform: none; width: 100%;
    background: linear-gradient(90deg, rgba(79, 124, 247, .45), rgba(79, 124, 247, .15)); }
  .realtime-progress-dot { animation: none; opacity: .8; }
}

/* Instant Purchase V1: live detail overlay, buy now and checkout prepare.
   Mobile-first: the sheet is a full-screen layer that paints from the card
   snapshot before any supplier request finishes. */
.realtime-product-card[data-realtime-open] { cursor: pointer; }
.realtime-product-card[data-realtime-open]:focus-visible { outline: 2px solid var(--future-blue); outline-offset: 2px; }
.realtime-card-open { color: var(--future-blue); font-weight: 800; }
/* A live snapshot the explorer already materialized links to its formal,
   durable Aurenqo product page (single.html?id=<product_slug>). */
.realtime-card-stable { display: block; color: var(--future-blue); font-weight: 800; text-decoration: none; }
.realtime-card-stable:hover { text-decoration: underline; }
.realtime-sheet-stable { margin-top: 10px; }
/* Order history: the formal Aurenqo product page of an already purchased item
   (the order keeps its own immutable snapshot, this is only a way back). */
.order-item-media { display: block; }
.order-item-link { display: inline-block; margin-top: 6px; color: var(--future-blue); font-weight: 800; font-size: .84rem; }
/* Realtime Search V2: the automatic list ends at its total - continuing is an
   explicit shopper action, never an endless scroll. */
.realtime-more { display: grid; justify-items: center; gap: 8px; margin-top: 22px; }
.realtime-more-button { min-width: 190px; }
.realtime-more-note { margin: 0; color: var(--text-secondary); font-size: .84rem; }
/* Shop formal-catalogue search: a small magnifier inside the field, doing
   exactly what the keyboard's own search key does. */
.shop-search { position: relative; display: block; }
.shop-search input { padding-inline-end: 48px; }
.shop-search-button { position: absolute; inset-block-start: 50%; inset-inline-end: 6px; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.shop-search-button:hover { background: var(--brand-dark); color: #fff; }

/* The overlay is a centred, height-bounded panel: left media column, right info
   column.  The image can never escape its column (no viewport-sized media, no
   body-lock-without-inner-scroll state). */
.realtime-overlay { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center;
  justify-content: center; background: rgba(16, 24, 46, .55); padding: 24px; overflow: hidden; }
.realtime-overlay[hidden] { display: none; }
.realtime-sheet { display: flex; flex-direction: column; width: min(1180px, 100%); max-height: 88vh;
  height: auto; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(16, 24, 46, .28); }
.realtime-sheet-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.realtime-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--text-primary); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.realtime-sheet-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 45% 55%; }
.realtime-sheet-media { min-width: 0; min-height: 0; overflow: auto; padding: 18px;
  background: #f7f9fd; border-inline-end: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: center; }
.realtime-sheet-info { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 22px 24px; }
.realtime-gallery { width: 100%; max-width: 520px; }
.realtime-gallery-main { position: relative; border-radius: 16px; overflow: hidden; background: #fff; }
.realtime-gallery-main img { position: static; width: 100%; height: auto; max-height: 68vh;
  object-fit: contain; display: block; margin: 0 auto; }
.realtime-gallery-strip { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.realtime-thumb { width: 58px; height: 58px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.realtime-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.realtime-sheet h2 { margin: 14px 0 6px; font-size: 1.1rem; }
.realtime-sheet-note { margin: 4px 0 0; color: var(--text-secondary); font-size: .78rem; }
.realtime-sheet-weight { margin: 6px 0 0; color: var(--text-secondary); font-size: .8rem; font-weight: 700; }
.realtime-sheet-status { margin: 10px 0 0; color: var(--future-blue); font-size: .84rem; font-weight: 800; }
.realtime-variants { display: grid; gap: 8px; margin-top: 12px; }
.realtime-variants-loading { margin: 0; color: var(--text-secondary); font-size: .82rem; }
.realtime-variant { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text-primary); font-size: .86rem; text-align: start; cursor: pointer; }
.realtime-variant.active { border-color: var(--future-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, .14); }
.realtime-variant:disabled { opacity: .5; cursor: not-allowed; }
.realtime-variant-meta { color: var(--text-secondary); font-weight: 800; white-space: nowrap; }
.realtime-buy { margin-top: 16px; }
.realtime-sheet-message { margin: 10px 0 0; color: var(--commerce-coral); font-size: .84rem; font-weight: 700; }
body.realtime-sheet-open { overflow: hidden; }
body.realtime-sheet-open .back-to-top,
body.realtime-sheet-open .aurenqo-support,
body.realtime-sheet-open .mobile-bottom-nav {
  display: none !important;
}
/* Mobile first: the media column moves above the info column, the image is
   capped at ~40vh, the sheet itself scrolls and "buy now" stays reachable. */
@media (max-width: 900px) {
  .realtime-overlay { padding: 0; align-items: stretch; }
  .realtime-sheet { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .realtime-sheet-body { display: flex; flex-direction: column; overflow-y: auto;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .realtime-sheet-media { flex: 0 0 auto; overflow: visible; padding: 12px 14px 0;
    background: transparent; border-inline-end: 0; }
  .realtime-gallery { max-width: none; }
  .realtime-gallery-main img { max-height: 40vh; }
  .realtime-sheet-info { overflow: visible; padding: 12px 14px 18px; }
  .realtime-buy { position: sticky; inset-block-end: 0; z-index: 2; padding: 10px 0 12px;
    background: #fff; box-shadow: 0 -8px 18px rgba(16, 24, 46, .08); }
  .realtime-variant { padding: 13px 14px; }
}

.checkout-intent-notice { margin: 0 auto 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.checkout-intent-notice[hidden] { display: none; }
.checkout-intent-status { margin: 0; color: var(--future-blue); font-weight: 800; font-size: .9rem; }
.checkout-intent-detail { margin: 6px 0 0; color: var(--text-secondary); font-size: .84rem; }

/* --------------------------------------------------------------------------
   Purchase Closed Loop V1 - cart selection, saved address, direct purchase.
   Mobile first: every purchase control is a thumb-sized target and the cart is
   a stacked list, never a desktop table squeezed onto a phone.
   -------------------------------------------------------------------------- */
.cart-item { grid-template-columns: 44px 118px minmax(180px, 1fr) 110px 140px 110px; }
.cart-select { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.cart-select input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cart-select-box { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--line);
  border-radius: 9px; background: #fff; color: transparent; font-size: .9rem; font-weight: 900; line-height: 1; }
.cart-select input:checked + .cart-select-box { border-color: var(--brand); background: var(--brand); color: #fff; }
.cart-select input:focus-visible + .cart-select-box { outline: 2px solid var(--future-blue); outline-offset: 2px; }
.cart-item.is-selected { border-color: rgba(37, 99, 235, .3); }
.cart-item:not(.is-selected) .cart-thumb,
.cart-item:not(.is-selected) .cart-item-main > h2,
.cart-item:not(.is-selected) .cart-subtotal strong { opacity: .6; }
.cart-selection { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cart-selection[hidden] { display: none; }
.cart-select-all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; cursor: pointer; }
.cart-select-all input { width: 22px; height: 22px; accent-color: var(--brand); }
.cart-selected-count { color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.cart-selection-note { margin: 10px 0 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.6; }

/* ------------------------------------------------------------------ Trash V1
   One small control is added to the cart and to "my orders", and the trash page
   reuses the existing cards, checkbox, button and mobile shell.  Nothing here
   introduces a second component language. */
.cart-selection .btn-primary-soft { min-height: 40px; padding-inline: 14px; white-space: nowrap; }
.cart-selection[hidden] { display: none; }
.trash-entry, .trash-back { margin: 12px 0 0; text-align: end; }
.trash-entry a, .trash-back a { color: var(--future-blue); font-weight: 800; font-size: .84rem; }
/* The "my orders" heading row: the panel's own title with the one small link the
   shopper needs next to it (the same link style the cart page uses). */
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.panel-head h2 { margin: 0; }
.panel-head-link { color: var(--future-blue); font-weight: 800; font-size: .84rem; white-space: nowrap; }
.account-order-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem; align-items: start; }
.account-order-row.is-selected .account-order-card { border-color: rgba(37, 99, 235, .35); }
.account-order-select, .account-order-select-spacer { align-self: start; }
.account-order-select-spacer { display: block; width: 44px; }
.account-order-row .account-order-card { display: block; }
.trash-layout { display: grid; gap: 1.25rem; padding-block: 1rem 5rem; }
.trash-panel { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; }
.trash-panel[hidden] { display: none; }
.trash-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.trash-panel-head h2 { margin: 0; }
.trash-selection { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.trash-selection[hidden] { display: none; }
.trash-selection-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.trash-selection-buttons button { min-height: 40px; padding-inline: 14px; }
.trash-list { display: grid; gap: .75rem; }
.trash-item { display: flex; gap: .75rem; align-items: flex-start;
  padding: .75rem; border: 1px solid #e2e8f0; border-radius: 1rem; }
.trash-item .cart-thumb { width: 64px; height: 64px; }
.trash-item-main { display: grid; gap: .25rem; min-width: 0; flex: 1 1 auto; }
.trash-item-main h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.trash-item-main p { margin: 0; color: #64748b; font-size: .82rem; }
.trash-item-main strong { font-size: 1rem; }
.trash-item-warning { color: #9a3412 !important; }
.trash-item-actions { display: flex; gap: 1rem; margin-top: .25rem; }
.trash-item-actions .text-button.danger { color: #b91c1c; }
.trash-empty { margin: 0; padding: 1rem 0; color: var(--ink-soft); font-size: .86rem; }
.trash-empty[hidden] { display: none; }
.trash-signin { margin: 0; color: var(--ink-soft); font-size: .86rem; }
.trash-signin[hidden] { display: none; }
.trash-panel .account-order-meta { justify-content: flex-start; }

.saved-addresses { display: grid; gap: 10px; margin-bottom: 18px; }
.saved-addresses[hidden] { display: none; }
.saved-addresses h3 { margin: 0; font-size: .95rem; }
.saved-address-list { display: grid; gap: 10px; }
.saved-address-card { display: grid; gap: 3px; width: 100%; min-height: 78px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: inherit; text-align: start; cursor: pointer; }
.saved-address-card strong { font-size: .95rem; }
.saved-address-card small, .saved-address-card span { color: var(--ink-soft); font-size: .8rem; }
.saved-address-card em { justify-self: start; margin-top: 2px; padding: 2px 8px; border-radius: 99px;
  background: var(--brand-pale); color: var(--brand-dark); font-size: .68rem; font-style: normal; font-weight: 800; }
.saved-address-card.active { border-color: var(--brand); background: var(--brand-pale); box-shadow: inset 0 0 0 1px var(--brand); }
.checkout-scope { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-pale); color: var(--brand-dark); font-size: .8rem; line-height: 1.5; }
.checkout-scope[hidden] { display: none; }

@media (max-width: 1100px) {
  .cart-item { grid-template-columns: 44px 100px minmax(150px, 1fr); }
  .cart-thumb { width: 100px; }
}

@media (max-width: 767px) {
  .cart-item { grid-template-columns: 40px 82px minmax(0, 1fr); gap: 12px; padding: 13px; }
  .cart-thumb { width: 82px; grid-row: 1 / span 2; }
  .cart-select { grid-row: 1 / span 2; align-self: start; justify-self: start; }
  .cart-unit, .cart-quantity, .cart-subtotal { grid-column: 1 / -1; }
  .cart-quantity .quantity-control { grid-template-columns: 48px 62px 48px; }
  .quantity-control button { min-height: 46px; font-size: 1.15rem; }
  .quantity-control input { height: 46px; font-size: 1rem; }
  .cart-item-main .text-button, .cart-item-main .btn-link { min-height: 40px; padding-inline: 0; }
  .cart-selection { padding: 10px 12px; }
  .checkout-layout { padding-block: 26px 110px; }
  .checkout-sidebar .place-order { width: 100%; min-height: 56px; font-size: 1rem; }
  .saved-address-card { min-height: 86px; }
  .temp-payment-qr { width: min(100%, 300px); }
}

/* Temporary QR payment (test trading): one short line plus three mobile-only
   shortcuts under the code.  Tablet and desktop keep the plain "scan it"
   experience, so the shortcuts are display:none above 768px. */
.temp-payment-notice-line { margin: 0 0 12px; padding: 8px 10px; border-radius: 10px;
  background: #fff7e6; color: #8a5a00; font-size: .78rem; line-height: 1.5; text-align: start; }
.qr-actions { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 2px; }
.qr-actions[hidden] { display: none !important; }
.qr-action { display: grid; place-items: center; min-height: 44px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font-size: .8rem; font-weight: 800; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.qr-action:active { background: var(--brand-pale); }
.qr-steps { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--canvas);
  color: var(--ink-soft); font-size: .78rem; line-height: 1.6; text-align: start; }
.qr-steps[hidden] { display: none; }

@media (max-width: 767px) {
  .qr-actions { display: grid; }
}

/* --------------------------------------------------------------------------
   Continuous waterfall V1 - soft sections, "keep discovering" marker,
   back-to-top and the two purchase actions in the live detail sheet.
   Mobile first; the desktop layout only widens the same blocks.
   -------------------------------------------------------------------------- */
.realtime-tier-heading { margin: 22px 0 10px; padding-top: 4px; font-size: 1rem; font-weight: 900;
  color: var(--ink); }
.realtime-tier-heading[data-realtime-section-repeat="true"] { margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--line); font-size: .84rem; font-weight: 800; color: var(--ink-soft); }
.realtime-sentinel { height: 1px; margin-top: -1px; }

.back-to-top { position: fixed; z-index: 1100; inset-inline-end: 14px; inset-block-end: 84px;
  display: grid; place-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .96);
  color: var(--ink); font-size: .78rem; font-weight: 800; line-height: 1;
  box-shadow: 0 10px 26px rgba(16, 24, 46, .16); cursor: pointer; backdrop-filter: blur(10px); }
.back-to-top[hidden] { display: none; }
.back-to-top:active { background: var(--brand-pale); }

.realtime-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.realtime-buy .full { width: 100%; }
@media (max-width: 767px) {
  .back-to-top { inset-block-end: 78px; min-height: 46px; }
  .realtime-buy .btn-secondary, .realtime-buy .btn-primary { min-height: 48px; }
}

/* ------------------------------------------- account entry (register / sign in)
   One screen, one continuous flow, mobile first: the registration and sign-in
   forms are never shown side by side, and the optional shipping address sits
   below the main action instead of competing with it. */
.access-card { display: grid; gap: 1.25rem; }
.access-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .3rem; border-radius: .9rem; background: #f1f5f9; }
.access-tabs button { min-height: 2.75rem; border: 0; border-radius: .7rem; background: transparent; color: var(--muted, #475569); font-weight: 800; font-size: .95rem; line-height: 1.25; padding: .45rem .5rem; }
.access-tabs button.active { background: #fff; color: var(--ink, #0f172a); box-shadow: 0 4px 14px rgba(15, 23, 42, .12); }
.access-panel { display: grid; gap: 1rem; }
.access-panel[hidden] { display: none; }
.access-panel h2 { margin: 0; }
.access-panel > p { margin: 0; color: var(--muted, #64748b); }
.access-panel .field { display: grid; gap: .45rem; }
.access-panel input, .address-body input, .address-body select { width: 100%; min-height: 3rem; border: 1px solid #cbd5e1; border-radius: .75rem; padding: .7rem .9rem; }
.access-panel small { color: var(--muted, #64748b); }
.access-success { margin: 0; color: #047857; font-weight: 700; }
.access-success[hidden] { display: none; }
.address-panel { display: grid; gap: .75rem; border-top: 1px solid var(--border, #e5e7eb); padding-top: 1rem; }
.address-panel[hidden] { display: none; }
.address-toggle { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; min-height: 3rem; border: 1px dashed #cbd5e1; border-radius: .75rem; background: #f8fafc; padding: .6rem .85rem; font-weight: 700; text-align: start; }
.address-toggle em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--muted, #64748b); }
.address-body { margin-top: .25rem; }
.form-message.success { color: #047857; }
.account-profile-card { display: grid; gap: 1rem; }
.profile-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; align-items: start; padding-bottom: .85rem; border-bottom: 1px solid var(--border, #e5e7eb); }
.profile-detail > div:first-child { display: grid; gap: .25rem; min-width: 0; }
.profile-detail > div:first-child span { overflow-wrap: anywhere; color: var(--muted, #64748b); }
.profile-detail form, .account-password-form { grid-column: 1 / -1; display: grid; gap: .75rem; }
.profile-detail form[hidden], .account-password-form[hidden] { display: none; }
.profile-detail input, .account-password-form input { width: 100%; min-height: 3rem; border: 1px solid #cbd5e1; border-radius: .75rem; padding: .7rem .9rem; }
.account-password-form .field { display: grid; gap: .4rem; }
/* Password fields: the eye sits *inside* the input on the inline-end side, so no
   extra row is added and RTL keeps working (logical inset). The touch target is
   44px and the text never runs under the icon (input keeps inline-end padding). */
.password-control { position: relative; display: block; }
.password-control input { padding-inline-end: 3rem; }
.password-toggle { position: absolute; inset-block-start: 50%; inset-inline-end: .3rem; transform: translateY(-50%); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: .6rem; background: transparent; color: var(--muted, #64748b); cursor: pointer; }
.password-toggle svg { width: 22px; height: 22px; }
.password-toggle .eye-off { display: none; }
.password-toggle.is-visible .eye-on { display: none; }
.password-toggle.is-visible .eye-off { display: block; }
.password-toggle:active { background: rgba(15, 23, 42, .06); }
@media (max-width: 767px) {
  /* Stacked tabs and a single-column address form: nothing is side by side on a
     phone, and every control keeps a comfortable touch height. */
  .access-tabs { grid-template-columns: 1fr; }
  .access-tabs button, .address-toggle { min-height: 3rem; }
  .address-body { grid-template-columns: 1fr; }
}

/* Local Warehouse Priority V1: the light "local delivery" badge.
   It is a quiet fact line, never a button or a control: small type, a soft tint,
   it sits below the title/price so it can never compete with them, and it wraps
   instead of truncating on a narrow phone. */
.local-delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(34, 139, 87, .10);
  color: #1c6b45;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.5;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.local-delivery-badge > span[aria-hidden="true"] { font-size: .78rem; line-height: 1; }
.product-card-body .local-delivery-badge { margin: 0 0 8px; }
.detail-content .local-delivery-badge { margin: 4px 0 10px; }
[dir="rtl"] .local-delivery-badge { flex-direction: row-reverse; }

/* ==========================================================================
   PHASE 2 — 商品卡片统一「立即购买」(card Buy now)
   Reuses the shipped direct-purchase chain; the button is a launcher only.
   Both buttons stay inside one row, easily tappable, and never cover the
   price, the name or the image.  Desktop keeps the existing card look.
   ========================================================================== */
.product-card-cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.product-card-cta.has-buy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card-actions { align-items: stretch; }
.product-card-cta .btn-primary-soft,
.product-card-cta .btn-buy-now {
  min-width: 0; min-height: 42px; padding: 0 8px; border-radius: 11px;
  font-size: .82rem; font-weight: 800; line-height: 1.15; text-align: center;
  white-space: normal; overflow-wrap: anywhere;
}
.btn-buy-now {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  border: 0; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--future-cobalt), var(--future-violet));
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-buy-now:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-buy-now:focus-visible { outline: 2px solid var(--future-cobalt); outline-offset: 2px; }
.btn-buy-now:disabled { cursor: progress; opacity: .9; box-shadow: none; }
.btn-buy-now.is-loading { color: transparent; }
.btn-buy-now.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: card-buy-spin .7s linear infinite;
}
@keyframes card-buy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-buy-now.is-loading::after { animation-duration: 2s; } }

/* Mobile: the two actions take the whole card bottom (the decorative wishlist
   glyph steps aside) so neither label has to shrink below a readable size. */
@media (max-width: 900px) {
  .product-card-actions { grid-template-columns: minmax(0, 1fr); }
  .product-card-actions .icon-button { display: none; }
  .product-card-cta { gap: 6px; }
  .product-card-cta .btn-primary-soft,
  .product-card-cta .btn-buy-now { min-height: 40px; padding: 0 6px; font-size: .72rem; }
}
@media (max-width: 375px) {
  .product-card-cta .btn-primary-soft,
  .product-card-cta .btn-buy-now { padding: 0 5px; font-size: .68rem; }
}

/* ==========================================================================
   PHASE 3 — install the app
   A compact "Install app" entry plus the plain-language iOS guide sheet.
   ========================================================================== */
.shell-install {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-weight: 800; font-size: .82rem;
  cursor: pointer; white-space: nowrap;
}
.shell-install[hidden] { display: none; }
.shell-install:hover { border-color: var(--future-cyan); color: var(--future-blue); }
.shell-install-icon { font-size: 1.15rem; line-height: 1; color: var(--brand); }
.header-actions .shell-install { min-height: 42px; }

.install-sheet { position: fixed; inset: 0; z-index: 3000; display: grid; align-items: end; }
.install-sheet[hidden] { display: none; }
.install-sheet-backdrop { position: absolute; inset: 0; background: rgba(6, 19, 38, .5); }
.install-sheet-panel {
  position: relative; z-index: 1; width: 100%; max-width: 520px; margin-inline: auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0; background: #fff; text-align: center;
  box-shadow: 0 -18px 50px rgba(16, 24, 46, .28); animation: install-sheet-in .22s ease-out;
}
@keyframes install-sheet-in { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.install-sheet-grip { display: block; width: 44px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: #dbe3f1; }
.install-sheet-icon { width: 72px; height: 72px; border-radius: 18px; display: block; margin: 0 auto 10px; }
.install-sheet-panel h2 { margin: 0 0 14px; font-size: 1.15rem; }
.install-sheet-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; text-align: start; }
.install-sheet-steps li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: var(--canvas); color: var(--ink); font-size: .9rem;
}
.install-sheet-steps li > span:first-child {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: .8rem;
}
.install-sheet-close {
  width: 100%; min-height: 46px; border: 0; border-radius: 12px; color: #fff; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--future-cobalt), var(--future-violet));
}
body.is-install-open { overflow: hidden; }

/* In the mobile topbar the entry is a compact touch target; the smallest phones
   keep the icon only, with the accessible name preserved. */
.mobile-topbar-actions .shell-install {
  width: auto; min-width: 44px; min-height: 44px; padding: 0 8px; gap: 4px;
  border: 0; background: transparent; font-size: .72rem;
}
.mobile-topbar-actions .shell-install:hover { background: var(--canvas); }
.mobile-topbar-actions .shell-install .shell-install-icon { font-size: 1.25rem; }
@media (max-width: 375px) {
  .mobile-topbar-actions .shell-install { padding: 0 6px; }
  .mobile-topbar-actions .shell-install .shell-install-label { display: none; }
}

/* ==========================================================================
   PHASE 3.1 — the shared transient message ("toast")

   One component serves every short message on every page: "added to cart",
   cart errors, the install fallbacks, the demo notice.  It was pinned with
   ``inset-inline: 50%`` on BOTH sides, so the used width collapsed to zero and
   the text wrapped one character per line into a narrow vertical strip.

   It is now a real bottom-centred pill: automatic width with a sane cap,
   centred, wrapping only at natural boundaries, and clear of the bottom tabbar
   and the iPhone safe area.
   ========================================================================== */
.toast-message {
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: calc(100vw - 32px);
  min-width: 96px;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
  transform: translateY(25px);
}
html[dir="ltr"] .toast-message { transform: translateY(25px); }
.toast-message.show { transform: translateY(0); }
html[dir="ltr"] .toast-message.show { transform: translateY(0); }

@media (max-width: 900px) {
  /* Checkout has no bottom tabbar, so its message must not float a tabbar too high. */
  html body[data-page="checkout"] .toast-message {
    inset-block-end: calc(var(--shell-safe-bottom, 0px) + 20px);
  }
}

/* ==========================================================================
   Local Warehouse storefront V1
   ========================================================================== */
.warehouse-zone-tools { display: grid; gap: 10px; margin-top: 14px; }
.warehouse-hub-link { width: fit-content; font-weight: 800; color: var(--future-blue); }
.warehouse-partner-note {
  padding: 10px 14px; border: 1px solid rgba(37, 99, 235, .18); border-radius: 14px;
  background: rgba(239, 246, 255, .82); color: var(--muted); font-size: .88rem; line-height: 1.55;
}
.warehouse-partner-note a { font-weight: 800; white-space: nowrap; }
.warehouse-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.warehouse-card {
  min-width: 0; min-height: 180px; padding: 20px; border: 1px solid var(--line);
  border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(16, 24, 46, .06);
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.warehouse-card.is-open { border-color: rgba(37, 99, 235, .32); background: linear-gradient(145deg, #fff, #f2f8ff); }
.warehouse-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.warehouse-flag { font-size: 2rem; line-height: 1; }
.warehouse-status {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--canvas); color: var(--muted); font-size: .75rem; font-weight: 800;
}
.warehouse-card.is-open .warehouse-status { background: rgba(37, 99, 235, .1); color: var(--future-blue); }
.warehouse-card h2 { margin: 0; font-size: 1.15rem; }
.warehouse-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.warehouse-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.warehouse-card-actions a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px;
  font-weight: 800; text-decoration: none;
}
.warehouse-card-actions .primary { background: linear-gradient(135deg, var(--future-cobalt), var(--future-violet)); color: #fff; }
.warehouse-card-actions .secondary { border: 1px solid var(--line); color: var(--ink); background: #fff; }
body[data-warehouse-country="JP"] .shop-product-grid .product-card { border-color: rgba(37, 99, 235, .18); }
@media (max-width: 900px) {
  .warehouse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .warehouse-card { min-height: 160px; padding: 16px; border-radius: 16px; }
}

.shop-load-more {
  display: none; width: min(100%, 360px); min-height: 48px; margin: 18px auto 6px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
  font-weight: 850; box-shadow: 0 8px 22px rgba(16, 24, 46, .06);
}
.shop-load-more:disabled { opacity: .6; cursor: wait; }
@media (max-width: 767px) {
  .shop-load-more:not([hidden]) { display: block; }
  .shop-results .pagination[hidden] { display: none !important; }
}

/* ARVONELIA public wordmark; original graphic retained on disk for rollback. */
.arvonelia-wordmark {
  display:inline-flex;align-items:center;min-height:38px;padding:6px 12px;
  color:#f3f8fb;font-size:clamp(.86rem,1.15vw,1.13rem);
  font-weight:800;letter-spacing:.095em;line-height:1.1;white-space:nowrap
}
.mobile-topbar-brand .arvonelia-wordmark {padding:4px 6px;font-size:.75rem}
.site-footer .arvonelia-wordmark {min-height:42px}


/* CJ rich media V1: thumb-first, progressive content, mobile purchase safety. */
.realtime-rich { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; min-width: 0; }
.realtime-rich h3 { font-size: 1rem; font-weight: 800; margin: 0 0 12px; color: var(--text-primary); }
.realtime-rich-status { color: var(--text-secondary); font-size: .84rem; margin: 7px 0; }
.realtime-rich-content { max-width: 100%; overflow-wrap: anywhere; font-size: .89rem; line-height: 1.65; }
.realtime-rich-content[hidden], .realtime-rich-videos[hidden] { display: none; }
.realtime-rich-content img { max-width: 100%; width: auto; height: auto; display: block; margin: 10px auto;
  border-radius: 10px; content-visibility: auto; }
.realtime-rich-content p { margin: .55em 0; }
.realtime-rich-content table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.realtime-rich-content td, .realtime-rich-content th { border: 1px solid var(--line);
  padding: 7px; white-space: normal; }
.realtime-rich-videos { margin: 22px 0 12px; }
.realtime-rich-video-item video { width: 100%; max-width: 600px; aspect-ratio: 16/9; object-fit: contain;
  border-radius: 12px; background: #131a28; }
@media (max-width: 900px) {
  .realtime-sheet { height: 100dvh; min-height: 0; }
  .realtime-sheet-body { scroll-padding-bottom: 100px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .realtime-sheet-info { min-width: 0; }
  .realtime-rich-content { font-size: .88rem; }
  .realtime-buy { position: sticky; bottom: 0; inset-block-end: 0; z-index: 5; display: flex;
    gap: 8px; align-items: center; padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.98); box-shadow: 0 -9px 20px rgba(16,24,46,.13); }
  .realtime-buy button { flex: 1; min-width: 0; min-height: 47px; }
}

/* Rich mobile detail: true fixed dock OUTSIDE the independently scrolling body.
   A sticky button inside the scrolling text column eventually disappears. */
.realtime-buy.realtime-buy-dock {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; position: relative; bottom: auto; inset-block-end: auto;
  margin: 0; padding: 12px 20px; border-top: 1px solid var(--line);
  background: #fff; box-shadow: 0 -6px 16px rgba(16,24,46,.06);
}
.realtime-buy-dock button {
  flex: 1 1 0; max-width: 300px; min-width: 0; min-height: 48px;
}
@media (max-width: 900px) {
  .realtime-sheet { display: flex; flex-direction: column; }
  .realtime-sheet-body { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  .realtime-buy.realtime-buy-dock {
    flex: 0 0 auto; z-index: 6; position: relative; bottom: auto; inset-block-end: auto;
    gap: 8px; padding: 10px 12px max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -8px 16px rgba(16,24,46,.12);
  }
  .realtime-buy-dock button { min-height: 48px; }
}

/* Formal CJ pages share rich content components with the realtime sheet. */
.formal-rich-media { margin-top: 22px; padding-bottom: 24px; width: 100%; min-width: 0; }
.formal-rich-media .realtime-rich-content { overflow-wrap: anywhere; width: 100%; max-width: 100%; }
.formal-rich-media .realtime-rich-content img { max-width: 100%; height: auto; }
.formal-rich-media .realtime-rich-videos video { display: block; width: 100%; max-width: 620px;
  aspect-ratio: 16/9; margin: 12px auto; object-fit: contain; background: #111; border-radius: 12px; }
@media (max-width: 767px) {
  .formal-rich-media { padding: 14px 0 60px; }
  .formal-rich-media .realtime-rich-content { font-size: .9rem; }
}

/* Product details V6: gradual factual content, regardless of HTML length. */
.realtime-rich-facts { margin: 12px 0 20px; min-width: 0; }
.realtime-rich-facts[hidden] { display: none; }
.realtime-rich-facts-heading { font-size: 1rem; font-weight: 750; margin: 12px 0; }
.realtime-rich-facts-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.realtime-rich-fact { display: grid; grid-template-columns: minmax(108px, 35%) 1fr; gap: 12px;
  padding: 10px 3px; border-bottom: 1px solid rgba(105,120,139,.15); min-width: 0; }
.realtime-rich-fact dt { color: #657184; font-size: .85rem; overflow-wrap: anywhere; }
.realtime-rich-fact dd { margin: 0; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; }
@media(max-width: 640px) {
  .realtime-rich-fact { grid-template-columns: minmax(94px, 35%) minmax(0,1fr); gap: 8px; }
}
/* Mobile-first semantic variant picker: visible axes over original SKU controls. */
.variant-dimensions { width:100%; min-width:0; flex: 1 1 100%; grid-column:1/-1; }
.variant-dimension-axis { min-width:0; margin:0 0 14px; }
.variant-dimension-heading { font-weight:750; font-size:.93rem; line-height:1.35; margin:0 0 9px; color:var(--text-primary,#253044); }
.variant-dimension-choices { display:flex; flex-wrap:wrap; gap:8px; }
.variant-dimension-choice { box-sizing:border-box; border:1px solid var(--line,#d7dce7); border-radius:11px; background:#fff; color:var(--text-primary,#263041); min-height:43px; padding:9px 13px; line-height:1.3; font-size:.87rem; text-align:center; max-width:100%; overflow-wrap:anywhere; cursor:pointer; }
.variant-dimension-choice.active, .variant-dimension-choice[aria-pressed='true'] { background:var(--brand-pale,#eef5ff); color:var(--future-cobalt,#164bc1); border-color:var(--future-blue,#2563eb); box-shadow:inset 0 0 0 1px var(--future-blue,#2563eb); font-weight:750; }
.variant-dimension-choice:focus-visible { outline:3px solid #ffba46; outline-offset:2px; }
.variant-dimension-summary { color:var(--text-secondary,#667085); font-size:.82rem; padding:10px 12px; margin:4px 0 0; background:#f6f8fc; border-radius:11px; overflow-wrap:anywhere; }
.variant-dimension-summary strong { color:var(--text-primary,#253044); font-weight:700; }
.option-chip.variant-dimension-legacy, .realtime-variant.variant-dimension-legacy { display:none !important; }
@media(max-width:640px) { .variant-dimensions { width:100%; } .variant-dimension-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .variant-dimension-choice { width:100%; padding:10px 7px; min-height:44px; } .variant-dimension-heading { font-size:.93rem; } .realtime-variants .variant-dimensions { padding-bottom:10px; } }

/* Responsive, accessible progressive disclosure for many SKU dimension options. */
.variant-dimension-fold {border:1px solid var(--line,#d7dce7);border-radius:12px;background:#fff;overflow:hidden;}
.variant-dimension-trigger {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:11px 14px;cursor:pointer;list-style:none;touch-action:manipulation;}
.variant-dimension-trigger::-webkit-details-marker {display:none;}
.variant-dimension-trigger::marker {content:"";}
.variant-dimension-trigger:focus-visible {outline:3px solid #ffba46;outline-offset:-3px;}
.variant-dimension-current {font-size:.95rem;color:var(--text-primary,#253044);font-weight:750;}
.variant-dimension-change {color:var(--future-blue,#2563eb);font-size:.84rem;white-space:nowrap;font-weight:650;}
.variant-dimension-fold[open] .variant-dimension-trigger {border-bottom:1px solid var(--line,#d7dce7);background:#f7faff;}
.variant-dimension-fold[open] .variant-dimension-change span[aria-hidden="true"] {display:inline-block;transform:rotate(180deg);}
.variant-dimension-fold > .variant-dimension-choices {padding:12px;}
@media(max-width:640px) {
 .variant-dimension-fold .variant-dimension-choices {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
 .variant-dimension-fold .variant-dimension-choice {min-height:44px;}
}

/* Payment availability: in-flow sticky shell, no overlay or dismiss control. */
[data-shell-header].has-payment-status-notice {
  position: sticky; inset-block-start: 0; z-index: 1000;
}
.payment-status-notice {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: #fff3d6; color: #503b16; border-bottom: 1px solid #e8d6aa;
  font-size: 13px; line-height: 1.5; text-align: start;
}
.payment-status-notice p { margin: 0; min-width: 0; }
.payment-status-notice strong { margin-inline-end: 10px; }
.payment-status-icon { flex: 0 0 auto; font-size: 16px; }
@media (max-width: 900px) {
  .payment-status-notice { font-size: 12px; }
  .payment-status-notice strong { display: block; margin-inline-end: 0; }
  [data-shell-header].has-payment-status-notice .utility-bar { padding-top: 0; }
}
