/* ==========================================================================
   Ink Master Shirts storefront
   Mobile-first. Brand palette comes straight from the logo: ink black,
   paper white, press red and squeegee blue.
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --red: #e3141b;
  --red-dark: #b80d13;
  --blue: #0a5bd6;
  --blue-dark: #0846a6;
  --gray-50: #f6f7f8;
  --gray-100: #eef0f2;
  --gray-300: #d3d6db;
  --gray-500: #8a909a;
  --gray-700: #4b505a;
  --gray-900: #1d1f24;
  --success: #12804a;
  --warning: #9a6200;

  --font: "Poppins", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: clamp(2.5rem, 7vw, 3.5rem);
  --display: clamp(2.9rem, 10vw, 5.75rem);

  --gutter: 1rem;
  --wrap: 78rem;
  --radius: 4px;
  --header-h: 4.5rem;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--blue);
}

/* ---------- Reset and base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
img { background: var(--gray-50); }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-dark); }
small { font-size: var(--step--1); }
s { color: var(--gray-500); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 48rem; }

main:focus { outline: none; }

/* Grid children must be allowed to shrink below their content width on phones. */
.hero-grid > *, .product-layout > *, .cart-layout > *, .checkout-layout > *, .checkout-main > *,
.account-layout > *, .custom-layout > *, .custom-hero-grid > *, .contact-layout > *, .field-grid > * { min-width: 0; }
input[type="file"] { max-width: 100%; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-lg { min-height: 3.25rem; padding-inline: 1.5rem; font-size: var(--step-1); }
.btn-block { display: flex; width: 100%; }
.btn-grow { flex: 1; }

.btn-primary { background: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--red-dark); color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--gray-900); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--gray-100); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-light { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); }

.text-link { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.text-link:hover { color: var(--red); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-size: var(--step--1);
}

/* ---------- Announcement and header ---------- */

.announcement {
  margin: 0;
  padding: 0.5rem var(--gutter);
  background: var(--red);
  color: var(--paper);
  font-size: var(--step--1);
  font-weight: 500;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.brand { display: block; flex: none; }
.brand img { width: auto; height: 3.25rem; background: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  margin-left: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
}
.nav-toggle .icon { width: 1.75rem; height: 1.75rem; }
.nav-toggle .when-open,
.nav-toggle[aria-expanded="true"] .when-closed { display: none; }
.nav-toggle[aria-expanded="true"] .when-open { display: block; }

.site-header { isolation: isolate; }
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - 100%);
  z-index: 49;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem var(--gutter) 5rem;
  background: var(--ink);
  overflow-y: auto;
}
.site-nav.is-open { display: flex; }
.site-nav ul { list-style: none; display: grid; gap: 0.25rem; }
.site-nav a {
  display: block;
  padding: 0.6rem 0;
  color: var(--paper);
  font-size: var(--step-2);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--paper); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }

.nav-search { display: flex; border-bottom: 2px solid var(--gray-700); }
.nav-search input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0.75rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--paper);
}
.nav-search input[type="search"]:focus-visible { box-shadow: none; }
.nav-search:focus-within { border-bottom-color: var(--paper); }
.nav-search input::placeholder { color: var(--gray-500); }
.nav-search button { border: 0; background: none; color: var(--paper); padding: 0 0.5rem; }

.header-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.header-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  color: var(--paper);
}
.header-icon:hover { color: var(--paper); opacity: 0.8; }
.header-icon .icon { width: 1.6rem; height: 1.6rem; }
.header-phone { display: none; }

