/* Saaristo demo shop (dev only). Flat colour blocks, big prints, lots of white. */
:root {
  --ink: #141414;
  --muted: #555b63; /* 7.0:1 on white */
  --paper: #ffffff;
  --sand: #f6f3ec;
  --sun: #ffd23f;
  --coral: #ff6b4a;
  --blue: #1d4ed8;
  --green: #2faf6e;
  --pink: #f7a8c8;
  --sale: #c2261b; /* 5.6:1 on white */
  --focus: #1d4ed8;
  --font: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 16px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 0.875rem; }

/* --- Dev banner --- */
.dev-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #111; color: #f5f5f5; font-size: 0.8125rem; padding: 8px 16px; }
.dev-banner code { background: #333; padding: 0 4px; border-radius: 4px; color: #ffe27a; word-break: break-all; }
.dev-banner strong { color: #ffd23f; }
.dev-banner-close { background: none; border: 0; color: inherit; font-size: 1.25rem; min-width: 44px; min-height: 36px; cursor: pointer; }

/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar { max-width: var(--wrap); margin: 0 auto; padding: 12px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 1.375rem; letter-spacing: 0.18em; }
.wordmark .mark { width: 40px; height: 16px; }
.main-nav ul { display: flex; gap: 4px; justify-content: center; }
.main-nav a { display: inline-block; padding: 10px 12px; font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--sun); }
.main-nav a[aria-current='page'] { border-bottom-color: var(--ink); }
.main-nav .nav-sale { color: var(--sale); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button { font: inherit; font-weight: 700; font-size: 0.8125rem; background: transparent; color: var(--ink); border: 0; padding: 6px 10px; min-height: 36px; min-width: 40px; cursor: pointer; }
.lang button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.bag { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; font: inherit; font-weight: 700; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.bag svg { width: 22px; height: 22px; }
.bag-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--sun); font-size: 0.8125rem; }
.bag.bump .bag-count { animation: bump 300ms ease-out; }
@keyframes bump { 50% { transform: scale(1.35); background: var(--coral); } }

@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr auto; padding: 8px 16px 0; gap: 8px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; margin: 0 -16px; padding: 0 8px; }
  .main-nav ul { justify-content: flex-start; }
  .bag-text { display: none; }
  .wordmark { font-size: 1.125rem; letter-spacing: 0.14em; }
}

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; font: inherit; font-weight: 800; letter-spacing: 0.01em; text-decoration: none; border-radius: 999px; border: 2px solid var(--ink); cursor: pointer; transition: transform 150ms ease-out, background 150ms ease-out; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--sun); }
.btn-block { width: 100%; }
.link { font-weight: 700; }

/* --- Hero --- */
.hero { display: grid; grid-template-columns: 1fr; background: var(--sand); }
.hero-copy { padding: 40px 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 640px; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; letter-spacing: -0.04em; }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; font-size: 0.8125rem; }
.lead { font-size: 1.125rem; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art { position: relative; min-height: 320px; overflow: hidden; }
.hero-art .hero-print { position: absolute; inset: 0; width: 100%; height: 100%; }
.print-label { position: absolute; left: 16px; bottom: 16px; background: var(--paper); padding: 4px 12px; font-weight: 800; border-radius: 999px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 5fr 6fr; min-height: 620px; }
  .hero-copy { padding: 64px 48px; margin-left: auto; }
}

/* --- Sections & grid --- */
.section { max-width: var(--wrap); margin: 0 auto; padding: 48px 16px; }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 900; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card a { display: block; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.card-media .art, .pdp-media .art, .swatch .art { width: 100%; height: 100%; transition: transform 300ms ease-out; }
.card a:hover .art { transform: scale(1.04); }
.card-body { padding-top: 12px; display: grid; gap: 2px; }
.card-title { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.card-meta { font-size: 0.875rem; color: var(--muted); }
.card-price { font-size: 0.9375rem; }
.tag { position: absolute; top: 12px; left: 12px; background: var(--sale); color: #fff; font-weight: 800; font-size: 0.8125rem; padding: 4px 10px; border-radius: 999px; }
.price { font-weight: 700; }
.price-sale { color: var(--sale); }
.price-was { color: var(--muted); margin-left: 8px; }

.style-band { background: var(--blue); color: #fff; }
.style-band > div { max-width: var(--wrap); margin: 0 auto; padding: 56px 16px; display: grid; gap: 12px; }
.style-band h2 { font-size: clamp(1.75rem, 4.5vw, 3rem); font-weight: 900; max-width: 18em; }
.style-band p { font-size: 1.125rem; max-width: 40em; }

.prints { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .prints { grid-template-columns: repeat(5, 1fr); } }
.prints a { display: block; text-decoration: none; font-weight: 800; }
.swatch { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 50% 50% 0 0; }
.swatch-name { display: block; padding-top: 8px; }

/* --- Category --- */
.cat-head { padding: 48px 16px; text-align: center; background: var(--sun); }
.cat-head h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; letter-spacing: -0.04em; }
.cat-men { background: var(--blue); color: #fff; }
.cat-home { background: var(--green); }
.cat-prints { background: var(--pink); }
.cat-sale { background: var(--coral); }
.empty { max-width: 480px; margin: 0 auto; padding: 32px 16px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.empty-art { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; }
.empty h2, .empty h1 { font-size: 1.75rem; font-weight: 900; }

/* --- Product page --- */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 16px; font-size: 0.875rem; color: var(--muted); }
.crumbs a { color: var(--ink); }
.pdp { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 64px; display: grid; gap: 24px; }
.pdp-media { aspect-ratio: 3 / 4; overflow: hidden; margin: 0 -16px; }
.pdp-info { display: grid; gap: 16px; align-content: start; }
.pdp-info h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; letter-spacing: -0.03em; }
.pdp-price { font-size: 1.25rem; }
.sizes { border: 0; margin: 0; padding: 0; }
.sizes legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 52px; min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 700; background: var(--paper); color: var(--ink); border: 2px solid #c9c9c9; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.field-error { margin-top: 8px; color: var(--sale); font-weight: 700; }
.field-error span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sale); color: #fff; font-size: 0.75rem; margin-right: 4px; }
.hint { font-size: 0.875rem; color: var(--muted); margin-top: -8px; }
.h-small { font-size: 1.125rem; font-weight: 800; margin-top: 8px; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: 7fr 5fr; gap: 48px; }
  .pdp-media { margin: 0; }
  .pdp-info { position: sticky; top: 96px; }
}

/* The loader's button, restyled by the shop. The loader sets inline styles,
   so overrides need !important (as on any real shop). */
.mm-slot:empty { display: none; }
.mm-slot .mm-open-button {
  width: 100% !important;
  justify-content: center !important;
  min-height: 52px !important;
  border: 2px solid var(--ink) !important;
  border-radius: 999px !important;
  background: var(--sun) !important;
  color: var(--ink) !important;
  font-weight: 800 !important;
}
.mm-slot .mm-open-button:hover { background: #ffc300 !important; }
.mm-slot .mm-open-button::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); box-shadow: 10px 0 0 -2px var(--blue); margin-right: 10px; }

.mm-floating > .mm-open-button {
  position: fixed !important;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ink) !important;
  color: #fff !important;
  padding: 14px 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.mm-floating > .mm-open-button:hover { background: #333 !important; }

/* --- Footer & toast --- */
.site-footer { background: var(--ink); color: #f1f1f1; margin-top: 32px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 40px 16px 96px; display: grid; gap: 12px; }
.site-footer .mark circle:last-child { fill: var(--sun); }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; transition: opacity 200ms ease-out, transform 200ms ease-out; z-index: 30; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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