/* =========================================================================
   Luxora Commerce — page compositions
   ========================================================================= */

/* ------------------------------------------------------------ page header */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 3rem); border-bottom: 1px solid var(--border); background: var(--bg-deep); }
.page-head h1 { margin-bottom: var(--sp-3); }
.page-head p { max-width: 60ch; margin: 0; }

/* -------------------------------------------------------- category tiles */
.tile { position: relative; overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--border); display: block; background: var(--surface); }
.tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; transition: transform var(--slow) var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile:hover { border-color: var(--gold-line); }
.tile__body { position: absolute; inset: auto 0 0 0; padding: var(--sp-5); background: linear-gradient(transparent, rgba(11,11,11,.92) 62%); }
.tile__title { font-family: var(--font-display); font-size: 1.55rem; margin: 0 0 .25rem; }
.tile__meta { font-size: var(--step--2); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--lux-gold); }
.tile--wide img { aspect-ratio: 16/10; }

/* ----------------------------------------------------------- shop layout */
.shop { display: grid; grid-template-columns: 264px 1fr; gap: var(--sp-7); align-items: start; }
@media (max-width: 940px) { .shop { grid-template-columns: 1fr; } .shop__filters { display: none; } }
.shop__filters { position: sticky; top: calc(var(--header-h) + var(--sp-4)); max-height: calc(100vh - var(--header-h) - var(--sp-6)); overflow-y: auto; padding-right: var(--sp-2); }
.filter-group { border-bottom: 1px solid var(--border); padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); }
.filter-group h5 { font-size: var(--step--2); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-2); margin: 0 0 var(--sp-3); font-family: var(--font-body); font-weight: 600; }
.filter-group .check { margin-bottom: var(--sp-2); }
.filter-group .check span { flex: 1; }
.filter-group .check em { font-style: normal; font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-muted); }
.shop__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4); align-items: center; margin-bottom: var(--sp-5); }
.shop__count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
.shop__active { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }

.range { display: flex; align-items: center; gap: var(--sp-3); }
.range input[type="range"] { flex: 1; appearance: none; height: 2px; background: var(--border-strong); border-radius: 2px; }
.range input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--lux-gold); cursor: pointer; border: 2px solid var(--bg); }
.range input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--lux-gold); cursor: pointer; border: 2px solid var(--bg); }
.range output { font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-2); min-width: 5ch; }

/* -------------------------------------------------------- product detail */
.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
/* Grid items default to min-width:auto, so the thumbnail strip's intrinsic
   width pushed the column wider than the shell on narrow phones. */
.pdp > * { min-width: 0; }
.gallery__thumbs > * { flex: 0 0 auto; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } }
.gallery { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.gallery__main { position: relative; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); aspect-ratio: 4/5; cursor: zoom-in; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease); }
.gallery__main.is-zoomed img { transform: scale(1.9); cursor: zoom-out; }
.gallery__main.no-zoom { cursor: pointer; }
.gallery__main.no-zoom img { transform: none !important; }
/* Sticky gallery is a desktop pattern. In a single column it pinned the
   photo over the price and description while scrolling. */
@media (max-width: 900px) {
  .gallery { position: static; }
  .gallery__thumb { flex-basis: 64px; }
  .gallery__nav { width: 38px; height: 38px; font-size: 1.35rem; }
}
.gallery__thumbs { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); overflow-x: auto; }
.gallery__thumb { flex: 0 0 84px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); }
.gallery__thumb.is-on { border-color: var(--lux-gold); }
.gallery__badge { position: absolute; top: var(--sp-4); left: var(--sp-4); z-index: 2; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; font-size: 1.6rem; line-height: 1; background: rgba(11,11,11,.55); backdrop-filter: blur(6px); opacity: .85; }
.gallery__nav:hover { opacity: 1; }
.gallery__nav--prev { left: var(--sp-3); }
.gallery__nav--next { right: var(--sp-3); }
.gallery__count { position: absolute; bottom: var(--sp-4); right: var(--sp-4); z-index: 2; font-size: var(--step--2); padding: .25rem .6rem; border-radius: 999px; background: rgba(11,11,11,.6); color: #fff; }
.gallery__thumb img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }

