/* Customer shop styles (home + product page). Colours come from the theme chosen in Shop Manager. */
:root {
  --accent: #c2185b;
  --accent-2: #e8507f;
  --accent-soft: #fde8ef;
  --accent-ink: #7a0e39;
  --bg: #fffaf7;
  --surface: #ffffff;
  --ink: #2b1d22;
  --muted: #7d6b70;
  --line: #f0e3e5;
  --gold: #c9a24a;
  --ok: #1f8a4c;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(60, 20, 35, 0.08);
  --shadow-lg: 0 18px 50px rgba(60, 20, 35, 0.18);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- announcement + header ---------- */
.announce { background: linear-gradient(90deg, var(--accent-ink), var(--accent), var(--accent-ink)); color: #fff; font-size: 13px; font-weight: 500; overflow: hidden; white-space: nowrap; }
.announce .track { display: inline-block; padding: 8px 0; animation: marquee 22s linear infinite; }
.announce .track span { padding: 0 32px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 250, 247, 0.9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; transition: background 0.2s; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.lang-btn { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; background: var(--surface); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 15px; transition: transform 0.15s, box-shadow 0.2s, background 0.2s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent); }
.btn-ghost { background: var(--surface); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-wa { background: #1faa59; color: #fff; }
.btn-ai { background: linear-gradient(120deg, #7b2ff7, #f107a3 60%, #ff8a00); color: #fff; background-size: 200% 200%; animation: shimmer-bg 6s ease infinite; box-shadow: 0 8px 22px rgba(160, 30, 180, 0.28); }
@keyframes shimmer-bg { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, var(--accent-soft), transparent 60%), radial-gradient(800px 400px at -10% 110%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; padding-top: 34px; padding-bottom: 30px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.3px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 7vw, 60px); line-height: 1.05; margin: 14px 0 12px; letter-spacing: -0.5px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0 0 22px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.collage { position: relative; height: 330px; max-width: 460px; width: 100%; margin: 0 auto; }
.collage .ph { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 5px solid var(--surface); }
.collage .ph img { width: 100%; height: 100%; object-fit: cover; }
.collage .ph:nth-child(1) { width: 46%; height: 82%; left: 4%; top: 8%; transform: rotate(-6deg); animation: float 7s ease-in-out infinite; }
.collage .ph:nth-child(2) { width: 50%; height: 92%; left: 30%; top: 0; z-index: 2; animation: float 7s ease-in-out -2.5s infinite; }
.collage .ph:nth-child(3) { width: 42%; height: 72%; right: 0; top: 18%; transform: rotate(7deg); animation: float 7s ease-in-out -5s infinite; }
@keyframes float { 50% { translate: 0 -10px; } }
.collage .sticker { position: absolute; z-index: 3; left: -2%; bottom: 4%; padding: 10px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.collage .sticker b { color: var(--accent); }

/* ---------- trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.trust div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.trust svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---------- sections ---------- */
section.block { padding: 26px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(22px, 4vw, 30px); margin: 0; }
.sec-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.cats { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 92px; text-align: center; scroll-snap-align: start; font-size: 13px; font-weight: 500; }
.cat .ring { width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--accent), var(--gold), var(--accent-2), var(--accent)); transition: transform 0.2s; }
.cat .ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); background: var(--surface); }
.cat:hover .ring, .cat.on .ring { transform: translateY(-3px) scale(1.04); }
.cat.on { color: var(--accent); font-weight: 700; }

.tryon-banner { position: relative; overflow: hidden; border-radius: 22px; padding: 22px; color: #fff; background: linear-gradient(120deg, #3b0a45, #7b2ff7 45%, #f107a3); display: grid; gap: 14px; }
.tryon-banner h3 { margin: 0; font-family: var(--serif); font-size: clamp(22px, 4vw, 30px); }
.tryon-banner p { margin: 0; opacity: 0.9; max-width: 520px; }
.tryon-banner .btn { background: #fff; color: #5b1477; justify-self: start; }
.tryon-banner::after { content: "✨"; position: absolute; right: 18px; top: 10px; font-size: 64px; opacity: 0.35; animation: float 5s ease-in-out infinite; }

/* ---------- toolbar ---------- */
.toolbar { position: sticky; top: 62px; z-index: 30; background: var(--bg); padding: 10px 0; display: grid; gap: 10px; }
.searchbox { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 6px 0 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow); transition: border-color 0.2s; }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.searchbox .cam { height: 38px; padding: 0 12px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.searchbox .cam svg { color: var(--accent-ink); width: 18px; height: 18px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; transition: all 0.15s; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort { flex: none; height: 36px; padding: 0 10px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; margin-left: auto; }
.result-note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform 0.2s, box-shadow 0.25s; animation: rise 0.45s both; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card .img { position: relative; aspect-ratio: 3 / 4; background: #f6eeea; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .img img { transform: scale(1.05); }
.badges { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; background: var(--surface); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.badge.new { background: #1f8a4c; color: #fff; }
.badge.bestseller { background: var(--gold); color: #fff; }
.badge.sale, .badge.limited { background: var(--accent); color: #fff; }
.badge.trending { background: #7b2ff7; color: #fff; }
.badge.ai { background: rgba(255, 255, 255, 0.92); color: #7b2ff7; }
.heart { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); transition: transform 0.15s; z-index: 2; }
.heart svg { width: 19px; height: 19px; }
.heart.on { color: var(--accent); }
.heart.on svg path { fill: currentColor; }
.heart:active { transform: scale(0.85); }
.soldout { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, 0.55); font-weight: 700; letter-spacing: 1px; }
.soldout span { background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 12px; }
.card .body { padding: 10px 12px 12px; }
.card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-size: 17px; }
.price s { color: var(--muted); font-size: 13px; }
.price .off { color: var(--ok); font-weight: 600; font-size: 13px; }
.your-size { margin-top: 4px; font-size: 12px; color: var(--accent-ink); font-weight: 500; }
.skeleton { background: linear-gradient(90deg, #f3e9e5 25%, #fbf4f1 50%, #f3e9e5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); aspect-ratio: 3 / 4.9; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 46px; }

/* ---------- footer ---------- */
footer { margin-top: 40px; background: #24161b; color: #f3e7ea; padding: 34px 0 100px; }
footer .wrap { display: grid; gap: 22px; }
footer h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
footer p, footer a { color: #cdb9bf; font-size: 14px; }
footer a:hover { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); }
.foot-links svg { width: 18px; height: 18px; }
.foot-note { font-size: 12px; color: #9c868c; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 16px; }

/* ---------- product page ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; padding: 14px 0 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.pd { display: grid; grid-template-columns: 1fr; gap: 22px; padding-bottom: 20px; }
.gallery { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 20px; scrollbar-width: none; background: #f6eeea; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; scroll-snap-align: center; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.7); transition: width 0.2s; }
.dots i.on { width: 20px; background: #fff; }
.thumbs { display: none; gap: 10px; margin-top: 10px; }
.thumbs button { width: 70px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; border: 2px solid transparent; opacity: 0.7; }
.thumbs button.on { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .heart { top: 12px; right: 12px; width: 42px; height: 42px; }
.pd-cat { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.pd h1 { font-family: var(--serif); font-size: clamp(24px, 4.4vw, 34px); line-height: 1.2; margin: 6px 0 10px; }
.pd .price b { font-size: 28px; }
.pd .price s { font-size: 16px; }
.pd .price .off { font-size: 15px; padding: 2px 8px; background: #e7f6ec; border-radius: 6px; }
.stock-note { font-size: 13px; color: var(--ok); font-weight: 500; margin: 6px 0 0; }
.stock-note.out { color: #b3261e; }
.opt-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 8px; font-weight: 600; font-size: 14px; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 52px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; position: relative; }
.size.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.size .rec { position: absolute; top: -8px; right: -6px; font-size: 9px; background: var(--accent); color: #fff; border-radius: 6px; padding: 1px 5px; }
.ctas { display: grid; gap: 10px; margin-top: 20px; }
.ctas .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mini-trust div { text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.mini-trust svg { width: 22px; height: 22px; color: var(--accent); margin: 0 auto 4px; display: block; }
.details { margin-top: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.details h3 { margin: 0; padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--line); }
.details dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 14px 16px; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; }
.details .desc { padding: 0 16px 16px; white-space: pre-line; font-size: 14px; color: #4a3a3f; }
.howto { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--accent-soft); }
.howto h3 { margin: 0 0 10px; font-size: 15px; }
.howto ol { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 10px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.3s; }
.sticky-buy.show { transform: none; }
.sticky-buy .price { flex: 1; min-width: 0; }
.sticky-buy .btn { height: 46px; padding: 0 18px; }

/* ---------- modals / sheets ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(30, 12, 20, 0.5); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity 0.25s; }
.overlay.open { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); transform: translateY(40px); transition: transform 0.3s; }
.overlay.open .sheet { transform: none; }
.sheet h2 { margin: 0 34px 6px 0; font-family: var(--serif); font-size: 24px; }
.sheet .sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.sheet .close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; background: #f5eeee; display: grid; place-items: center; font-size: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.field input, .field select { height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); outline: 0; font-size: 16px; }
.field input:focus, .field select:focus { border-color: var(--accent); }
.seg { display: flex; padding: 4px; border-radius: 14px; background: #f5eeee; margin-bottom: 16px; }
.seg button { flex: 1; height: 40px; border-radius: 11px; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); color: var(--accent-ink); }
.result-box { margin-top: 6px; padding: 18px; border-radius: 16px; background: var(--accent-soft); text-align: center; }
.result-box .big { font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--accent-ink); line-height: 1.1; }
.result-box p { margin: 6px 0 0; font-size: 14px; }

.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.tips div { padding: 10px; border-radius: 12px; background: #f7f2f2; font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.tips .ok::before { content: "✓"; color: var(--ok); font-weight: 700; }
.tips .no::before { content: "✕"; color: #b3261e; font-weight: 700; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 6px 0 14px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); }
.consent input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.preview-pair figure { margin: 0; }
.preview-pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: #f6eeea; }
.preview-pair figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.magic { text-align: center; padding: 30px 10px; }
.magic .orb { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 50%; background: conic-gradient(#7b2ff7, #f107a3, #ff8a00, #7b2ff7); animation: spin 1.4s linear infinite; display: grid; place-items: center; }
.magic .orb::after { content: "✨"; width: 90px; height: 90px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 34px; animation: spin 1.4s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.magic p { font-weight: 600; min-height: 24px; }
.compare { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 4; background: #f6eeea; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare .bar { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
.compare .bar::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); }
.compare .tag { position: absolute; bottom: 10px; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12px; font-weight: 600; }
.ai-note { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 14px; }
.err { padding: 12px 14px; border-radius: 12px; background: #fdecea; color: #8c1d18; font-size: 14px; margin-bottom: 12px; }

/* ---------- wishlist ---------- */
.wl-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wl-item img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; }
.wl-item h4 { margin: 0 0 2px; font-size: 14px; font-weight: 500; }
.wl-item button { color: var(--muted); font-size: 22px; width: 36px; height: 36px; }

/* ---------- AI chat ---------- */
.chat-fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 8px; border-radius: 28px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 600; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent); transition: transform 0.2s, bottom 0.3s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab .av { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 22px; }
.chat-fab.lift { bottom: calc(84px + env(safe-area-inset-bottom)); }
.chat-fab .ping { position: absolute; top: 4px; left: 40px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid #fff; }
.chat { position: fixed; z-index: 70; right: 0; bottom: 0; width: 100%; height: 100%; max-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); transform: translateY(105%); transition: transform 0.3s; }
.chat.open { transform: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.chat-head .av { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 22px; }
.chat-head b { display: block; font-size: 16px; }
.chat-head small { opacity: 0.85; font-size: 12px; }
.chat-head .close { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 20px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; white-space: pre-wrap; animation: rise 0.25s both; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg-products { align-self: stretch; display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.mini { flex: none; width: 130px; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); font-size: 12.5px; }
.mini img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.mini div { padding: 6px 8px 8px; }
.mini b { display: block; font-size: 14px; }
.mini span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: 0.5; } }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.quick button { flex: none; padding: 8px 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); font-size: 13px; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-input input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 24px; border: 1.5px solid var(--line); outline: 0; font-size: 16px; }
.chat-input input:focus { border-color: var(--accent); }
.chat-input button { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.chat-input button svg { width: 20px; height: 20px; }

.toast { position: fixed; left: 50%; bottom: 96px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; transition: all 0.25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.demo-flag { position: fixed; left: 8px; top: 40px; z-index: 20; font-size: 11px; background: #ffe9a8; color: #6b4b00; padding: 4px 8px; border-radius: 8px; font-weight: 600; }

/* ---------- bigger screens ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tryon-banner { grid-template-columns: 1fr auto; align-items: center; padding: 28px 32px; }
  .tryon-banner .btn { justify-self: end; }
  .overlay { align-items: center; padding: 16px; }
  .sheet { border-radius: 24px; padding: 26px; }
  .chat { width: 400px; height: 640px; right: 20px; bottom: 20px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
  footer .wrap { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .hero .wrap { grid-template-columns: 1.1fr 1fr; padding-top: 56px; padding-bottom: 50px; }
  .collage { height: 440px; }
  .pd { grid-template-columns: 1.05fr 1fr; gap: 44px; padding-top: 10px; }
  .gallery { position: sticky; top: 80px; align-self: start; }
  .thumbs { display: flex; }
  .dots { display: none; }
  .sticky-buy { display: none; }
  .chat-fab.lift { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