.cart-count {
  position: absolute;
  top: 0.2rem; right: 0.05rem;
  min-width: 1.25rem; height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 1rem;
  background: var(--red);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.cart-count.is-empty { display: none; }

body.nav-open { overflow: hidden; }

/* ---------- Flash messages ---------- */

.flash-stack { display: grid; gap: 0.5rem; padding-top: 1rem; }
.flash {
  margin: 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--ink);
  background: var(--gray-50);
  font-weight: 500;
}
.flash-success { border-color: var(--success); background: #eaf6ef; }
.flash-error { border-color: var(--red); background: #fdeced; }
.flash-info { border-color: var(--blue); background: #e9f0fc; }

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 2.5rem 3rem;
}

/* The signature: headline type printed with a slightly off-register red and blue pass,
   like a hand-pulled screen print. */
.misprint {
  margin: 0 0 1.25rem;
  color: var(--paper);
  font-size: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-shadow:
    -0.035em 0.025em 0 var(--red),
    0.035em -0.02em 0 var(--blue);
}
.misprint-sm { font-size: clamp(2.25rem, 7vw, 4.25rem); }

.hero-lead { max-width: 34rem; font-size: var(--step-1); color: #d9dbe0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-call { margin: 1.25rem 0 0; color: #d9dbe0; }
.hero-call a { color: var(--paper); font-weight: 700; }

.hero-figure { margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 3px solid var(--red);
  margin-top: 0.75rem;
  font-weight: 500;
}
.hero-figure figcaption a { color: var(--paper); text-decoration: none; }
.hero-figure figcaption a:hover { text-decoration: underline; }

/* ---------- Perks strip ---------- */

.perks { border-bottom: 1px solid var(--gray-300); }
.perks-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  padding-block: 1.25rem;
  font-size: var(--step--1);
  font-weight: 500;
}
.perks-list li { display: flex; align-items: center; gap: 0.6rem; }
.perks-list .icon { color: var(--red); width: 1.5rem; height: 1.5rem; }

/* ---------- Sections ---------- */

.section { padding-block: 3rem; }
.section-tight { padding-block: 2rem 3rem; }
.section-flush { padding-bottom: 3.5rem; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.section-head h2 { margin: 0; font-size: var(--step-4); }

.page-top { padding-top: 1.25rem; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading h1 { margin-bottom: 0.25rem; font-size: var(--step-5); }
.page-heading p { color: var(--gray-700); margin: 0; }
.page-heading-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }

.empty-note { color: var(--gray-700); }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs { margin-bottom: 1rem; font-size: var(--step--1); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--gray-500); }
.breadcrumbs a { color: var(--gray-700); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 500; }
.hero .breadcrumbs a, .custom-hero .breadcrumbs a { color: #c4c7ce; }
.custom-hero .breadcrumbs [aria-current] { color: var(--paper); }

/* ---------- Product grid and card ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 0.875rem;
}

.product-card { position: relative; display: flex; flex-direction: column; }
.product-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-50);
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; }
.product-card-media .hover-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
@media (hover: hover) {
  .product-card:hover .hover-img { opacity: 1; }
}
.product-card-body { padding-top: 0.75rem; }
.product-card h3 { margin: 0 0 0.15rem; font-size: var(--step-0); font-weight: 500; line-height: 1.35; }
.product-card h3 a { color: var(--ink); text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card h3 a:focus-visible { box-shadow: none; }
.product-card:focus-within { box-shadow: var(--focus); }
.product-card-meta { margin: 0 0 0.25rem; color: var(--gray-700); font-size: var(--step--1); }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin: 0; font-weight: 700; color: var(--ink); }
.price s { font-weight: 400; }

.tag {
  position: absolute;
  top: 0.5rem; left: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.tag-sale { background: var(--red); color: var(--paper); }

.img-missing { display: block; width: 100%; aspect-ratio: 1; background: var(--gray-100); }

/* ---------- Custom band ---------- */

.custom-band {
  background: var(--blue);
  color: var(--paper);
  padding-block: 3rem;
}
.custom-band h2 { color: var(--paper); font-size: var(--step-5); letter-spacing: -0.02em; }
.custom-band p { color: #e3ecfb; max-width: 36rem; }
.custom-band-grid { display: grid; gap: 2.5rem; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 1.5rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
}
.steps h3 { margin-bottom: 0.25rem; color: inherit; }
.steps p { margin: 0; }
.custom-band .steps h3 { color: var(--paper); }
.steps-dark li::before { border-color: var(--red); color: var(--red); }
.steps-dark p { color: var(--gray-700); }

/* ---------- Category tiles ---------- */

.category-tiles { display: grid; gap: 0.875rem; }
.category-tile {
  display: grid;
  gap: 0.35rem;
  padding: 1.5rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.category-tile:hover { background: var(--ink); color: var(--paper); }
.category-name { font-size: var(--step-3); font-weight: 700; line-height: 1.1; }
.category-desc { color: inherit; opacity: 0.8; }
.category-count { margin-top: 0.75rem; font-size: var(--step--1); font-weight: 700; color: var(--red); }
.category-tile:hover .category-count { color: var(--paper); }
.category-tile-custom { border-color: var(--red); background: var(--red); color: var(--paper); }
.category-tile-custom .category-count { color: var(--paper); }
.category-tile-custom:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ---------- Contact strip ---------- */

.contact-strip {
  display: grid;
  gap: 1.25rem;
  padding-block: 2rem;
  background: linear-gradient(var(--ink), var(--ink)) center top / calc(100% - 2 * var(--gutter)) 3px no-repeat;
}
.contact-strip h2 { font-size: var(--step-3); margin-bottom: 0.25rem; }
.contact-strip p { margin: 0; color: var(--gray-700); }
.contact-strip-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Shop listing ---------- */

.pill-nav { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; margin-bottom: 1rem; scrollbar-width: thin; }
.pill {
  flex: none;
  padding: 0.45rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 2rem;
  color: var(--ink);
  font-weight: 500;
  font-size: var(--step--1);
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill-accent { border-color: var(--red); color: var(--red); }

.shop-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--gray-300);
}
.shop-toolbar .field-search { grid-column: 1 / -1; }
.shop-toolbar .text-link { align-self: center; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 2.75rem; height: 2.75rem;
  border: 2px solid var(--gray-300);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.empty-state { padding: 3rem 1rem; text-align: center; background: var(--gray-50); }
.empty-state .hero-actions { justify-content: center; }
.empty-state-left { text-align: left; padding: 1.5rem; }

/* ---------- Forms ---------- */

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; margin-bottom: 1rem; min-width: 0; }
.field label, .field-inline label { font-weight: 500; font-size: var(--step--1); color: var(--ink); }
.field-inline { margin: 0; display: grid; gap: 0.3rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], input[type="url"],
select, textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}
textarea { resize: vertical; min-height: 6rem; }
select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
input:hover, select:hover, textarea:hover { border-color: var(--gray-500); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); box-shadow: var(--focus); border-radius: var(--radius); }
[aria-invalid="true"] { border-color: var(--red) !important; }

.field-error { margin: 0; color: var(--red-dark); font-size: var(--step--1); font-weight: 500; }
.hint { margin: 0; color: var(--gray-700); font-size: var(--step--1); }
.form-intro { color: var(--gray-700); }
.fine-print { color: var(--gray-700); font-size: var(--step--1); }

.field-grid { display: grid; gap: 0 1rem; }

fieldset { margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 0.75rem; font-size: var(--step-1); font-weight: 700; color: var(--ink); }

.card-form {
  padding: 1.25rem;
  border: 1px solid var(--gray-300);
  background: var(--paper);
}
.card-form > h1, .card-form > h2 { font-size: var(--step-3); }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.75rem 0; font-size: var(--step--1); }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex: none; accent-color: var(--ink); }

