:root {
  --bg: #faf6f0;
  --bg-alt: #f3ece2;
  --surface: #ffffff;
  --ink: #1d1b18;
  --muted: #6e665c;
  --line: #e6ddd1;
  --accent: #a94f39;
  --accent-ink: #ffffff;
  --accent-soft: #f6e5dc;
  --serif: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 8px 28px rgba(40, 30, 20, .08);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
/* no double-tap zoom on controls (rapid taps on "+" zoomed the page); pinch-zoom stays available */
a, button, label, input, select, textarea { touch-action: manipulation; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow {
  font: 500 12px/1.4 var(--sans); letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }
.lead { font-size: 19px; font-weight: 300; color: #3d3832; margin-top: 18px; max-width: 34em; }
.loading { color: var(--muted); padding: 40px 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  font: 500 15px/1 var(--sans); letter-spacing: .04em;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 246, 240, .86); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand img { height: 38px; width: auto; mix-blend-mode: multiply; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; font-size: 15px; letter-spacing: .06em; position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s; transform-origin: left;
}
.nav a:hover::after { transform: scaleX(1); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 600; }
.hero-collage { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: 520px; }
.hero-collage img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; transition: opacity .6s;
}
.hero-collage img.loaded { opacity: 1; }
.hero-collage img:first-child { grid-row: span 2; }

/* Steps */
.steps ol {
  list-style: none; margin: 0; padding: 34px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
.steps .n {
  grid-row: span 2; font: italic 600 44px/1 var(--serif); color: var(--accent);
}
.steps h2 { font-size: 21px; margin-top: 4px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head .small { margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font: 400 14px/1.2 var(--sans);
  transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Model cards */
.grid.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 26px; }
.card {
  cursor: pointer; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(40,30,20,.06), 0 18px 40px rgba(40,30,20,.13); }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.card .ph { aspect-ratio: 4 / 5; background: var(--bg-alt); position: relative; }
.scroller {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; user-select: none; }
.ph-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); box-shadow: var(--shadow); font-size: 22px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity .2s; z-index: 2;
}
.ph-nav.prev { left: 10px; } .ph-nav.next { right: 10px; }
.ph-nav:disabled { visibility: hidden; }
@media (hover: hover) { .card:hover .ph-nav, .ph-nav:focus-visible { opacity: 1; } }
.card .count {
  position: absolute; right: 12px; bottom: 12px; background: rgba(29,27,24,.72); color: #fff;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; pointer-events: none;
}
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.4); transition: all .2s; }
.dots i.on { background: #fff; transform: scale(1.3); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.card .cat { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 21px; }
.card-link { all: unset; cursor: pointer; }
.card .price { color: var(--accent); font-weight: 500; margin-top: 4px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 40px;
  background: var(--accent-soft); border-radius: var(--radius); padding: 18px 22px; color: #5b2a1e;
}
.notice svg { width: 22px; height: 22px; flex: none; fill: var(--accent); margin-top: 2px; }

/* Fabrics */
.prose { max-width: 46em; color: #3d3832; display: grid; gap: 10px; margin-bottom: 40px; }
.theme { margin-top: 44px; }
.theme h3 { font-size: 26px; display: flex; align-items: baseline; gap: 12px; }
.theme h3 span { font: 400 14px var(--sans); color: var(--muted); }
.theme .row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; margin-top: 18px; }
.swatch { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.swatch .sw {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: var(--shadow);
  border: 4px solid var(--surface); transition: transform .3s;
}
.swatch .sw img { width: 100%; height: 100%; object-fit: cover; }
.swatch:hover .sw { transform: scale(1.05) rotate(-2deg); }
.swatch:focus-visible .sw { outline: 2px solid var(--accent); outline-offset: 3px; }
.swatch span { text-align: center; font-size: 15px; }

/* Contact */
.contact { text-align: center; max-width: 720px; }
.contact .lead { margin-inline: auto; }
.contact .actions { justify-content: center; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot img { height: 26px; width: auto; mix-blend-mode: multiply; opacity: .85; }

/* Dialogs */
.modal {
  border: 0; padding: 0; border-radius: 20px; background: var(--surface); color: var(--ink);
  width: min(1100px, 100% - 32px); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal::backdrop { background: rgba(29, 27, 24, .62); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-body { display: grid; grid-template-columns: 1.25fr 1fr; position: relative; }
.close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); box-shadow: var(--shadow); font-size: 26px; line-height: 1; cursor: pointer;
}
.gallery { background: #f4efe8; display: flex; flex-direction: column; min-width: 0; }
.stage { position: relative; height: min(64vh, 600px); touch-action: pan-y; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); box-shadow: var(--shadow); font-size: 28px; line-height: 1; cursor: pointer;
}
.nav-btn.prev { left: 12px; } .nav-btn.next { right: 12px; }
.counter {
  position: absolute; left: 14px; bottom: 12px; background: rgba(29,27,24,.7); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; scrollbar-width: thin; }
.thumbs button {
  all: unset; cursor: pointer; flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  opacity: .55; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s;
}
.thumbs button[aria-current="true"] { opacity: 1; outline-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { padding: 40px 36px 32px; overflow-y: auto; max-height: calc(100vh - 48px); }
.info h2 { font-size: 32px; }
.info .price { color: var(--accent); font-size: 20px; font-weight: 500; margin-top: 8px; }
.details { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.details li { display: flex; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: 16px; }
.details li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.details li .t { flex: 1; }
.details li .p { font-weight: 500; white-space: nowrap; }

.zoom { width: min(760px, 100% - 32px); }
.zoom .modal-body { grid-template-columns: 1fr; }
.zoom img { width: 100%; max-height: 70vh; object-fit: cover; }
.zoom-caption { padding: 22px 28px 28px; }
.zoom-caption h2 { font-size: 28px; }

html:has(dialog[open]) { overflow: hidden; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.link { all: unset; cursor: pointer; text-decoration: underline; color: var(--muted); font-size: 14px; }

/* Header bag button */
.bag-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: grid; place-items: center; margin-left: 4px;
}
.bag-btn svg { width: 20px; height: 20px; fill: var(--ink); }
.bag-btn:hover { border-color: var(--ink); }
.bag-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 500 12px/20px var(--sans); text-align: center;
}
.bag-btn.bump { animation: bump .45s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }
.nav { align-items: center; }

/* Options in model dialog */
.options { border: 0; padding: 0; margin: 22px 0 0; }
.options legend { font-weight: 500; font-size: 15px; margin-bottom: 10px; padding: 0; }
.opt-list { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.opt:hover { border-color: #b9ad9e; }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.opt .t { flex: 1; font-size: 15px; line-height: 1.35; }
.opt .p { font-weight: 500; white-space: nowrap; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt-error { color: var(--accent); font-weight: 500; font-size: 14px; margin-top: 8px; }
.options.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pending {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.pending .link { color: var(--accent); font-weight: 500; }
.bag-item .fabric .change { margin-left: auto; font-size: 13px; }

/* Fabric picking mode */
.fabrics.picking .swatch .sw { outline: 2px dashed transparent; outline-offset: 4px; }
.fabrics.picking .swatch:hover .sw { outline-color: var(--accent); }
.pickbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30;
  width: min(640px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; padding: 12px 12px 12px 20px; border-radius: 999px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.pickbar p { flex: 1; font-size: 15px; line-height: 1.35; }
.pickbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.pickbar .btn.ghost:hover { background: #fff; color: var(--ink); }

/* Bag drawer */
.drawer {
  border: 0; padding: 0; margin: 0 0 0 auto; width: min(460px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh;
  background: var(--surface); color: var(--ink); display: none; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.2);
}
.drawer[open] { display: flex; animation: slide .25s ease-out; }
.drawer::backdrop { background: rgba(29, 27, 24, .5); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 26px; }
.drawer-head .close { position: static; box-shadow: none; background: var(--bg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.bag-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bag-empty { color: var(--muted); background: var(--bg); border-radius: 12px; padding: 16px; font-size: 15px; }
.bag-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bag-item > img { width: 72px; height: 88px; object-fit: cover; border-radius: 10px; background: var(--bg-alt); }
.bag-item h4 { margin: 0; font: 600 17px/1.25 var(--serif); }
.bag-item .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.bag-item .fabric { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 6px; }
.bag-item .fabric img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.bag-item .fabric .tbd { width: 24px; height: 24px; border-radius: 50%; background: repeating-linear-gradient(45deg, #e8dfd3 0 4px, #f6f1ea 4px 8px); }
.bag-item .line { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { all: unset; cursor: pointer; width: 30px; height: 30px; text-align: center; font-size: 17px; }
.qty button:focus-visible { outline: 2px solid var(--accent); border-radius: 50%; }
.qty span { min-width: 22px; text-align: center; font-size: 15px; }
.bag-item .rm { font-size: 13px; }
.bag-item .p { font-weight: 500; }
.bag-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 500; margin-top: 16px; }
.bag-total:empty { display: none; }
.bag-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.bag-form { display: grid; gap: 12px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.bag-form h3 { font-size: 21px; }
.bag-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 500; }
.bag-form input:not([type=checkbox]), .bag-form textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.bag-form input:focus, .bag-form textarea:focus { outline: none; border-color: var(--ink); }
.bag-form textarea { resize: vertical; }
.bag-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); }
.bag-form .consent input { accent-color: var(--accent); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.bag-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bag-form .btn { width: 100%; margin-top: 4px; }
.bag-form .btn[disabled] { opacity: .6; pointer-events: none; }
.form-error { color: #9b2c1c; font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.bag-done { text-align: center; padding: 40px 10px; display: grid; gap: 14px; justify-items: center; }
.bag-done svg { width: 56px; height: 56px; fill: #2f7a4f; }
.bag-done h3 { font-size: 30px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; transition: all .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 56px; }
  .hero-collage { height: 360px; }
  .steps ol { grid-template-columns: 1fr; gap: 22px; }
  .modal { width: 100%; max-height: 100%; height: 100%; border-radius: 0; margin: 0; max-width: none; }
  .modal-body { grid-template-columns: 1fr; height: 100%; overflow-y: auto; }
  .stage { height: auto; aspect-ratio: 1; max-height: 62vh; }
  .info { max-height: none; overflow: visible; padding: 26px 20px 40px; }
  .zoom { height: auto; border-radius: 20px; margin: auto; width: calc(100% - 32px); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top-inner { height: 62px; }
  .brand img { height: 28px; }
  .nav { gap: 13px; }
  .nav a { font-size: 14px; }
  .bag-btn { width: 38px; height: 38px; margin-left: 0; }
  .pickbar { border-radius: 18px; padding: 12px 12px 12px 16px; }
  .pickbar p { font-size: 14px; }
  .ph-nav { display: none; }
  .qty button { width: 38px; height: 38px; font-size: 19px; }
  .section { padding: 64px 0; }
  .hero-collage { height: 280px; gap: 10px; }
  .grid.models { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card .body { padding: 12px 12px 14px; }
  .card h3 { font-size: 17px; }
  .card .price { font-size: 14px; }
  .theme .row { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .swatch span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