.pdp__brand { font-size: var(--step--2); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--lux-gold); }
.pdp__title { font-size: var(--step-3); margin: var(--sp-2) 0 var(--sp-3); }
.pdp__price { display: flex; align-items: baseline; gap: var(--sp-3); margin: var(--sp-5) 0; }
.pdp__price .price { font-size: 1.75rem; }
.pdp__row { display: flex; gap: var(--sp-3); margin: var(--sp-5) 0; flex-wrap: wrap; }
.pdp__row .btn { flex: 1 1 200px; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--border); }
.spec-list div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); font-size: var(--step--1); }
.spec-list dt { color: var(--text-muted); }
.spec-list dd { margin: 0; font-family: var(--font-mono); color: var(--text); text-align: right; }
.stock-line { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--step--1); }
.stock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.stock-dot--low { background: var(--warning); }
.stock-dot--out { background: var(--error); }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin: var(--sp-5) 0; padding: var(--sp-4) 0; border-block: 1px solid var(--border); }
.trust-row div { text-align: center; font-size: var(--step--2); color: var(--text-muted); }
.trust-row strong { display: block; color: var(--text); font-size: var(--step--1); margin-bottom: 2px; }

/* --------------------------------------------------------------- reviews */
.review-summary { display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-6); align-items: center; margin-bottom: var(--sp-6); }
@media (max-width: 640px) { .review-summary { grid-template-columns: 1fr; } }
.review-score { text-align: center; }
.review-score b { font-family: var(--font-mono); font-size: 3.2rem; display: block; line-height: 1; color: var(--lux-gold); }
.review-bar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); font-size: var(--step--2); color: var(--text-muted); }
.review-bar__track { flex: 1; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.review-bar__fill { height: 100%; background: var(--lux-gold); }
.review { border-bottom: 1px solid var(--border); padding: var(--sp-5) 0; }
.review__head { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-display); color: var(--lux-gold); font-size: 1rem; }

/* ------------------------------------------------------------------- cart */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--sp-7); align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-line img { width: 96px; border-radius: var(--radius); border: 1px solid var(--border); }
.cart-line__name { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 .2rem; }
.cart-line__meta { font-size: var(--step--2); color: var(--text-muted); }
.summary { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.summary__row { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; font-size: var(--step--1); color: var(--text-2); }
.summary__row--total { border-top: 1px solid var(--border); margin-top: var(--sp-3); padding-top: var(--sp-4); font-size: var(--step-1); color: var(--text); }
.summary__row--total span:last-child { font-family: var(--font-mono); color: var(--lux-gold); }
.coupon-row { display: flex; gap: var(--sp-2); }
.coupon-row .input { min-height: 42px; }

/* --------------------------------------------------------------- checkout */
.checkout { display: grid; grid-template-columns: 1fr 400px; gap: var(--sp-7); align-items: start; }
@media (max-width: 940px) { .checkout { grid-template-columns: 1fr; } }
.steps { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--step--1); color: var(--text-muted); }
.step__num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--step--2); }
.step.is-on { color: var(--text); }
.step.is-on .step__num { background: var(--lux-gold); border-color: var(--lux-gold); color: var(--text-on-gold); }
.step.is-done .step__num { border-color: var(--lux-gold); color: var(--lux-gold); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.pay-option { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; margin-bottom: var(--sp-3); transition: border-color var(--fast) var(--ease); }
.pay-option:hover { border-color: var(--gold-line); }
.pay-option.is-on { border-color: var(--lux-gold); background: var(--gold-wash); }
.pay-option__label { flex: 1; font-size: var(--step--1); }
.pay-option__tag { font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-muted); }

/* -------------------------------------------------------------------- AI */
.ai-shell { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-6); align-items: start; }
@media (max-width: 900px) { .ai-shell { grid-template-columns: 1fr; } }
.chat { display: flex; flex-direction: column; height: min(72vh, 680px); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); overflow: hidden; }
.chat__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.chat__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(46,125,50,.18); }
.chat__log { flex: 1; overflow-y: auto; padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.msg { display: flex; gap: var(--sp-3); max-width: 88%; animation: fade-up var(--slow) var(--ease); }
.msg--me { margin-left: auto; flex-direction: row-reverse; }
.msg__avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1px solid var(--gold-line); color: var(--lux-gold); font-family: var(--font-display); font-size: .85rem; }
.msg__bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--sp-3) var(--sp-4); font-size: var(--step--1); color: var(--text-2); line-height: 1.6; }
.msg--me .msg__bubble { background: var(--gold-wash); border-color: var(--gold-line); color: var(--text); }
.msg__bubble p:last-child { margin-bottom: 0; }
.chat__foot { border-top: 1px solid var(--border); padding: var(--sp-4); background: var(--surface-2); }
.chat__form { display: flex; gap: var(--sp-2); }
.chat__suggest { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--lux-gold); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.ai-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
.ai-pick { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-deep); display: block; }
.ai-pick:hover { border-color: var(--gold-line); }
.ai-pick img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.ai-pick div { padding: var(--sp-3); }
.ai-pick b { display: block; font-family: var(--font-display); font-size: 1rem; font-weight: 400; margin-bottom: 2px; }
.ai-pick span { font-family: var(--font-mono); font-size: var(--step--2); color: var(--lux-gold); }

