:root {
  --accent: #0e7c66;
  --accent-ink: #ffffff;
  --ink: #15171a;
  --bg: #ffffff;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 14%, var(--bg));
  --surface: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --btn-radius: 999px;
  --danger: #b42318;
  --radius: 10px;
  --maxw: 1180px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
}
body.font-editorial { --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif; }
body.font-classic { --font-body: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif; --font-head: var(--font-body); }
body.font-soft { --font-body: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif; --font-head: var(--font-body); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, white); outline-offset: 2px; border-radius: 4px; }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.announce { background: var(--ink); color: var(--bg); text-align: center; padding: 8px 16px; font-size: .9rem; }
.announce a { color: inherit; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand img { height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: var(--btn-radius); background: var(--surface); }
.cart-link:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cart-link .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; display: inline-grid; place-items: center; }
.cart-link .count[data-zero="true"] { background: var(--line); color: var(--muted); }

main { min-height: 60vh; }
main:focus { outline: none; }

/* hero */
.hero { background: var(--accent); color: var(--accent-ink); display: grid; grid-template-columns: 1fr; }
.hero-text { padding: clamp(44px, 9vw, 110px) 20px; padding-left: max(20px, calc((100vw - var(--maxw)) / 2 + 20px)); }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); letter-spacing: -0.03em; font-weight: 800; max-width: 13em; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 18px 0 28px; max-width: 34em; opacity: .92; }
.hero-img { display: none; background-size: cover; background-position: center; min-height: 280px; }
.hero.has-img { grid-template-columns: 1.05fr 1fr; }
.hero.has-img .hero-img { display: block; }
.hero.has-img h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
@media (max-width: 760px) {
  .hero.has-img { grid-template-columns: 1fr; }
  .hero.has-img .hero-img { order: -1; min-height: 220px; }
  .hero.has-img .hero-text { padding-top: 28px; padding-bottom: 40px; }
}

