:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --ink: #111111;
  --ink-2: #555350;
  --ink-3: #8b8984;
  --line: #e6e4df;
  --accent: #111111;
  --accent-ink: #ffffff;
  --accent-soft: #f1efe9;
  --highlight: #f2c230;
  --sale: #d6322b;
  --danger: #c0392b;
  --warn: #9a6a12;
  --ok: #1f7a4d;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 30px rgba(0, 0, 0, 0.08);
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --serif: var(--display);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; margin: 0 0 0.4em; }
h1 { font-size: clamp(30px, 4.5vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

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

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: var(--radius-sm); border: 1.5px solid var(--ink);
  background: var(--ink); color: #fff; font: 500 15px var(--display); text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s, color 0.15s, transform 0.08s;
}
.btn:hover { background: #333; border-color: #333; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-highlight { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
.btn-highlight:hover { background: #ffd54a; border-color: #ffd54a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg, .btn svg { width: 21px; height: 21px; }
.badge {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--sale); color: #fff; font: 600 11px/18px var(--sans); text-align: center;
}

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; color: var(--ink-2); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #cfccc6; border-radius: var(--radius-sm); padding: 11px 12px; outline: none;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye svg { width: 20px; height: 20px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
input.invalid, textarea.invalid { border-color: var(--danger); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 22px; }

/* Stripes: the brand's signature divider */
.stripes { height: 14px; background: repeating-linear-gradient(-45deg, var(--ink) 0 10px, #fff 10px 20px); }

/* Announcement + header */
.announce { background: var(--ink); color: #fff; font: 500 12.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; padding: 9px 16px; }
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; }
.header-search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.header-search input { height: 46px; border-radius: 999px; padding: 0 56px 0 20px; background: var(--surface-2); border-color: transparent; }
.header-search input:focus { background: #fff; border-color: var(--ink); }
.header-search button {
  position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.header-search button svg { width: 17px; height: 17px; }
.header-actions { display: flex; align-items: center; gap: 2px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 3px 3px 3px 9px; margin-right: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-3);
}
.lang-switch svg { width: 15px; height: 15px; margin-right: 3px; }
.lang-switch button {
  height: 26px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 600 12px var(--sans); letter-spacing: 0.04em; color: var(--ink-3);
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--ink); color: #fff; }
.site-footer .lang-switch { background: transparent; border-color: #3a3a37; }
.site-footer .lang-switch button.on { background: #fff; color: var(--ink); }
.account-menu .lang-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.account-menu .lang-row > svg { width: 22px; height: 22px; }
.seg { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.seg button { white-space: nowrap; border: 0; background: none; padding: 7px 12px; border-radius: 999px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.footer-lang { margin-top: 4px; }
.account-name { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 0 6px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-nav { border-top: 1px solid var(--line); }
/* Search bar and category chips only on the shopping pages (Home tab). */
body:not(.browsing) .header-search, body:not(.browsing) .cat-nav { display: none; }
.cat-nav .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: 500 13px var(--sans); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.sale { color: var(--sale); border-color: #f2c9c6; font-weight: 600; }
.chip.sale.active { background: var(--sale); color: #fff; border-color: var(--sale); }

main { min-height: 60vh; padding: 0 0 64px; }
.page { padding-top: 28px; }

/* Hero */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 40px; min-height: 520px; padding-top: 48px; padding-bottom: 48px; }
.hero-kicker { display: inline-block; background: var(--highlight); color: var(--ink); font: 600 13px var(--display); text-transform: uppercase; letter-spacing: 0.12em; padding: 5px 12px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: 0.95; font-weight: 700; margin-bottom: 18px; }
.hero p { font-size: 17px; color: #d8d6d0; max-width: 42ch; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 440px; }
.hero-collage a { overflow: hidden; border-radius: var(--radius-sm); }
.hero-collage a:first-child { grid-row: span 2; }
.hero-collage img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.hero-collage a:hover img { transform: scale(1.04); }
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.72), rgba(0,0,0,0.15)); }
.hero.has-image .hero-inner { position: relative; grid-template-columns: 1fr; }

/* Sections */
.section { padding-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.view-all { font: 500 14px var(--display); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }

/* Category tiles (Zalora style) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-tile { position: relative; aspect-ratio: 4 / 5; overflow: hidden; text-decoration: none; display: block; border-radius: var(--radius-sm); }
.cat-tile img { position: absolute; left: 14%; right: 14%; bottom: 0; width: 72%; height: 66%; object-fit: cover; border-radius: 4px 4px 0 0; transition: transform 0.35s; box-shadow: 0 -6px 24px rgba(0,0,0,0.12); }
.cat-tile:hover img { transform: translateY(-6px); }
.cat-tile .label { position: absolute; left: 16px; top: 14px; right: 16px; font: 700 clamp(26px, 3.2vw, 38px)/1 var(--display); text-transform: uppercase; }
.cat-tile .count { position: absolute; left: 16px; top: calc(14px + clamp(26px, 3.2vw, 38px) + 6px); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }

/* Product cards + carousel */
.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-btn {
  position: absolute; top: calc(50% - 50px); z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: #fff; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
}
.carousel-btn.prev { left: -14px; }
.carousel-btn.next { right: -14px; }
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 16px; }
.product-card { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-width: 0; }
.product-card .thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s; }
.product-card:hover .thumb img { transform: scale(1.04); }
.badges { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.tag-badge { font: 600 11px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 8px; background: var(--ink); color: #fff; }
.tag-badge.sale { background: var(--sale); }
.tag-badge.out { background: #fff; color: var(--ink); }
.quick-view {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12); opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s;
}
.quick-view svg { width: 19px; height: 19px; }
.product-card:hover .quick-view, .quick-view:focus-visible { opacity: 1; transform: none; }
.product-card .name { font: 500 15px/1.25 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.product-card .cat { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.price-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.price-line .now.on-sale { color: var(--sale); }
.price-line s { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.empty { text-align: center; padding: 64px 16px; color: var(--ink-2); }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust > div { background: #fff; display: flex; gap: 14px; align-items: center; padding: 20px; }
.trust svg { width: 30px; height: 30px; flex: none; }
.trust strong { display: block; font: 600 15px var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.trust span { font-size: 13px; color: var(--ink-2); }

/* Story band */
.story { margin-top: 56px; background: var(--ink); color: #fff; }
.story .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.story h2 { font-size: clamp(36px, 5vw, 60px); line-height: 0.95; margin: 0; }
.story p { color: #cfcdc7; font-size: 16px; }

/* Listing page */
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head h1 { margin: 0; }
.list-tools { display: flex; gap: 10px; align-items: center; }
.list-tools select { width: auto; height: 40px; padding: 0 12px; font-size: 14px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Product page */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.product-page .photo { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; }
.product-page .photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; scroll-snap-align: start; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gal-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.6); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
.gal-dots span.on { background: #fff; width: 18px; border-radius: 999px; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gal-thumbs button { flex: none; width: 68px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--surface-2); cursor: pointer; opacity: 0.7; }
.gal-thumbs button.on { border-color: var(--ink); opacity: 1; }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { position: sticky; top: 140px; }
.product-info h1 { font-size: clamp(28px, 3.5vw, 40px); margin: 6px 0 12px; }
.price-lg { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font: 600 26px var(--display); margin-bottom: 20px; }
.price-lg.on-sale .now { color: var(--sale); }
.price-lg s { font-size: 18px; color: var(--ink-3); font-weight: 400; }
.price-lg .off { font: 600 13px var(--sans); background: var(--sale); color: #fff; padding: 3px 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); background: #fff; height: 46px; }
.qty button { width: 40px; height: 100%; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty button:disabled { color: var(--ink-3); cursor: not-allowed; }
.qty span { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.qty .qty-input {
  width: 42px; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
}
.qty .qty-input:focus { background: var(--surface-2); box-shadow: none; }
.qty.sm .qty-input { width: 36px; }
.qty.sm { height: 34px; border-width: 1px; }
.qty.sm button { width: 30px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.buy-row .btn-accent { flex: 1; min-width: 160px; }
.stock-note { font-size: 13px; color: var(--ok); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stock-note::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-note.low { color: var(--warn); }
.stock-note.out { color: var(--danger); }
.ask-box { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0; }
.ask-box svg { width: 26px; height: 26px; flex: none; }
.ask-box div { flex: 1; font-size: 14px; }
.ask-box strong { display: block; }
details.acc { border-top: 1px solid var(--line); }
details.acc:last-of-type { border-bottom: 1px solid var(--line); }
details.acc summary { list-style: none; display: flex; justify-content: space-between; cursor: pointer; padding: 16px 0; font: 500 15px var(--display); text-transform: uppercase; letter-spacing: 0.05em; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: '+'; font-size: 20px; line-height: 1; }
details.acc[open] summary::after { content: '−'; }
details.acc .acc-body { padding: 0 0 18px; color: var(--ink-2); white-space: pre-line; }
.mobile-buybar { display: none; }

/* Cart & checkout */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-line img { width: 88px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.cart-line .name { font: 500 16px var(--display); text-transform: uppercase; text-decoration: none; }
.cart-line .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.summary { position: sticky; top: 140px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-variant-numeric: tabular-nums; font-size: 14px; }
.summary-row.save { color: var(--sale); }
.summary-row.total { font: 600 20px var(--display); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.addr-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.addr-card { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; }
.addr-card:has(input:checked) { border-color: var(--ink); background: #fafaf8; }
.addr-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.addr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.addr-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.addr-tag.main { background: var(--ink); color: #fff; }
.addr-row { margin-bottom: 10px; }
.addr-actions { display: flex; gap: 16px; margin-top: 10px; }
.ship-progress { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; font-size: 14px; background: #fff; }
.ship-progress .bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.ship-progress .bar span { display: block; height: 100%; background: var(--highlight); border-radius: 99px; }
.ship-progress.done { border-color: #bfe3cf; background: #f1faf5; }
.ship-progress.done .bar span { background: var(--ok); }
.note { background: #fff8e1; border: 1px solid #f5e2a6; color: #6b5310; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.steps { display: flex; gap: 8px; align-items: center; font: 500 13px var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 16px; }
.steps .on { color: var(--ink); }

/* Auth & account */
.auth-box { max-width: 440px; margin: 20px auto; }
.auth-box .switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.account-menu { list-style: none; margin: 0; padding: 0; }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-decoration: none; cursor: pointer; text-align: left; }
.account-menu svg { width: 22px; height: 22px; }
.account-menu .chev { margin-left: auto; color: var(--ink-3); }
.account-menu .logout { color: var(--danger); font-weight: 600; }

/* Orders */
.order { margin-bottom: 16px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.status-paid { background: #fdf1d8; color: var(--warn); }
.status-shipped { background: #e1ecf7; color: #2d5c8a; }
.status-completed { background: #e2f1e8; color: var(--ok); }
.status-cancelled { background: #f6e1dd; color: var(--danger); }
.order-items { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.order-items li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }

/* Footer */
.site-footer { background: var(--ink); color: #bdbbb5; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.site-footer .logo { color: #fff; display: inline-block; margin-bottom: 12px; }
.site-footer h4 { color: #fff; font: 500 14px var(--display); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2c2c2a; padding-top: 18px; padding-bottom: 18px; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Chat */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; height: 52px; padding: 0 22px 0 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.chat-fab .badge { top: -4px; right: -4px; }
.chat-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 31; width: 380px; max-width: calc(100vw - 32px);
  height: min(580px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25); border-radius: 10px;
}
.chat-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px 10px 6px; border-bottom: 1px solid var(--line); background: var(--ink); color: #fff; }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-topic { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.chat-topic img { width: 40px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; }
.chat-topic > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.chat-topic strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.ti-icon svg { width: 20px; height: 20px; }
.thread-list { display: flex; flex-direction: column; gap: 8px; }
.thread-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.thread-item:hover { border-color: var(--ink); }
.thread-item img { width: 44px; height: 52px; border-radius: 6px; object-fit: cover; flex: none; }
.ti-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ti-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item.unread .ti-main .small { color: var(--ink); font-weight: 600; }
.ti-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.badge-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sale); color: #fff; font: 600 11px/18px var(--sans); text-align: center; }

/* Account details */
.profile { margin: 4px 0 18px; }
.profile-head { display: flex; justify-content: space-between; align-items: center; }
.profile-head h3 { margin: 0; }
.profile-view { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 14px 0 0; font-size: 14px; }
.profile-view dt { color: var(--ink-3); }
.profile-view dd { margin: 0; overflow-wrap: anywhere; }
#profile-form { margin-top: 14px; }

/* My orders: product photos and shipping info */
.order-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.order-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.order-line img, .ol-img { width: 56px; height: 70px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.ol-name { display: flex; flex-direction: column; font-weight: 500; font-size: 14px; }
.ol-total { font-variant-numeric: tabular-nums; font-size: 14px; }
.ship-info { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.ship-info h4 { margin: 0 0 10px; font: 600 14px var(--sans); }
.kv { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; font-size: 14px; margin-bottom: 8px; overflow-wrap: anywhere; }
.kv > span:first-child { color: var(--ink-3); }
.kv .resi { letter-spacing: 0.03em; margin-right: 8px; }

/* Delivery progress (live tracking) */
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 10px; }
.track-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e1ecf7; color: #2d5c8a; }
.track-status.done { background: #e2f1e8; color: var(--ok); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 6px; }
.timeline li::before { content: ''; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #cfccc6; border: 2px solid #fff; }
.timeline li.latest::before { background: var(--ok); box-shadow: 0 0 0 3px #e2f1e8; }
.timeline li.latest .tl-note { font-weight: 600; color: var(--ink); }
.tl-note { font-size: 14px; color: var(--ink-2); }
.tl-when { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.track-toggle { margin-top: 4px; }
.chat-head strong { font: 600 18px var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.chat-head .small { color: #bdbbb5; }
.chat-head .icon-btn { color: #fff; }
.chat-head .icon-btn:hover { background: rgba(255,255,255,0.12); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 14px; overflow-wrap: anywhere; }
.bubble .text { white-space: pre-wrap; }
.bubble .when { display: block; font-size: 11px; opacity: 0.6; margin-top: 3px; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.product-ref { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 6px; margin-bottom: 6px; text-decoration: none; color: inherit; }
.bubble.theirs .product-ref { background: var(--surface-2); }
.product-ref img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.product-ref span { font-size: 12px; line-height: 1.3; }
/* The thread's topic (product / order / general), shown under the chat header. */
.chat-attach { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; }
.chat-attach img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }
.chat-attach .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form textarea { min-height: 44px; height: 44px; max-height: 120px; resize: none; overflow: hidden; border-radius: 22px; padding: 11px 16px; }
.chat-form .btn { width: 46px; padding: 0; border-radius: 999px; flex: none; }
.chat-empty { margin: auto; text-align: center; color: var(--ink-2); font-size: 14px; padding: 0 20px; }
.quick-qs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.quick-qs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 13px var(--sans); cursor: pointer; }
.quick-qs button:hover { border-color: var(--ink); }

/* Bottom tab bar (mobile) */
.tabbar { display: none; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow); animation: rise 0.2s ease-out; }
.toast-error { background: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 620px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.qv { max-width: 860px; display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; position: relative; }
.qv .photo { background: var(--surface-2); aspect-ratio: 4 / 5; }
.qv .photo img { width: 100%; height: 100%; object-fit: cover; }
.qv .info { padding: 28px; display: flex; flex-direction: column; }
.qv .close { position: absolute; right: 10px; top: 10px; background: #fff; }

@media (max-width: 1024px) {
  .carousel-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-inner, .product-page, .two-col, .story .wrap { grid-template-columns: 1fr; }
  .hero-inner { min-height: 0; gap: 28px; padding-top: 36px; padding-bottom: 36px; }
  .hero-collage { height: 300px; }
  .product-page { gap: 24px; }
  .product-info, .summary { position: static; }
  .qv { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --tabbar-h: 64px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .announce { font-size: 11px; padding: 7px 12px; }
  .header-main { flex-wrap: wrap; height: auto; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .logo { font-size: 23px; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; }
  .header-actions { margin-left: auto; }
  .header-actions .desktop-only, .account-name { display: none; }
  .cat-nav .wrap { padding-top: 8px; padding-bottom: 8px; }
  .section { padding-top: 36px; }
  .hero-collage { height: 220px; }
  .account-menu .lang-row .seg { margin-left: 0; width: 100%; }
  .account-menu .lang-row .seg button { flex: 1; justify-content: center; text-align: center; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .carousel-track { grid-auto-columns: 44%; gap: 12px; }
  .carousel-btn { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .trust > div { padding: 14px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .row { flex-direction: column; gap: 0; }
  .quick-view { opacity: 1; transform: none; width: 34px; height: 34px; }
  .product-card .name { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .chat-fab { display: none; }
  /* On phones the chat is a page like Cart or Account: the shop header stays on top, the
     bottom menu below, and the title row looks like the other page titles. */
  .chat-panel {
    inset: var(--chat-top, 0px) 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom)) 0; width: auto; max-width: none; height: auto;
    border-radius: 0; border: 0; box-shadow: none; z-index: 45; background: var(--bg);
  }
  .chat-panel .chat-head { background: var(--bg); color: var(--ink); padding: 16px 16px 12px; gap: 8px; border-bottom: 1px solid var(--line); }
  .chat-panel .chat-head strong { font: 600 30px/1.1 var(--display); letter-spacing: 0.01em; }
  .chat-panel .chat-head .small { color: var(--ink-2); margin-top: 2px; }
  .chat-panel .chat-head .icon-btn { color: var(--ink); margin-left: -10px; }
  .chat-panel .chat-head .icon-btn:hover { background: var(--surface-2); }
  .chat-panel[data-mode="list"] #chat-back { display: none; }
  .chat-panel .chat-body { background: var(--bg); }
  body.chat-open .tabbar { box-shadow: none; }
  body.chat-open .header-search, body.chat-open .cat-nav { display: none; }
  body.chat-open { overflow: hidden; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; color: var(--ink-3); font: 500 11px var(--sans); text-decoration: none; cursor: pointer;
  }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .on { color: var(--ink); }
  .tabbar .on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--ink); border-radius: 0 0 3px 3px; }
  .tabbar .badge { top: 6px; right: calc(50% - 20px); }

  body.has-buybar .mobile-buybar {
    display: flex; gap: 10px; align-items: center; position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 39;
    background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
  }
  .mobile-buybar .p { flex: 1; min-width: 0; }
  .mobile-buybar .p span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-buybar .p strong { display: block; font: 600 17px var(--display); }
  .mobile-buybar .btn { height: 44px; }
  .mobile-buybar .btn-ghost { width: 44px; padding: 0; }
  body.has-buybar main { padding-bottom: 140px; }
  body.has-buybar .toasts { bottom: calc(24px + var(--tabbar-h) + 64px); }
}