/* --------------------------------------------------------------- compare */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: var(--sp-4); border: 1px solid var(--border); vertical-align: top; font-size: var(--step--1); }
.compare-table th:first-child { width: 180px; color: var(--text-muted); font-size: var(--step--2); letter-spacing: var(--tracking-wide); text-transform: uppercase; text-align: left; }
.compare-table img { width: 100%; max-width: 180px; border-radius: var(--radius); margin-bottom: var(--sp-3); }
.compare-table .is-best { color: var(--lux-gold); }

/* --------------------------------------------------------------- account */
.account { display: grid; grid-template-columns: 250px 1fr; gap: var(--sp-7); align-items: start; }
@media (max-width: 860px) { .account { grid-template-columns: 1fr; } }
.side-nav { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); }
.side-nav li { border-bottom: 1px solid var(--border); }
.side-nav li:last-child { border-bottom: 0; }
.side-nav a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); font-size: var(--step--1); color: var(--text-2); }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.is-on { background: var(--gold-wash); color: var(--lux-gold); border-left: 2px solid var(--lux-gold); }
.side-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ------------------------------------------------------------------- auth */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }
.auth__aside { position: relative; background: var(--bg-deep); display: grid; place-items: center; padding: var(--sp-8); overflow: hidden; }
.auth__aside img.bgart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.auth__aside-inner { position: relative; z-index: 1; max-width: 40ch; text-align: center; }
.auth__aside-inner img { width: 120px; margin: 0 auto var(--sp-5); }
.auth__form { display: grid; place-items: center; padding: var(--sp-7) var(--gutter); }
.auth__form-inner { width: min(400px, 100%); }
.auth__divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; color: var(--text-muted); font-size: var(--step--2); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------- testimonials */
.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--sp-6); height: 100%; display: flex; flex-direction: column; gap: var(--sp-4); }
.quote-card blockquote { margin: 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.45; color: var(--text); }
.quote-card footer { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.quote-card footer b { display: block; font-size: var(--step--1); font-weight: 600; }
.quote-card footer span { font-size: var(--step--2); color: var(--text-muted); }

/* -------------------------------------------------------------- editorial */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (max-width: 860px) { .editorial { grid-template-columns: 1fr; } }
.editorial img { border-radius: var(--radius-card); border: 1px solid var(--border); }

/* ------------------------------------------------------------- newsletter */
.newsletter { border: 1px solid var(--gold-line); border-radius: var(--radius-card); padding: clamp(2rem, 5vw, 4rem); text-align: center; background:
  radial-gradient(120% 140% at 50% 0%, rgba(201,161,74,.10), transparent 60%), var(--surface); }
.newsletter form { display: flex; gap: var(--sp-2); max-width: 460px; margin: var(--sp-5) auto 0; }
@media (max-width: 520px) { .newsletter form { flex-direction: column; } }

/* ---------------------------------------------------------------- gallery */
.gram { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
@media (max-width: 860px) { .gram { grid-template-columns: repeat(3, 1fr); } }
.gram a { position: relative; overflow: hidden; aspect-ratio: 1; }
.gram img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease); }
.gram a:hover img { transform: scale(1.08); }
.gram a::after { content: ""; position: absolute; inset: 0; background: rgba(11,11,11,.4); opacity: 0; transition: opacity var(--base) var(--ease); }
.gram a:hover::after { opacity: 1; }

/* ------------------------------------------------------------ order track */
.timeline { position: relative; padding-left: var(--sp-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.timeline__item { position: relative; padding-bottom: var(--sp-5); }
.timeline__item::before { content: ""; position: absolute; left: calc(var(--sp-6) * -1 + 3px); top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-strong); }
.timeline__item.is-done::before { background: var(--lux-gold); border-color: var(--lux-gold); }
.timeline__item.is-now::before { background: var(--lux-gold); border-color: var(--lux-gold); box-shadow: 0 0 0 4px rgba(201,161,74,.18); }
.timeline__time { font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-muted); }

