/* A calm, clean shop: warm off-white, deep teal accent, generous spacing. Works from the phone to the desktop. */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --text: #1c1f23;
  --muted: #6b6f76;
  --line: #e6e2d9;
  --accent: #0f5f58;
  --accent-hover: #0b4d47;
  --accent-soft: #e3efed;
  --warm: #e0a458;
  --ok: #1f7a4d;
  --ok-soft: #e2f3ea;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --info: #1d4f91;
  --info-soft: #e5eefb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 31, 35, .04), 0 8px 24px rgba(28, 31, 35, .06);
  --shadow-lg: 0 20px 50px rgba(28, 31, 35, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --surface-2: #22272c;
    --text: #eceae5;
    --muted: #a0a5ab;
    --line: #2f353b;
    --accent: #3fb5a8;
    --accent-hover: #5cc8bc;
    --accent-soft: #1d3633;
    --ok-soft: #173327;
    --ok: #5fd39a;
    --warn-soft: #3a2c12;
    --warn: #f0b75a;
    --bad-soft: #3d1a17;
    --bad: #ff8a7f;
    --info-soft: #172a45;
    --info: #8ab4f8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h2 { font-size: 1.2rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
button, input, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 64px; outline: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { display: flex; justify-content: center; margin-top: 24px; }
.center-block { display: block; text-align: center; margin-top: 16px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* icons */
.icon { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.icon svg, .icon-btn svg, .stepper-btn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: "brand nav search actions";
  align-items: center;
  gap: 20px;
  min-height: 68px;
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand img { border-radius: 9px; }
.main-nav { grid-area: nav; display: flex; gap: 4px; }
.nav-link { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.search { grid-area: search; justify-self: end; width: 100%; max-width: 360px; }
.search input, .inline-search input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface) url("search.svg") no-repeat 14px center / 18px;
  padding: 0 16px 0 40px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus, .inline-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.account { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; max-width: 220px; }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; transition: border-color .15s;
}
.cart-btn .icon { width: 22px; height: 22px; }
.cart-btn:hover, .cart-btn.active { border-color: var(--accent); color: var(--accent); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--warm); color: #1c1f23; font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.3); } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0d1513; } }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after { border-color: var(--line); border-top-color: var(--accent); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; padding: 9px;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); }
.icon-btn:disabled { opacity: .5; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; margin-bottom: 16px; font-weight: 500; }
.back-link:hover { color: var(--text); }

/* loading */
.loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  background: var(--surface); border-radius: 24px; padding: 48px; box-shadow: var(--shadow);
  overflow: hidden; position: relative;
}
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: .5rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 220px; }
.hero-blob { position: absolute; width: 260px; height: 260px; border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--warm) 30%, transparent)); }
.hero-art img { position: relative; width: 140px; height: 140px; border-radius: 32px; box-shadow: var(--shadow-lg); transform: rotate(-6deg); }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.benefit { display: flex; gap: 14px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.benefit > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.benefit strong { display: block; }
.benefit span { color: var(--muted); font-size: .92rem; }

/* sections and page heads */
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.4rem; margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .muted { margin: 4px 0 0; }
.inline-search { display: flex; gap: 8px; width: 100%; max-width: 420px; }

/* cards and grid */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-link { display: block; }
.media { position: relative; background: var(--surface-2); overflow: hidden; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--line); }
.media-placeholder .icon { width: 48px; height: 48px; }
.card-media { aspect-ratio: 4 / 3; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-eyebrow { color: var(--muted); font-size: .8rem; margin: 0; text-transform: uppercase; letter-spacing: .05em; }
.card-title { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.card-title:hover { color: var(--accent); }
.price { font-weight: 700; font-size: 1.1rem; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 1.8rem; margin: 8px 0 4px; }
.card-actions { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.card-actions .sizes { color: var(--muted); font-size: .85rem; flex-basis: 100%; }
.add-btn { flex: 1; }

/* stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); height: 38px; }
.stepper-btn { width: 34px; height: 100%; border: 0; background: transparent; cursor: pointer; padding: 9px; color: var(--text); border-radius: 999px; }
.stepper-btn:disabled { color: var(--line); cursor: default; }
.stepper-input { width: 40px; border: 0; background: transparent; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; outline: none; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* product page */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.product-media { aspect-ratio: 1 / 1; border-radius: 24px; box-shadow: var(--shadow); }
.product-info { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 96px; }
.product-info h1 { margin: 0; }
.field-group { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.size-list { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip { min-width: 48px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.size-chip:hover { border-color: var(--accent); }
.size-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.product-description { max-width: 70ch; }

/* basket */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.basket-list { list-style: none; margin: 0; padding: 0; }
.basket-line { display: grid; grid-template-columns: 1fr auto 110px 40px; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.basket-line:last-child { border-bottom: 0; }
.basket-info { display: flex; flex-direction: column; min-width: 0; }
.basket-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { margin-bottom: 4px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.summary-row.total { font-size: 1.2rem; font-weight: 700; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }

/* checkout */
.checkout-form h2 { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 16px; }
.form-field { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; }
.form-field.wide { grid-column: span 6; }
.form-field.narrow { grid-column: span 2; }
.form-field.narrow + .form-field:not(.narrow) { grid-column: span 4; }
.form-field label, .auth-form label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.form-field input, .form-field textarea, .auth-form input {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 10px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.notice { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }

/* orders */
.order-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.order-card { display: grid; grid-template-columns: 1fr auto auto 24px; align-items: center; gap: 16px; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.order-main { display: flex; flex-direction: column; }
.order-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.order-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.chevron { color: var(--muted); }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill-neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info { background: var(--info-soft); color: var(--info); }
.item-list { list-style: none; padding: 0; margin: 0 0 8px; }
.item-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.item-list li:last-child { border-bottom: 0; }
address { font-style: normal; margin-bottom: 12px; }
.payment { margin-bottom: 24px; border: 2px solid color-mix(in srgb, var(--warm) 60%, transparent); }
.payment h2 { display: flex; align-items: center; gap: 8px; }
.payment-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.qr { background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.qr img { width: 100%; height: auto; image-rendering: pixelated; }
.details { display: flex; flex-direction: column; }
.detail-row { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row .value { font-weight: 600; word-break: break-word; font-variant-numeric: tabular-nums; }
.detail-row .icon-btn { width: 34px; height: 34px; padding: 8px; }

/* empty states */
.empty { text-align: center; padding: 64px 20px; max-width: 480px; margin: 0 auto; }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.empty-icon .icon { width: 34px; height: 34px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 8px; }

/* login */
.view-auth { display: flex; justify-content: center; padding-top: 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; }
.auth-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.auth-icon .icon { width: 28px; height: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.auth-form .btn { margin-top: 6px; }
.code-input { letter-spacing: .4em; font-size: 1.3rem; text-align: center; font-weight: 700; }
.tabs { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; height: 38px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; color: var(--muted); font-size: .9rem; }
.footer-brand { display: flex; gap: 10px; align-items: baseline; }
.footer-brand strong { color: var(--text); }
.footer-notes { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-notes span { display: inline-flex; align-items: center; gap: 6px; }

/* toasts and modal */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 380px;
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; cursor: pointer;
}
.toast.show { opacity: 1; transform: none; }
.toast .icon { color: var(--warm); }
.toast-error { background: var(--bad); color: #fff; }
.toast-error .icon { color: #fff; }
.modal-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 20, .45); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .2s ease; }
.modal { background: var(--surface); border-radius: 20px; padding: 24px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* tablet */
@media (max-width: 960px) {
  .header-row { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav actions" "search search search"; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .search { max-width: none; }
  .hero { grid-template-columns: 1fr; padding: 32px; }
  .hero-art { display: none; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .product-info { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* phone */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .main { padding-top: 18px; }
  .header-row { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "nav nav" "search search"; }
  .main-nav { overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .account-name { display: none; }
  .login-link span:not(.icon) { display: none; }
  .hero { padding: 24px; border-radius: 20px; }
  .benefits { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: .95rem; }
  .card-actions .stepper { display: none; }
  .add-btn span:not(.icon) { display: none; }
  .add-btn { flex: none; width: 100%; }
  .basket-line { grid-template-columns: 1fr auto; grid-template-areas: "info remove" "qty amount"; padding: 16px; gap: 10px; }
  .basket-info { grid-area: info; }
  .basket-line .stepper { grid-area: qty; justify-self: start; }
  .basket-amount { grid-area: amount; }
  .basket-line .icon-btn { grid-area: remove; }
  .form-field, .form-field.narrow, .form-field.narrow + .form-field:not(.narrow) { grid-column: span 6; }
  .order-card { grid-template-columns: 1fr auto; }
  .order-card .order-pills { grid-column: 1 / -1; grid-row: 2; }
  .order-card .chevron { display: none; }
  .payment-grid { grid-template-columns: 1fr; }
  .qr { max-width: 220px; margin: 0 auto; }
  .detail-row { grid-template-columns: 1fr auto; }
  .detail-row .label { grid-column: 1 / -1; }
  .toasts { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; }
  .page-head { align-items: stretch; flex-direction: column; }
  .inline-search { max-width: none; }
}