.btn { display: inline-block; border: 0; cursor: pointer; text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: var(--btn-radius); background: var(--accent); color: var(--accent-ink); transition: transform .12s, background .12s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.hero .btn { background: var(--accent-ink); color: var(--accent); }
.hero .btn:hover { background: color-mix(in srgb, var(--accent-ink) 90%, var(--accent)); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.btn.block { display: block; width: 100%; text-align: center; }

/* catalogue */
.section { padding: 40px 0 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.tools input, .tools select { padding: 9px 14px; border: 1.5px solid var(--line); border-radius: var(--btn-radius); background: var(--bg); min-width: 0; }
.tools input { width: 190px; }
.tabs { display: flex; gap: 6px 22px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 0 10px; margin-bottom: -1px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 22px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; } .tools input { width: 100%; } .tools { width: 100%; } .tools select { flex: 1; } }
.card { display: flex; flex-direction: column; min-width: 0; }
.card .ph { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card .ph:hover img { transform: scale(1.03); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font: 800 3.4rem var(--font-head); color: color-mix(in srgb, var(--accent) 55%, var(--bg)); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.tag { position: absolute; top: 10px; left: 10px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.tag.out { background: var(--ink); color: var(--bg); }
.card .meta { padding-top: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.price { margin: 0; font-weight: 700; }
.price s { color: var(--muted); font-weight: 400; margin-right: 6px; }
.price .now.sale { color: var(--accent); }
.card .add { margin-top: 8px; align-self: flex-start; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }
.empty strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }

/* product page */
.crumb { padding: 22px 0 0; font-size: .92rem; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; padding: 20px 0 72px; align-items: start; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.gallery .main-img { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { padding: 0; width: 68px; height: 68px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface); }
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.info .price { font-size: 1.5rem; margin: 12px 0 4px; }
.stock-note { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.stock-note.low { color: var(--danger); font-weight: 600; }
.buy { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 28px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 1.2rem; }
.qty button:hover { background: var(--surface); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }

.prose { max-width: 40em; }
.prose h2 { font-size: 1.7rem; margin: 1.4em 0 .5em; }
.prose h3 { font-size: 1.25rem; margin: 1.3em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose a { color: var(--accent); }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.page { padding: 44px 0 72px; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 20px; }

/* cart + checkout */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-bottom: 72px; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; gap: 24px; } }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .thumb { width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line .thumb .noimg { font-size: 1.6rem; }
.line .name { font-weight: 600; text-decoration: none; }
.line .name:hover { text-decoration: underline; }
.line .sub { color: var(--muted); font-size: .92rem; }
.line .right { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); text-decoration: underline; font-size: .88rem; }
.link-btn:hover { color: var(--danger); }
.summary { background: var(--surface); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; }
.summary h2 { font-size: 1.2rem; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.sum-row.total { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.sum-note { color: var(--muted); font-size: .88rem; margin: 10px 0 16px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: .94rem; }
.field input, .field textarea { padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg); width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { min-height: 92px; resize: vertical; }
.field fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice small { display: block; color: var(--muted); }
.notice { padding: 14px 16px; border-radius: 8px; background: var(--surface); border-left: 4px solid var(--accent); }
.notice h3 { font-size: 1rem; margin-bottom: 4px; }
.notice p { margin: 0 0 .5em; } .notice p:last-child { margin: 0; }
.error { color: var(--danger); background: #fdecea; padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.error:empty { display: none; }
.done { padding: 56px 0 80px; max-width: 640px; }
.done h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.code { display: inline-block; font: 700 1.5rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; padding: 8px 16px; border: 2px dashed var(--accent); border-radius: 8px; margin: 6px 0 22px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 28px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; }
.site-footer h3 { font-size: 1rem; margin-bottom: 8px; }
.site-footer p { margin: 0 0 .4em; color: var(--muted); white-space: pre-line; }
.site-footer a { color: inherit; }
.foot-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; white-space: pre-line; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; font-weight: 600; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-header .wrap { gap: 6px 12px; }
  .nav { order: 3; flex: 1 0 100%; gap: 2px 18px; }
  .cart-link { margin-left: auto; }
}

/* design options */
body.radius-sharp { --radius: 2px; }
body.radius-soft { --radius: 10px; }
body.radius-round { --radius: 22px; }
body.btn-pill { --btn-radius: 999px; }
body.btn-rounded { --btn-radius: 8px; }
body.btn-square { --btn-radius: 0; }
body.radius-sharp .field input, body.radius-sharp .field textarea, body.radius-sharp .choice, body.radius-sharp .thumbs button { border-radius: 2px; }
.hero-light { background: var(--surface); color: var(--ink); }
.hero-light .btn, .hero-light .btn:hover { background: var(--accent); color: var(--accent-ink); }
.hero-centered .hero-text { text-align: center; padding-left: 20px; padding-right: 20px; }
.hero-centered h1, .hero-centered p { margin-left: auto; margin-right: auto; }
.hero-centered.has-img { grid-template-columns: 1fr; }
.hero-centered.has-img .hero-img { min-height: 260px; }
.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }
.card .ph, .line .thumb { text-decoration: none; }

/* layout options */
body.font-mono { --font-body: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --font-head: var(--font-body); }
body.font-humanist { --font-body: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif; --font-head: var(--font-body); }
body.font-mono h1, body.font-mono h2 { letter-spacing: -0.04em; }
/* header */
body.hdr-centered .site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; justify-items: center; }
body.hdr-centered .brand { grid-column: 2; grid-row: 1; font-size: 1.6rem; }
body.hdr-centered .cart-link { grid-column: 3; grid-row: 1; justify-self: end; }
body.hdr-centered .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex: none; }
body.hdr-bar .site-header { background: var(--accent); color: var(--accent-ink); border-bottom: 0; }
body.hdr-bar .nav a { color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent)); }
body.hdr-bar .nav a:hover, body.hdr-bar .nav a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
body.hdr-bar .cart-link { background: color-mix(in srgb, var(--accent-ink) 16%, var(--accent)); }
body.hdr-bar .cart-link .count { background: var(--accent-ink); color: var(--accent); }
@media (max-width: 640px) { body.hdr-centered .site-header .wrap { display: flex; } body.hdr-centered .nav { justify-content: flex-start; } }
/* hero height */
body.herop-compact .hero-text { padding-top: clamp(24px, 5vw, 48px); padding-bottom: clamp(24px, 5vw, 48px); }
body.herop-compact .hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
body.herop-compact .hero p { margin: 10px 0 18px; }
body.herop-tall .hero { min-height: min(78vh, 720px); align-items: center; }
body.herop-tall .hero-text { padding-top: clamp(70px, 14vw, 170px); padding-bottom: clamp(70px, 14vw, 170px); }
body.herop-tall .hero-img { min-height: 100%; }
/* grid + cards */
body.grid-small .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 24px 14px; }
body.grid-large .grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px 28px; }
body.ratio-square .card .ph { aspect-ratio: 1 / 1; }
body.ratio-landscape .card .ph { aspect-ratio: 4 / 3; }
body.card-boxed .card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
body.card-boxed .card .ph { border-radius: 0; }
body.card-boxed .card .meta { padding: 14px 16px 16px; }
body.card-centered .card .meta { text-align: center; align-items: center; }
body.card-centered .card .add { align-self: center; }
@media (max-width: 520px) { body.grid-large .grid { grid-template-columns: 1fr; } }
/* category tabs */
body.tabs-pills .tabs { border-bottom: 0; gap: 8px; }
body.tabs-pills .tabs button { border: 1.5px solid var(--line); border-radius: var(--btn-radius); padding: 7px 16px; margin: 0; }
body.tabs-pills .tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.tabs-text .tabs { border-bottom: 0; }
body.tabs-text .tabs button { border: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }
body.tabs-text .tabs button[aria-pressed="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
/* footer */
body.foot-dark .site-footer { background: var(--ink); color: var(--bg); border-top: 0; }
body.foot-dark .site-footer p, body.foot-dark .foot-bottom { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); }
body.foot-dark .foot-bottom { border-top-color: color-mix(in srgb, var(--bg) 20%, var(--ink)); }
body.foot-minimal .site-footer { background: var(--bg); text-align: center; padding: 28px 0 22px; }
body.foot-minimal .foot-grid { grid-template-columns: 1fr; gap: 10px; }
body.foot-minimal .site-footer h3 { font-size: 1.1rem; }
/* product page */
body.pl-stacked .product { grid-template-columns: minmax(0, 720px); justify-content: center; }
body.pl-stacked .info { text-align: center; }
body.pl-stacked .buy { justify-content: center; }
.hero h1 + .btn { margin-top: 22px; }