/* =========================================================================
   Commerce layer — service bar, category shortcuts, promo, and the
   mobile shopping patterns (2-up grid, filter drawer, tab bar, buy bar).
   ========================================================================= */

/* Spec list: two columns on wide screens need a gutter between them. */
.spec-list { column-gap: var(--sp-6); }

/* ------------------------------------------------------------ service bar */
.trustbar { border-bottom: 1px solid var(--border); background: var(--bg-deep); }
.trustbar__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.trustbar__list li { display: flex; align-items: center; gap: .8rem; padding: 1.15rem 1rem; border-right: 1px solid var(--border); }
.trustbar__list li:last-child { border-right: 0; }
.trustbar__ic { color: var(--lux-gold); display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--gold-wash); }
.trustbar__list b { display: block; font-size: var(--step--1); font-weight: 600; color: var(--text); }
.trustbar__list span { font-size: var(--step--2); color: var(--text-muted); }
@media (max-width: 900px) {
  .trustbar__list { grid-template-columns: repeat(2, 1fr); }
  .trustbar__list li:nth-child(2n) { border-right: 0; }
  .trustbar__list li:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .trustbar__list li { padding: .85rem .5rem; gap: .55rem; }
  .trustbar__ic { width: 34px; height: 34px; }
  .trustbar__ic svg { width: 18px; height: 18px; }
  .trustbar__list b { font-size: .78rem; }
  .trustbar__list span { font-size: .7rem; }
}

/* ---------------------------------------------------- category shortcuts */
.cat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-4); }
.cat-card { display: flex; flex-direction: column; gap: .2rem; text-align: center; }
.cat-card__img { display: block; aspect-ratio: 1; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border); margin-bottom: .55rem; background: var(--surface); transition: border-color var(--base) var(--ease); }
.cat-card__img img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: transform var(--slow) var(--ease); }
.cat-card:hover .cat-card__img { border-color: var(--gold-line); }
.cat-card:hover img { transform: scale(1.06); }
.cat-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--text); }
.cat-card > span:last-child { font-size: var(--step--2); color: var(--text-muted); letter-spacing: .04em; }
@media (max-width: 900px) {
  .cat-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .8rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .cat-strip::-webkit-scrollbar { display: none; }
  .cat-card { flex: 0 0 104px; scroll-snap-align: start; }
  .cat-card__img { border-radius: 50%; margin-bottom: .4rem; }
  .cat-card b { font-family: var(--font-body); font-size: .82rem; font-weight: 500; }
  .cat-card > span:last-child { font-size: .7rem; }
}

/* ---------------------------------------------------------- promo banner */
.promo { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 320px; border: 1px solid var(--gold-line); border-radius: var(--radius-card); overflow: hidden; background: var(--bg-deep); }
.promo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; order: 2; transition: transform var(--slow) var(--ease); }
.promo:hover img { transform: scale(1.04); }
.promo__body { padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .4rem; }
.promo__body h2 { font-size: var(--step-4); color: var(--lux-gold); margin: .2rem 0; }
.promo__body p { color: var(--text-2); margin-bottom: 1rem; }
@media (max-width: 760px) {
  .promo { grid-template-columns: 1fr; min-height: 0; }
  .promo img { position: absolute; inset: 0; opacity: .38; }
  .promo__body { position: relative; padding: 2rem 1.25rem; }
}

/* ------------------------------------------------ shop: quick categories */
.shop__cats { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-4); padding-bottom: 2px; }
.shop__cats::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .35rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--step--1); cursor: pointer; transition: border-color .2s, color .2s; }
.cat-chip:first-child { padding-left: .9rem; }
.cat-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; aspect-ratio: 1; }
.cat-chip:hover { border-color: var(--gold-line); color: var(--text); }
.cat-chip.is-on { border-color: var(--lux-gold); color: var(--lux-gold); background: var(--gold-wash); }

.shop__filter-btn { display: none; }
.shop__filter-btn em { font-style: normal; font-family: var(--font-mono); color: var(--lux-gold); }
.filters__head, .filters__foot { display: none; }
.filters-scrim { display: none; }