.choice-list { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-weight: 500;
}
.choice input:checked + span { border-color: var(--ink); background: var(--gray-50); box-shadow: inset 4px 0 0 var(--red); }
.choice input:focus-visible + span { box-shadow: var(--focus); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.file-drop {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  grid-template-columns: minmax(0, 1fr);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.file-drop .icon { width: 2rem; height: 2rem; color: var(--blue); }
.file-drop input { width: 100%; max-width: 100%; min-width: 0; font-size: var(--step--1); }

/* ---------- Product page ---------- */

.product-layout { display: grid; gap: 2rem; padding-bottom: 2rem; }

.gallery-main { aspect-ratio: 1; background: var(--gray-50); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { list-style: none; display: flex; gap: 0.5rem; margin-top: 0.5rem; overflow-x: auto; }
.gallery-thumbs a { display: block; width: 4.5rem; border: 2px solid transparent; }
.gallery-thumbs a[aria-current="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.product-info h1 { font-size: var(--step-4); margin-bottom: 0.4rem; }
.product-price { font-size: var(--step-3); margin-bottom: 1rem; }
.product-lead { font-size: var(--step-1); color: var(--gray-700); }
.product-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0 0 1.5rem; }
.product-facts div { display: flex; gap: 0.4rem; }
.product-facts dt { color: var(--gray-700); }
.product-facts dd { margin: 0; font-weight: 500; }

.buy-box { display: grid; gap: 1rem; padding: 1.25rem 0; border-block: 1px solid var(--gray-300); }
.size-picker { margin: 0; }
.size-picker legend { font-size: var(--step-0); margin-bottom: 0.5rem; }
.size-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size-option { position: relative; }
.size-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size-option span {
  display: grid;
  place-items: center;
  min-width: 3.25rem;
  min-height: 3rem;
  padding: 0.3rem 0.75rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}
.size-option small { display: block; font-weight: 500; font-size: 0.7rem; color: var(--gray-700); }
.size-option input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.size-option input:checked + span small { color: #cfd2d8; }
.size-option input:focus-visible + span { box-shadow: var(--focus); }
.size-option:hover span { border-color: var(--ink); }

.buy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.qty-field { display: grid; gap: 0.3rem; }
.qty-field label { font-weight: 500; font-size: var(--step--1); }
.qty-stepper { display: inline-flex; border: 2px solid var(--gray-300); border-radius: var(--radius); }
.qty-stepper button {
  width: 2.75rem;
  border: 0;
  background: none;
  font-size: 1.25rem;
  font-weight: 700;
}
.qty-stepper button:hover { background: var(--gray-100); }
.qty-stepper input {
  width: 3.25rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.assurance { list-style: none; display: grid; gap: 0.6rem; margin: 1.25rem 0 1.75rem; font-size: var(--step--1); }
.assurance li { display: flex; gap: 0.6rem; align-items: flex-start; }
.assurance .icon { color: var(--blue); margin-top: 0.1rem; }

.product-description h2 { font-size: var(--step-2); }
.product-description p { max-width: 40rem; }

.notice { padding: 1rem 1.25rem; background: var(--gray-50); border-left: 4px solid var(--blue); }

/* ---------- Cart ---------- */

.cart-layout { display: grid; gap: 2rem; align-items: start; }
.cart-lines ul { list-style: none; border-top: 1px solid var(--gray-300); }
.cart-line {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.75rem 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-300);
}
.cart-thumb { grid-row: span 2; }
.cart-thumb img { width: 5rem; aspect-ratio: 1; object-fit: cover; }
.cart-line-info h2 { font-size: var(--step-0); margin: 0 0 0.15rem; }
.cart-line-info h2 a { color: var(--ink); text-decoration: none; }
.cart-line-info h2 a:hover { text-decoration: underline; }
.cart-line-info p { margin: 0; font-size: var(--step--1); color: var(--gray-700); }
.cart-line-qty { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cart-line-total { grid-column: 2; margin: 0; font-weight: 700; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.25rem; flex-wrap: wrap; }

.cart-summary, .checkout-summary {
  padding: 1.25rem;
  background: var(--gray-50);
  border-top: 4px solid var(--ink);
}
.cart-summary h2, .checkout-summary h2 { font-size: var(--step-2); }
.summary-totals { margin: 0 0 1rem; }
.summary-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; }
.summary-totals dt { color: var(--gray-700); }
.summary-totals dd { margin: 0; font-weight: 500; }
.summary-grand { margin-top: 0.4rem; padding-top: 0.75rem !important; border-top: 2px solid var(--ink); }
.summary-grand dt, .summary-grand dd { color: var(--ink); font-weight: 700; font-size: var(--step-1); }
.summary-note { font-size: var(--step--1); color: var(--gray-700); }
.summary-lines { list-style: none; margin-bottom: 1rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--gray-300); }
.summary-name { display: grid; }
.summary-name small { color: var(--gray-700); }
.checkout-summary .text-link { display: inline-block; margin-top: 1rem; }
.checkout-summary .btn { margin-top: 0.5rem; }

.checkout-layout { display: grid; gap: 1.5rem; align-items: start; }
.checkout-main { display: grid; gap: 1rem; }
.checkout-main fieldset.card-form { margin: 0; }
.checkout-main legend { float: left; width: 100%; }
.checkout-main legend + * { clear: both; }

/* ---------- Result and order pages ---------- */

.result-panel { text-align: center; padding: 1rem 0 2rem; }
.result-panel .hero-actions { justify-content: center; }
.result-icon {
  display: inline-grid;
  place-items: center;
  width: 4rem; height: 4rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: -4px 3px 0 var(--red), 4px -3px 0 var(--blue);
}
.result-icon .icon { width: 2rem; height: 2rem; }
.result-icon.is-muted { background: var(--gray-500); box-shadow: none; }
.error-code { margin: 0; font-size: var(--display); font-weight: 700; line-height: 1; color: var(--ink); text-shadow: -0.035em 0.025em 0 var(--red), 0.035em -0.02em 0 var(--blue); }
.order-number { font-size: var(--step-1); }
.summary-title { font-size: var(--step-2); margin-top: 1rem; }
.address-block { margin: 1.5rem 0; }
.address-block h3 { font-size: var(--step-0); }

.status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-paid, .status-completed, .status-shipped, .status-ready_for_pickup { background: #e3f4ea; color: var(--success); }
.status-awaiting_payment, .status-pending_payment { background: #fff3dc; color: var(--warning); }
.status-processing { background: #e5eefc; color: var(--blue-dark); }
.status-cancelled { background: #fdeced; color: var(--red-dark); }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.data-table th, .data-table td { padding: 0.75rem 0.5rem; text-align: left; border-bottom: 1px solid var(--gray-300); vertical-align: top; }
.data-table th { font-weight: 700; color: var(--ink); border-bottom-width: 2px; border-bottom-color: var(--ink); }

/* ---------- Account ---------- */

.auth-wrap { display: grid; justify-items: center; padding-block: 2rem 4rem; }
.auth-wrap-top { padding-top: 0; }
.auth-card { width: 100%; max-width: 28rem; }
.auth-card h1 { font-size: var(--step-4); }
.auth-links { margin: 1rem 0 0; font-size: var(--step--1); text-align: center; }

.account-layout { display: grid; gap: 2rem; }
.account-layout h2 { font-size: var(--step-2); }
.account-card { padding: 1.25rem; background: var(--gray-50); }
.account-links { list-style: none; display: grid; gap: 0.5rem; }
.delete-account { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--gray-300); font-size: var(--step--1); }
.delete-account summary { cursor: pointer; color: var(--red-dark); font-weight: 500; }
.delete-account form { margin-top: 0.75rem; }

/* ---------- Custom page ---------- */

.custom-hero { background: var(--ink); color: var(--paper); padding: 1.25rem 0 2.5rem; }
.custom-hero-grid { display: grid; gap: 2rem; }
.custom-uses { list-style: none; display: grid; gap: 0.5rem; align-content: start; }
.custom-uses li {
  padding: 0.6rem 0 0.6rem 1.25rem;
  border-bottom: 1px solid var(--gray-700);
  position: relative;
  font-weight: 500;
}
.custom-uses li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 0.5rem; height: 0.5rem;
  background: var(--red);
  box-shadow: 2px -2px 0 var(--blue);
}
.custom-layout { display: grid; gap: 2rem; padding-block: 2rem 4rem; align-items: start; }
.custom-aside h2 { font-size: var(--step-2); }
.aside-contact { display: grid; gap: 0.6rem; margin-top: 2rem; padding: 1.25rem; background: var(--gray-50); }
.aside-contact h3 { margin-bottom: 0.25rem; }

/* ---------- Contact page ---------- */

.contact-layout { display: grid; gap: 2rem; align-items: start; }
.contact-methods { display: grid; gap: 0.75rem; }
.contact-method {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-300);
  color: var(--gray-900);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.contact-method:hover { border-color: var(--ink); color: var(--ink); }
.contact-method .icon { color: var(--red); width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; }
.contact-method span { display: grid; }
.contact-method strong { color: var(--ink); }
.contact-method-accent { border-color: var(--blue); }
.contact-method-accent .icon { color: var(--blue); }

/* ---------- Legal ---------- */

.legal { max-width: 46rem; padding-bottom: 4rem; }
.legal h1 { font-size: var(--step-5); }
.legal h2 { font-size: var(--step-2); margin-top: 2rem; }
.legal ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal-date { color: var(--gray-700); }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #c4c7ce; padding-top: 3rem; font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; padding-bottom: 2.5rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { height: 5rem; width: auto; margin-bottom: 1rem; background: none; }
.footer-brand p { max-width: 22rem; }
.site-footer h2 { color: var(--paper); font-size: var(--step-0); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; display: grid; gap: 0.5rem; }
.site-footer a, .site-footer .link-button { color: #c4c7ce; text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover, .site-footer .link-button:hover { color: var(--paper); text-decoration: underline; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.5rem; overflow-wrap: anywhere; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.25rem 2rem;
  background: linear-gradient(var(--gray-700), var(--gray-700)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.footer-bottom p { margin: 0; }
.social-links { display: flex !important; gap: 0.75rem !important; }
.social-links a { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 1rem var(--gutter);
  background: var(--gray-900);
  color: #e1e3e8;
  border-top: 4px solid var(--red);
  font-size: var(--step--1);
}
.cookie-inner { max-width: var(--wrap); margin-inline: auto; display: grid; gap: 1rem; }
.cookie-banner h2 { color: var(--paper); font-size: var(--step-1); margin-bottom: 0.25rem; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--paper); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cookie-actions .btn { flex: 1 1 10rem; }

/* ==========================================================================
   Larger screens
   ========================================================================== */

@media (min-width: 600px) {
  :root { --gutter: 1.5rem; }
  .perks-list { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .shop-toolbar { grid-template-columns: minmax(12rem, 2fr) 1fr 1fr auto auto; }
  .shop-toolbar .field-search { grid-column: auto; }
  .category-tiles { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-span { grid-column: 1 / -1; }
  .card-form { padding: 1.75rem; }
  .cart-line { grid-template-columns: 6rem 1fr auto; align-items: start; }
  .cart-thumb img { width: 6rem; }
  .cart-line-total { grid-column: 3; grid-row: 1; text-align: right; }
  .cart-line-qty { grid-column: 2; }
  .cookie-inner { grid-template-columns: 1fr auto; align-items: center; }
  .cookie-actions .btn { flex: none; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (min-width: 700px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.25rem; }
  .field-third { grid-column: span 1; }
  .field-grid:has(.field-third) { grid-template-columns: 2fr 1fr 1fr; }
  .field-grid:has(.field-third) .field-span { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  :root { --header-h: 5.5rem; }
  .brand img { height: 4.25rem; }
  .hero-grid { grid-template-columns: 1.25fr 1fr; align-items: center; padding-block: 4rem 4.5rem; gap: 3.5rem; }
  .custom-band { padding-block: 4.5rem; }
  .custom-band-grid { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 4rem; }
  .section { padding-block: 4.5rem; }
  .product-layout { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 1rem); }
  .gallery-thumbs a { width: 5.5rem; }
  .cart-layout { grid-template-columns: 1fr 22rem; gap: 3rem; }
  .cart-summary, .checkout-summary { position: sticky; top: calc(var(--header-h) + 1rem); }
  .checkout-layout { grid-template-columns: 1fr 24rem; gap: 2.5rem; }
  .account-layout { grid-template-columns: 1fr 20rem; }
  .custom-hero-grid { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 4rem; }
  .custom-layout { grid-template-columns: 1fr 20rem; gap: 3rem; }
  .custom-aside { position: sticky; top: calc(var(--header-h) + 1rem); }
  .contact-layout { grid-template-columns: 20rem 1fr; gap: 3rem; }
  .contact-strip { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .header-bar { gap: 2rem; }
  .site-nav {
    position: static;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    background: none;
    overflow: visible;
  }
  .site-nav ul { display: flex; gap: 1.5rem; }
  .site-nav a { font-size: var(--step-0); font-weight: 500; padding: 0.5rem 0; }
  .nav-search { width: 11rem; border-bottom-color: var(--gray-700); }
  .nav-search input[type="search"] { padding: 0.4rem 0; font-size: var(--step--1); }
  .header-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.5rem;
    color: var(--paper);
    font-weight: 700;
    font-size: var(--step--1);
    text-decoration: none;
    white-space: nowrap;
  }
  .header-phone .icon { color: var(--red); }
  .header-phone:hover { color: var(--paper); text-decoration: underline; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

@media print {
  .site-header, .site-footer, .cookie-banner, .announcement, .hero-actions { display: none !important; }
  body { color: #000; }
}
