:root {
  --ink: #161616;
  --ink-2: #5c5c5c;
  --line: #e4e2dd;
  --bg: #ffffff;
  --soft: #f5f3ef;
  --accent: #8a5a2b;
  --page: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; letter-spacing: .02em;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(20px, 2.4vw, 26px); }
p { margin: 0; }
button, select, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--ink-2); font-size: 13px; }
.vendor, .eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.link { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.link:hover { text-decoration-thickness: 2px; }
.link.center { display: block; text-align: center; margin-top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 28px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); font-size: 14px; letter-spacing: .08em; transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 12px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; position: relative; }

/* Header */
.announce { background: var(--ink); color: #fff; text-align: center; font-size: 12px; letter-spacing: .1em; padding: 9px var(--gutter); }
.header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 28px; padding: 10px var(--gutter);
}
.logo { font-size: 19px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.logo span { font-weight: 300; }
.nav { display: flex; gap: 26px; flex: 1; }
.nav a { font-size: 14px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.on { color: var(--ink); border-color: var(--ink); }
.nav .nav-fit { color: var(--accent); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 6px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 0 12px; height: 40px; }
.search input { border: 0; outline: 0; width: 150px; background: transparent; font-size: 14px; }
.search:focus-within { border-color: var(--ink); }
.menu-btn { display: none; }
.count-bubble {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--ink); color: #fff; font-size: 11px; line-height: 18px; text-align: center; letter-spacing: 0;
}

/* Layout */
main { min-height: 60vh; }
.section { max-width: var(--page); margin: 0 auto; padding: 44px var(--gutter); }
.section.page { padding-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.lede { color: var(--ink-2); max-width: 62ch; margin-top: 10px; }

/* Hero */
.hero { background: var(--soft); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; padding: 0 var(--gutter); overflow: hidden; }
.hero-copy { max-width: 520px; margin-left: auto; padding: 56px 0; }
.hero-copy h1 { font-size: clamp(34px, 5vw, 60px); margin: 14px 0 16px; }
.hero-copy p { color: var(--ink-2); font-size: 16px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-art { display: block; height: min(72vh, 620px); padding-top: 24px; }
.hero-art svg { height: 100%; width: 100%; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 18px; }
.card { display: flex; flex-direction: column; gap: 3px; }
.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 10px; }
.pimg { width: 100%; height: 100%; display: block; }
.pimg.photo { object-fit: cover; padding: 0 !important; }
.card-media .pimg { padding: 8%; transition: transform .35s ease; }
.card:hover .pimg { transform: scale(1.05); }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }
.card-title { font-size: 15px; }
.card-price { font-size: 15px; }
.card-dots { display: flex; gap: 5px; margin-top: 5px; }
.card-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.badge { position: absolute; left: 10px; bottom: 10px; background: #fff; border: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; padding: 3px 10px; border-radius: 20px; }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat { text-align: center; font-size: 13px; }
.cat-media { background: var(--soft); aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin-bottom: 8px; padding: 14%; transition: background .2s; }
.cat:hover .cat-media { background: #ebe7df; }

/* Banner */
.banner { background: var(--ink); color: #fff; text-align: center; padding: 64px var(--gutter); }
.banner p { max-width: 54ch; margin: 12px auto 24px; color: #cfcbc4; }

/* Sellers */
.sellers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.seller { padding: 28px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; transition: transform .2s; }
.seller:hover { transform: translateY(-3px); }
.seller p { color: #3d3d3d; flex: 1; }
.seller-hero { text-align: center; padding: 56px var(--gutter); }
.seller-hero h1 { margin: 10px 0; }
.seller-hero p { color: #3d3d3d; }

/* Shop toolbar */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 16px; }
.chip { border: 1px solid var(--line); border-radius: 30px; padding: 6px 16px; font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 14px 0 24px; font-size: 13px; color: var(--ink-2); }
.toolbar select { border: 1px solid var(--line); background: #fff; padding: 7px 10px; margin-left: 6px; color: var(--ink); }
.toolbar .count { margin-left: auto; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-2); }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.pdp-media { aspect-ratio: 4 / 5; padding: 6%; position: sticky; top: 90px; }
.pdp-info h1 { font-size: clamp(26px, 3.2vw, 38px); margin: 8px 0; }
.price { font-size: 19px; margin-bottom: 8px; }
.opt-label { display: block; font-size: 13px; color: var(--ink-2); margin: 20px 0 8px; }
.opt-label b { color: var(--ink); font-weight: 500; }
.swatches, .sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); box-shadow: inset 0 0 0 3px #fff; }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.size { min-width: 46px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 40px; font-size: 13px; }
.size:hover { border-color: var(--ink); }
.size.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 32px; height: 32px; font-size: 16px; }
.qty span { min-width: 28px; text-align: center; font-size: 14px; }
.qty.big { margin-bottom: 14px; }
.qty.big button { width: 44px; height: 44px; }
.qty.big span { min-width: 44px; }
.desc { margin-top: 24px; color: #3d3d3d; }
.facts { margin: 16px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }

/* Build a Fit */
.fit-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 32px; margin-top: 28px; align-items: start; }
.fit-stage { position: relative; background: var(--soft); border: 1px solid var(--line); --row: 60px; height: calc(var(--row) * 10 + 32px); padding: 16px 14px; }
.fit-mannequin { position: absolute; inset: 14px 0; display: grid; place-items: center; pointer-events: none; }
.fit-mannequin svg { height: 100%; }
.fit-rows { position: relative; height: 100%; display: grid; grid-template-rows: repeat(10, 1fr); }
.fit-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed rgba(0,0,0,.09); }
.fit-row:last-child { border-bottom: 0; }
.fit-side { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 31%; }
.fit-side.right { text-align: right; justify-content: flex-end; }
.fit-arrow { display: flex; flex-direction: column; align-items: center; }
.arrow {
  width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-size: 24px; line-height: 1;
  display: grid; place-items: center; padding-bottom: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: background .15s, color .15s; flex: none;
}
.arrow:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.arrow:active { transform: scale(.94); }
.fit-short { display: none; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-top: 2px; }
.fit-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fit-side.right .fit-meta { align-items: flex-end; }
.fit-slot { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fit-item { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fit-item.none { color: var(--ink-2); font-weight: 400; font-style: italic; }

.fit-summary { border: 1px solid var(--line); padding: 22px; position: sticky; top: 86px; }
.fit-summary-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.fit-list { list-style: none; margin: 0; padding: 0; }
.fit-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fit-line.empty { justify-content: space-between; padding: 8px 0; }
.fit-thumb { width: 46px; height: 54px; flex: none; padding: 3px; }
.fit-line-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.fit-line-info b { font-weight: 500; font-size: 14px; }
.fit-line-slot { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.fit-line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; white-space: nowrap; }
.fit-total { display: flex; justify-content: space-between; font-size: 17px; padding: 16px 0 4px; }
.fit-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fit-tools .btn { min-height: 40px; padding: 0 10px; font-size: 13px; }

/* Account & seller dashboard */
.nav .nav-account { margin-left: auto; }
.auth { max-width: 440px; }
.auth h1 { font-size: 30px; margin-bottom: 18px; }
.auth > .muted { margin-top: 28px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form.wide { max-width: 820px; }
.form.inline { flex-direction: row; align-items: flex-end; max-width: 520px; }
.form.inline .field { flex: 1; }
.form-head { display: flex; justify-content: space-between; align-items: baseline; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.field small { font-size: 12px; }
.field > button { align-self: flex-start; }
.field input:not([type=color]):not([type=file]), .field select, .field textarea, .dash-tools select, .color-row input:not([type=color]) {
  border: 1px solid #c9c6bf; background: #fff; padding: 10px 12px; min-height: 44px; font-size: 15px; color: var(--ink); width: 100%; border-radius: 0;
}
.field textarea { resize: vertical; }
.field input[type=color], .color-row input[type=color] { width: 52px; height: 44px; padding: 2px; border: 1px solid #c9c6bf; background: #fff; flex: none; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.color-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.color-row { display: flex; gap: 8px; align-items: center; max-width: 440px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-actions { display: flex; align-items: center; gap: 24px; }
.link.danger { color: #a3261f; }
.note { padding: 10px 14px; font-size: 14px; border-left: 3px solid; margin: 0 0 4px; }
.note.err { background: #fbeeed; border-color: #a3261f; color: #7c1c17; }
.note.ok { background: #edf5ee; border-color: #2f6b3a; color: #23502b; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(26px, 3vw, 36px); margin: 4px 0; }
.dash-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dash-tools select { width: auto; min-width: 180px; }
.dash-tools .btn { min-height: 44px; padding: 0 18px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { padding: 10px 0; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--ink); border-color: var(--ink); }
.dash-bar { margin: 12px 0 8px; }
.plist, .logins { list-style: none; margin: 0; padding: 0; }
.plist li, .logins li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plist-thumb { width: 52px; height: 64px; flex: none; padding: 3px; }
.plist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plist-info b { font-weight: 500; }
.status { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; background: #eeece7; color: var(--ink-2); }
.status.on { background: #e3f0e5; color: #23502b; }
.logins { max-width: 520px; margin: 16px 0 24px; }
.logins li { justify-content: space-between; }

/* SEO & analytics (admin) */
.seo .lede { margin-bottom: 20px; }
.seo-range { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.seo-range .chip { background: #fff; cursor: pointer; }
.seo-range .chip.on { background: var(--ink); }
.seo-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.seo-tiles.three { grid-template-columns: repeat(3, 1fr); }
.seo-tile { border: 1px solid var(--line); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.seo-tile span { font-size: 13px; color: var(--ink-2); }
.seo-tile b { font-size: 34px; font-weight: 500; line-height: 1.1; letter-spacing: 0; }
.seo-tile small { font-size: 12px; }
.seo-tile small.up { color: #23643a; }
.seo-tile small.down { color: #a3261f; }
.seo-card { border: 1px solid var(--line); padding: 22px; margin-bottom: 18px; background: #fff; }
.seo-card h3 { font-size: 17px; margin-bottom: 14px; }
.seo-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.seo-chart { width: 100%; height: auto; display: block; }
.seo-chart text { font-size: 11px; fill: var(--ink-2); letter-spacing: 0; }
.seo-chart .grid { stroke: #ecebe6; stroke-width: 1; }
.seo-chart .axis { stroke: #c9c6bf; stroke-width: 1; }
.seo-chart .bar { fill: #2f6da3; }
.seo-chart g:hover .bar { fill: #1d4f7c; }
.seo-tip { position: fixed; z-index: 90; background: var(--ink); color: #fff; font-size: 12.5px; padding: 7px 11px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
.seo-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.seo-bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.seo-bars-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-bars-label em { font-style: normal; color: var(--ink-2); font-size: 12px; margin-left: 4px; }
.seo-bars-track { height: 10px; background: #f1efea; border-radius: 0 4px 4px 0; overflow: hidden; }
.seo-bars-track i { display: block; height: 100%; background: #2f6da3; border-radius: 0 4px 4px 0; }
.seo-bars b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.seo-table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.seo-table td { padding: 9px 0; border-bottom: 1px solid #f0eee9; }
.seo-table .n { text-align: right; font-variant-numeric: tabular-nums; width: 70px; }
.seo-table td:first-child { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-gsc ol { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; }
.seo-gsc p { max-width: 75ch; }
.seo-gsc { overflow-wrap: anywhere; }
.seo-filter { border: 1px solid #c9c6bf; padding: 8px 12px; min-height: 40px; font-size: 14px; width: min(260px, 50%); }
.seo-list { list-style: none; margin: 0; padding: 0; }
.seo-list li { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.seo-row-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.seo-row-main b { font-weight: 500; }
.seo-row-title { color: #1a0dab; font-size: 14px; }
.seo-row-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 45%; }
.status.warn { background: #fbefd5; color: #7a5200; }
.seo-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 20px; align-items: start; }
.seo-sub { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; font-weight: 500; }
.seo-sub:not(:first-child) { margin-top: 26px; }
.meter { font-size: 12px; }
.meter.good { color: #23643a; }
.meter.warn { color: #7a5200; }
.meter.bad { color: #a3261f; }
.gprev { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; background: #fff; font-family: Arial, sans-serif; letter-spacing: 0; max-width: 600px; }
.gprev-site { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.gprev-fav { width: 28px; height: 28px; border-radius: 50%; background: #161616; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.gprev-site div b { display: block; font-size: 14px; font-weight: 400; color: #202124; line-height: 1.3; }
.gprev-site div span { display: block; font-size: 12px; color: #4d5156; line-height: 1.3; overflow-wrap: anywhere; }
.gprev-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin-bottom: 4px; }
.gprev-desc { color: #4d5156; font-size: 14px; line-height: 1.58; }
.sprev { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 420px; background: #f6f5f2; }
.sprev-img { aspect-ratio: 1.91 / 1; background: #e9e7e1 center / cover no-repeat; }
.sprev-body { padding: 12px 14px; letter-spacing: 0; }
.sprev-body span { font-size: 11px; text-transform: uppercase; color: var(--ink-2); }
.sprev-body b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.sprev-body p { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.seo-editor > .form-head + .seo-editor-grid .muted { margin-top: 12px; }
.seo-guide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.seo-guide .seo-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.seo-guide + .seo-card { margin-top: 18px; }
.seo-abbr { font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.seo-guide ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: #3d3d3d; display: grid; gap: 4px; }
.seo-guide p { font-size: 14.5px; }
.seo-terms { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.seo-terms dt { font-weight: 600; font-size: 14px; }
.seo-terms dd { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }

/* Drawer, modal, toast */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.scrim.open { opacity: 1; pointer-events: auto; }
#scrim-modal { z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: #fff; z-index: 50;
  transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
.subtotal { display: flex; justify-content: space-between; font-size: 17px; margin-bottom: 4px; }
.cart-empty { text-align: center; padding: 64px 0; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cart-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 74px; height: 92px; background: var(--soft); flex: none; padding: 5px; }
.cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.cart-title { font-size: 15px; }
.cart-controls { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.cart-price { font-size: 14px; }

.modal {
  position: fixed; z-index: 70; left: 50%; top: 50%; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto;
  background: #fff; transform: translate(-50%, -46%); opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .2s, transform .2s;
}
.modal.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; visibility: visible; }
.modal-close { position: absolute; top: 6px; right: 6px; z-index: 1; background: rgba(255,255,255,.8); border-radius: 50%; }
.editor { display: grid; grid-template-columns: 1fr 1fr; }
.editor-media { padding: 8%; min-height: 380px; display: grid; }
.editor-info { padding: 34px 28px 26px; }
.editor-info h2 { margin: 6px 0; }
.editor-info .btn { margin-top: 24px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; font-size: 13px;
  border-radius: 40px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px var(--gutter) 28px; color: var(--ink-2); font-size: 14px; }
.footer-cols { max-width: var(--page); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; }
.footer h4 { color: var(--ink); font-size: 14px; margin-bottom: 10px; }
.footer a { display: block; padding: 3px 0; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.copy { max-width: var(--page); margin: 32px auto 0; font-size: 12px; }

.tabbar { display: none; }

/* Tablet */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .fit-layout { grid-template-columns: 1fr; }
  .fit-summary { position: static; }
  .search input { width: 100px; }
}

/* Phone — app-style layout with a bottom tab bar */
@media (max-width: 720px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .header { gap: 4px; padding: 6px 8px; justify-content: space-between; }
  .menu-btn { display: inline-grid; }
  .logo { font-size: 15px; letter-spacing: .18em; }
  .cart-btn { display: none; }
  .search { border: 0; padding: 0; width: 44px; justify-content: center; }
  .search input { width: 0; padding: 0; }
  .search:focus-within { position: absolute; left: 8px; right: 8px; width: auto; background: #fff; border: 1px solid var(--ink); padding: 0 12px; justify-content: flex-start; z-index: 2; }
  .search:focus-within input { width: 100%; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 6px var(--gutter) 14px; border-bottom: 1px solid var(--line); }
  .menu-open .nav { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }

  .section { padding: 32px var(--gutter); }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { padding: 36px 0 0; margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .hero-art { height: 400px; padding-top: 8px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .cats { grid-template-columns: repeat(5, 84px); overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; }
  .sellers { grid-template-columns: 1fr; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
  .toolbar { gap: 12px; }
  .toolbar .count { width: 100%; margin: 0; }
  .pdp { grid-template-columns: 1fr; gap: 20px; }
  .pdp-media { position: static; }
  .footer-cols { grid-template-columns: 1fr 1fr; }

  .fit-stage { --row: 54px; padding: 12px 8px; }
  .fit-meta { display: none; }
  .fit-short { display: block; }
  .fit-side { max-width: none; }
  .fit-row { align-items: center; }
  .arrow { width: 38px; height: 38px; }
  .fit-side.right .fit-arrow { padding-bottom: 13px; }
  .fit-summary { padding: 16px; }

  .seo-tiles, .seo-tiles.three { grid-template-columns: 1fr 1fr; }
  .seo-grid2, .seo-editor-grid, .seo-guide, .seo-terms { grid-template-columns: 1fr; }
  .seo-list li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .seo-row-side { max-width: none; justify-content: flex-start; }
  .seo-tile b { font-size: 28px; }
  .cols { grid-template-columns: 1fr; }
  .form.inline { flex-direction: column; align-items: stretch; }
  .plist li { flex-wrap: wrap; gap: 8px 14px; }
  .plist-info { flex-basis: calc(100% - 70px); }
  .nav .nav-account { margin-left: 0; }
  .editor { grid-template-columns: 1fr; }
  .editor-media { min-height: 0; height: 230px; padding: 16px; }
  .editor-info { padding: 20px 18px 22px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 7px; font-size: 10px; letter-spacing: .04em; color: var(--ink-2); position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--ink); font-weight: 600; }
  .tabbar .count-bubble { top: 4px; right: calc(50% - 22px); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