@media (max-width: 940px) {
  .shop__filter-btn { display: inline-flex; gap: .4rem; }
  .shop__bar { position: sticky; top: var(--header-h); z-index: 5; background: var(--bg); padding: .6rem 0; margin-bottom: var(--sp-3); border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
  .shop__bar .shop__count { flex: 1; font-size: var(--step--2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop__bar label > span { display: none; }
  .shop__bar .select { font-size: 16px; padding-block: .5rem; max-width: 170px; }
  /* The filter column becomes a bottom sheet. */
  .shop .shop__filters {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: calc(var(--z-drawer) + 1);
    max-height: 86vh; max-height: 86dvh; overflow-y: auto; padding: 0 var(--gutter) 0; background: var(--bg-deep);
    border-top: 1px solid var(--gold-line); border-radius: 18px 18px 0 0;
    transform: translateY(105%); transition: transform var(--base) var(--ease); visibility: hidden;
  }
  .shop .shop__filters.is-open { transform: none; visibility: visible; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; background: var(--bg-deep); padding: 1rem 0; margin-bottom: .5rem; border-bottom: 1px solid var(--border); }
  .filters__head h3 { margin: 0; font-size: 1.4rem; }
  .filters__foot { display: block; position: sticky; bottom: 0; background: var(--bg-deep); padding: .9rem 0 calc(.9rem + env(safe-area-inset-bottom)); margin-top: 1rem; border-top: 1px solid var(--border); }
  .filters-scrim { display: block; position: fixed; inset: 0; z-index: var(--z-drawer); background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity var(--base) var(--ease); }
  .filters-scrim.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------------------------------------------- product grids on phones */
@media (max-width: 640px) {
  .grid:has(> .product-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .75rem; }
  .grid:has(> .product-card) .product-card__body { padding-top: .6rem; gap: .2rem; }
  .grid:has(> .product-card) .product-card__brand { font-size: .62rem; }
  .grid:has(> .product-card) .product-card__name { font-size: 1rem; line-height: 1.2; }
  .grid:has(> .product-card) .product-card__meta { padding-top: .35rem; flex-wrap: wrap; gap: .3rem; }
  .grid:has(> .product-card) .price { font-size: .9rem; }
  .grid:has(> .product-card) .product-card__meta .badge { font-size: .58rem; padding: .15rem .4rem; }
  .grid:has(> .product-card) .product-card__flags .badge { font-size: .58rem; padding: .2rem .45rem; }
  .grid:has(> .product-card) .product-card__flags { top: .5rem; left: .5rem; }
  .grid:has(> .product-card) .product-card__quick .btn { font-size: .68rem; padding: .6rem .4rem; letter-spacing: .06em; }
  .product-card__media { border-radius: 12px; }
  /* Keep the wishlist heart; compare and quick view live on the product page. */
  .product-card__tools { top: .45rem; right: .45rem; }
  .product-card__tools [data-action="compare"], .product-card__tools [data-action="quickview"] { display: none; }
  .product-card__tools .icon-btn { width: 32px; height: 32px; }
  .rail > * { flex-basis: 58vw; }
}

/* ----------------------------------------------------- mobile tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-header);
    background: rgba(11,11,11,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 58px; color: var(--text-muted); font: inherit; font-size: .64rem; letter-spacing: .04em; background: none; border: 0; cursor: pointer;
  }
  .tabbar [aria-current="page"] { color: var(--lux-gold); }
  .tabbar__count { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--lux-gold); color: var(--text-on-gold); font: 600 9px/16px var(--font-mono); font-style: normal; text-align: center; }
  .tabbar__count:empty, .tabbar__count[data-count="0"] { display: none; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .toast-stack { bottom: calc(70px + env(safe-area-inset-bottom)); }
  /* The tab bar already carries wishlist; keep the header lean. */
  .nav__tools a[href$="wishlist.html"] { display: none; }
}

/* ------------------------------------------------ product page buy bar */
.buybar { display: none; }
@media (max-width: 900px) {
  .buybar {
    display: flex; align-items: center; gap: .75rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-header) + 1);
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom)); background: rgba(20,20,20,.97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--gold-line);
    transform: translateY(110%); transition: transform var(--base) var(--ease);
  }
  .buybar.is-on { transform: none; }
  .buybar img { width: 44px; height: 44px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: none; }
  .buybar__info { flex: 1; min-width: 0; line-height: 1.25; }
  .buybar__info b { display: block; font-weight: 500; font-size: .85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar__info span { font-size: .85rem; color: var(--lux-gold); }
  .buybar__info s { color: var(--text-muted); font-size: .75rem; margin-left: .3rem; }
  .buybar .btn { flex: none; }
}
@media (max-width: 760px) {
  /* Stack the buy bar above the tab bar. */
  .buybar { bottom: calc(58px + env(safe-area-inset-bottom)); padding-bottom: .6rem; }
}

