/* =========================================================================
   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__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__spin { position: absolute; bottom: var(--sp-4); right: var(--sp-4); z-index: 2; }

.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); }
