/* Any Size Merch - core design system. Shared by every page. Page-specific styles live in /assets/css/pages/*.css */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Archivo", "Inter", ui-sans-serif, system-ui, sans-serif;

  --ink-950: #070b14;
  --ink-900: #0b1220;
  --ink-800: #1a2233;
  --ink-700: #2b3445;
  --ink-600: #475063;
  --ink-500: #5d6678;
  --ink-400: #8a93a5;
  --ink-300: #b4bbc8;
  --line: #e3e6ec;
  --line-strong: #cdd3dc;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-warm: #f4f2ee;
  --photo-bg: #efefef; /* matches the catalog's studio backdrop (239,239,239) so photo edges disappear */

  --brand-50: #eef2ff;
  --brand-100: #dce4ff;
  --brand-500: #3557ff;
  --brand-600: #2343f0;
  --brand-700: #1a33c4;
  --accent-50: #fff1ec;
  --accent-500: #ff6a3d;

  --success-50: #e8f6ef;
  --success-600: #0f7a4e;
  --warning-50: #fff5e1;
  --warning-600: #9a5b00;
  --danger-50: #fdede8;
  --danger-600: #c2340e;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(11, 18, 32, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 2px 8px rgba(11, 18, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 18, 32, 0.08), 0 16px 40px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 18, 32, 0.12), 0 32px 80px rgba(11, 18, 32, 0.14);
  --ring: 0 0 0 3px rgba(53, 87, 255, 0.28);

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p a:hover, .link:hover { color: var(--brand-700); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink-900); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
/* Solid outline (not box-shadow) so the indicator meets 3:1 contrast and is not overridden by components that
   draw their own box-shadow. Form fields keep their own border + ring focus style (.input:focus etc. below). */
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; border-radius: var(--radius-xs); }
.site-footer :focus-visible, .bg-ink :focus-visible, .lightbox :focus-visible { outline-color: #8b9dff; }
::selection { background: var(--brand-100); }
[hidden] { display: none !important; }

/* ---------- typography ---------- */
.display { font-size: clamp(40px, 6.2vw, 78px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 900; font-stretch: 105%; }
.h1 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.025em; }
.h3 { font-size: clamp(20px, 2vw, 24px); }
.h4 { font-size: 17px; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-600); }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-600); }
.muted { color: var(--ink-500); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.text-center { text-align: center; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: 860px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-sm { padding-block: clamp(32px, 5vw, 56px); }
.bg-soft { background: var(--bg-soft); }
.bg-warm { background: var(--bg-warm); }
.bg-ink { background: var(--ink-900); color: #fff; }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: #fff; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.between { justify-content: space-between; }
.grid { display: grid; gap: var(--gap, 24px); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 15px; font-weight: 650; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; text-decoration: none; user-select: none;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 1px 2px rgba(35, 67, 240, 0.3); }
.btn-primary:hover { background: var(--brand-700); }
.btn-dark { background: var(--ink-900); color: #fff; }
.btn-dark:hover { background: var(--ink-700); }
.btn-outline { background: #fff; color: var(--ink-900); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--ink-800); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--ink-900); }
.btn-light:hover { background: var(--brand-50); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 16.5px; border-radius: 10px; }
.btn-block { width: 100%; }
/* A button never grows past its container. On small phones a long label wraps inside the button (which grows
   taller) instead of spilling out of it. */
.btn { max-width: 100%; }
@media (max-width: 400px) {
  .btn { white-space: normal; height: auto; min-height: var(--h); padding-block: 8px; line-height: 1.2; text-align: center; }
  .btn-lg { padding-inline: 18px; font-size: 16px; }
}
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--line-strong); border-top-color: var(--ink-900); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--ink-800);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-800); }
.label .opt { font-weight: 500; color: var(--ink-500); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink-900); font-size: 15px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
/* iOS Safari zooms the page when a focused field is under 16px */
@media (max-width: 639px) { .input, .select, .textarea { font-size: 16px; } }
.input::placeholder, .textarea::placeholder { color: var(--ink-500); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
.select {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235d6678' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.help { font-size: 13px; color: var(--ink-500); }
.error-text { font-size: 13px; color: var(--danger-600); font-weight: 500; }
.is-invalid { border-color: var(--danger-600) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(194, 52, 14, 0.2) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-600); width: 18px; height: 18px; margin: 0; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.check input { margin-top: 2px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-600) inset; }
.choice input { margin-top: 3px; }

/* ---------- badges, chips, swatches ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 650; letter-spacing: 0.01em;
  background: var(--bg-soft); color: var(--ink-700); white-space: nowrap;
}
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.badge-accent { background: var(--accent-50); color: #b23c14; }
.badge-success { background: var(--success-50); color: var(--success-600); }
.badge-warning { background: var(--warning-50); color: var(--warning-600); }
.badge-danger { background: var(--danger-50); color: var(--danger-600); }
.badge-dark { background: var(--ink-900); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: #fff;
  font-size: 14px; font-weight: 550; color: var(--ink-800); white-space: nowrap;
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink-700); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; flex: none;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.swatch:hover { transform: scale(1.06); }
.swatch[aria-pressed="true"], .swatch.is-active { box-shadow: 0 0 0 2px var(--ink-900); }
.swatch-sm { width: 18px; height: 18px; border-width: 2px; }

/* ---------- cards & media ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: clamp(18px, 2.4vw, 28px); }
.card-hover { transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-2px); }
.photo { position: relative; background: var(--photo-bg); aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); }
.photo > img { width: 100%; height: 100%; object-fit: cover; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-soft); font-size: 14.5px; line-height: 1.5; }
.notice-brand { background: var(--brand-50); color: var(--ink-800); }
.notice-warning { background: var(--warning-50); color: #5c3700; }
.notice-danger { background: var(--danger-50); color: #6e1d07; }
.notice-success { background: var(--success-50); color: #08452c; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice > :not(svg) { min-width: 0; overflow-wrap: anywhere; } /* a long email or URL wraps inside the box */

/* ---------- skeletons ---------- */
.skeleton { background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- site chrome: topbar + header ---------- */
/* layout.js swaps this placeholder for the topbar + header. Reserving their height (36 + 69, or 52 + 69 once the
   announcement wraps) keeps page content from jumping down when it mounts. */
[data-site-header] { display: block; min-height: 105px; }
@media (max-width: 522px) { [data-site-header] { min-height: 121px; } }
.skip-link {
  position: absolute; left: 12px; top: 8px; z-index: 300; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--ink-900); color: #fff; font-size: 14px; font-weight: 650; transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }
.topbar { background: var(--ink-900); color: #dfe4ee; font-size: 13px; font-weight: 500; letter-spacing: 0.005em; }
.topbar .container { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 36px; text-align: center; padding-block: 6px; }
.topbar strong { color: #fff; font-weight: 650; }
.topbar .tb-short { display: none; }
@media (max-width: 600px) {
  .topbar .tb-long { display: none; }
  .topbar .tb-short { display: inline; }
}
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, 0.985); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(11, 18, 32, 0.02), 0 6px 20px rgba(11, 18, 32, 0.06); }
.site-header .bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
/* Phones in landscape have little height: a slimmer sticky header leaves more room for the page. */
@media (max-height: 480px) and (orientation: landscape) {
  :root { --header-h: 56px; }
  .topbar { display: none; } /* the announcement isn't worth a sixth of a landscape phone screen */
}
.brandmark { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink-900); }
.brandmark svg { width: 34px; height: 34px; }
.brandmark .wordmark { font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: -0.03em; font-stretch: 108%; line-height: 1; }
.brandmark .wordmark span { color: var(--brand-600); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav > a, .nav > button {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--radius-sm); background: none;
  font-size: 14.5px; font-weight: 600; color: var(--ink-800);
}
.nav > a:hover, .nav > button:hover, .nav > [aria-expanded="true"] { background: var(--bg-soft); }
.nav > a[aria-current="page"], .nav > button.is-current { color: var(--brand-600); }
.nav svg { width: 14px; height: 14px; transition: transform 0.18s var(--ease); }
.nav > [aria-expanded="true"] svg { transform: rotate(180deg); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--radius-pill); background: var(--brand-600); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.menu-btn { display: none; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-block: 24px 28px; }
.mega-card { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--radius); transition: background-color 0.15s; }
.mega-card:hover { background: var(--bg-soft); }
.mega-card .thumb { width: 64px; height: 80px; border-radius: var(--radius-sm); background: var(--photo-bg); overflow: hidden; flex: none; }
.mega-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-card .t { font-weight: 650; font-size: 15px; }
.mega-card .c { font-size: 13px; color: var(--ink-500); }
.mega-card .thumb img { transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--k, 1)); transition: transform 0.3s var(--ease); }
.mega-card:hover .thumb img { transform: translate(var(--tx, 0), var(--ty, 0)) scale(calc(var(--k, 1) * 1.06)); }
.mega-card-all .thumb { display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.mega-card-all .thumb svg { width: 22px; height: 22px; }
.mega-inner { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; padding-block: 24px 28px; }
.mega-inner .mega-grid { padding-block: 0; }
.mega-aside { padding: 20px 20px 22px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.mega-aside-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); }
.mega-points { list-style: none; display: grid; gap: 10px; margin: 14px 0 18px; font-size: 14px; color: var(--ink-700); line-height: 1.4; }
.mega-points li { display: flex; gap: 10px; align-items: flex-start; }
.mega-points svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand-600); }
.mega-points b { color: var(--ink-900); font-weight: 650; }
.mega-aside-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mega-aside-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-800); }
.mega-aside-link svg { width: 16px; height: 16px; transition: transform 0.18s var(--ease); }
.mega-aside-link:hover { color: var(--brand-600); }
.mega-aside-link:hover svg { transform: translateX(3px); }
@media (max-width: 1180px) { .mega-inner { grid-template-columns: minmax(0, 1fr); } .mega-aside { display: none; } }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(7, 11, 20, 0.45); z-index: 80; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
/* Drawer: fixed head and foot, the links scroll between them (with a shadow where more links continue),
   so the foot never sits on top of a link at any phone height. */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); z-index: 90; background: #fff;
  transform: translateX(100%); transition: transform 0.28s var(--ease); display: flex; flex-direction: column;
  height: 100dvh; overflow: hidden;
}
.drawer.is-open { transform: none; }
.drawer.is-open + .drawer-backdrop, .drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head .brandmark { min-width: 0; }
.drawer-nav {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; padding: 8px;
  background:
    linear-gradient(#fff 30%, rgba(255, 255, 255, 0)) center top / 100% 36px no-repeat local,
    linear-gradient(rgba(255, 255, 255, 0), #fff 70%) center bottom / 100% 36px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(11, 18, 32, 0.14), rgba(11, 18, 32, 0)) center top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(11, 18, 32, 0.14), rgba(11, 18, 32, 0)) center bottom / 100% 12px no-repeat scroll;
}
.drawer-nav a, .drawer-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 16px; line-height: 1.3; }
.drawer-nav a:hover, .drawer-group > summary:hover { background: var(--bg-soft); }
.drawer-nav a svg, .drawer-group > summary svg { width: 18px; height: 18px; flex: none; color: var(--ink-500); }
.drawer-nav a[aria-current="page"] { color: var(--brand-600); background: var(--brand-50); }
.drawer-group > summary { cursor: pointer; list-style: none; }
.drawer-group > summary::-webkit-details-marker { display: none; }
.drawer-group > summary svg { transition: transform 0.18s var(--ease); }
.drawer-group[open] > summary svg { transform: rotate(180deg); }
.drawer-sub { display: grid; margin: 0 0 6px 12px; padding-left: 4px; border-left: 2px solid var(--line); }
.drawer-nav .sub { min-height: 44px; padding: 10px 12px; font-weight: 500; font-size: 15px; color: var(--ink-600); }
.drawer-foot { flex: none; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fff; }
@media (max-height: 480px) {
  .drawer-head { padding-block: 6px; }
  .drawer-nav a, .drawer-group > summary { min-height: 42px; padding-block: 9px; }
  .drawer-foot { padding-block: 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 1020px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .site-header .bar { gap: 12px; }
  /* visibility:hidden still lays the 4-column grid out past a phone viewport and widens the page */
  .mega { display: none; }
}
@media (max-width: 420px) {
  .brandmark .wordmark { font-size: 17px; }
  .brandmark svg { width: 30px; height: 30px; }
}
/* Smallest phones (320-359px): the drawer already links to the shop, so drop the browse icon to fit. */
@media (max-width: 359px) {
  .header-actions > .icon-btn[href="/shop/"] { display: none; }
  .brandmark { gap: 8px; }
  .brandmark .wordmark { font-size: 16px; }
  .header-actions { gap: 2px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink-950); color: #aeb6c6; font-size: 14.5px; }
.site-footer a { color: #dfe4ee; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 64px 48px; }
.footer-top h4 { font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #7f899c; margin-bottom: 14px; }
.footer-top ul { list-style: none; display: grid; gap: 4px; }
.footer-top ul a { display: inline-block; padding-block: 3px; } /* ~27px tap rows, same rhythm as before */
.footer-brand .brandmark { color: #fff; }
.footer-brand .brandmark svg rect:first-child { fill: #1d2638; }
.footer-brand .brandmark .wordmark span { color: #8b9dff; }
.footer-brand p { margin-top: 14px; max-width: 34ch; line-height: 1.6; }
.footer-address { margin-top: 18px; font-style: normal; font-size: 13px; line-height: 1.65; color: #8f98aa; }
.footer-address a { display: inline-block; padding-block: 4px; margin-block: -4px; } /* 24px+ tap target, same layout */
.footer-top .footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.footer-top .footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); color: #dfe4ee; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease); }
.footer-top .footer-social a:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.36); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.site-footer a[aria-current="page"] { color: #fff; }
.footer-top ul a { transition: color 0.15s var(--ease); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-block: 22px 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; color: #7f899c; }
.footer-bottom span { text-wrap: balance; }
/* Footer: brand on top, then Shop / Help / Policies side by side while they fit, two columns on phones,
   one column on the smallest phones so link names never break in two. */
@media (max-width: 860px) { .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .footer-top { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 48px 36px; } }

/* ---------- toasts ---------- */
.toast-host { position: fixed; left: 50%; bottom: var(--toast-auto-bottom, 20px); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; padding: 13px 16px; border-radius: 10px; background: var(--ink-900); color: #fff;
  font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg); border-left: 4px solid var(--brand-500);
  opacity: 0; transform: translateY(10px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast-success { border-left-color: #2fbf7f; }
.toast-error { border-left-color: #ff6a3d; }

/* ---------- utilities ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.w-full { width: 100%; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
@media (max-width: 640px) { .hide-mobile { display: none !important; } }
@media (min-width: 641px) { .hide-desktop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