/* ------------------------------------------------ phone-sized pages */
@media (max-width: 640px) {
  .section { padding-block: 2.75rem; }
  .section--tight { padding-block: 2rem; }
  .page-head { padding-block: 1.6rem 1.25rem; }
  .page-head h1 { font-size: var(--step-3); }
  .page-head .lead { font-size: var(--step-0); }
  .section-head { margin-bottom: 1.25rem; }
  .section-head h2 { font-size: var(--step-2); }
  .hero { min-height: 0; }
  .hero__inner { padding-block: 3.5rem 3rem; }
  .hero__title { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero__sub { font-size: var(--step-0); margin-bottom: 1.5rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__scroll { display: none; }
  .hero__media::after { background: linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.85) 60%, rgba(11,11,11,.96) 100%); }
  .pdp__title { font-size: var(--step-2); }
  .pdp__price { margin: 1rem 0; }
  .pdp__row { margin: 1rem 0; }
  .pdp__row .btn { flex-basis: 140px; }
  .trust-row { gap: .5rem; }
  .spec-list { grid-template-columns: 1fr; }
  .breadcrumb { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  input.input, select.select, textarea { font-size: 16px; } /* stops iOS zoom-on-focus */
}

/* -------------------------------------------------- concierge on phones */
@media (max-width: 900px) {
  .ai-shell > aside { display: contents; }
  .ai-shell > aside > .card:first-child { order: 1; padding: 0; border: 0; background: none; }
  .ai-shell > aside > .card:first-child h4 { display: none; }
  .ai-shell > aside > .card:first-child .stack { display: flex; flex-direction: row; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .ai-shell > aside > .card:first-child .stack::-webkit-scrollbar { display: none; }
  .ai-shell > aside > .card:first-child .chip { width: auto !important; flex: none; white-space: nowrap; margin: 0; }
  .ai-shell > .chat { order: 2; }
  .ai-shell > aside > .card:last-child { order: 3; margin-top: 0 !important; }
  .ai-shell { gap: 1rem; }
}
@media (max-width: 640px) {
  .chat:not([style*="height:auto"]) { height: calc(100svh - var(--header-h) - 58px - 5.5rem); min-height: 420px; border-radius: 14px; }
  .chat__head { padding: .75rem 1rem; }
  .chat__log { padding: 1rem .8rem; gap: .9rem; }
  .msg { max-width: 100%; gap: .5rem; }
  .msg--me { max-width: 88%; }
  .msg__avatar { width: 26px; height: 26px; font-size: .75rem; }
  .msg__bubble { padding: .65rem .8rem; font-size: .88rem; }
  .ai-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .ai-pick div { padding: .5rem .6rem; }
  .ai-pick b { font-size: .9rem; line-height: 1.2; }
  .chat__foot { padding: .6rem; }
  .chat__form .input { font-size: 16px; min-width: 0; }
  .chat__form .btn { padding-inline: 1rem; }
}

/* Grid children default to min-width:auto, so a horizontally scrolling chip
   row inside them widened the whole page on phones. */
.shop > *, .ai-shell > *, .ai-shell > aside > * { min-width: 0; }
@media (max-width: 940px) {
  .filters__head, .filters__foot { z-index: 3; }
  .shop .shop__filters .filter-group, .shop .shop__filters > .btn { position: relative; z-index: 1; }
}
@media (max-width: 900px) {
  .buybar:not(.is-on) { transform: translateY(calc(100% + 80px)); visibility: hidden; }
  .buybar { transition: transform var(--base) var(--ease), visibility var(--base); }
}
@media (max-width: 640px) {
  .page-head--compact .lead { display: none; }
  .page-head--compact h1 { margin-bottom: 0; }
  .shop__bar .select { max-width: 132px; font-size: 16px; }
  .shop__bar .shop__count { font-size: .7rem; }
}
@media (max-width: 900px) { .cat-strip, .ai-shell > aside > .card:first-child .stack { scroll-padding-inline: var(--gutter); } }
/* Eight products should read as two even rows on desktop, not 5 + 3. */
@media (min-width: 1100px) { #home-bestsellers, #home-featured { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 641px) and (max-width: 1099px) { #home-bestsellers, #home-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
