/* ═══════════════════════════════════════════════════════════
   Uglycorp storefront
   ═══════════════════════════════════════════════════════════ */

/* ── Local fonts ── */
@font-face {
  font-family: 'Work Sans';
  src: url('/public/fonts/WorkSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Pixelify Sans';
  src: url('/public/fonts/PixelifySans.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* ── Tokens ── */
:root {
  color-scheme: light;

  /* Brand — only these three */
  --paper: #dde7e8;
  --ink: #181818;
  --green: #57ec74;

  /* Ink tints for secondary text on paper */
  --ink-soft: #33403f;
  --muted: #5a6668;
  --muted-2: #41504f;
  --on-ink-muted: #a9b6b7;

  /* XP system chrome — never for brand content */
  --xp-face: #ece9d8;
  --xp-chrome: #c0c0c0;
  --xp-btn: #e0e0e0;
  --xp-border: #0054e3;
  --xp-close: #c0505a;
  --xp-sep: #c9c6b6;
  --disabled: #cfd8d9;

  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-pixel: 'Pixelify Sans', monospace;

  --shadow-hard-1: 3px 3px 0 #181818;
  --shadow-hard-2: 3px 3px 0 rgba(0, 0, 0, 0.35);
  --shadow-hard-3: 5px 5px 0 rgba(0, 0, 0, 0.4);

  --gutter: 1.5rem;
}

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
  }
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Keep anchored headings clear of the sticky header */
:where(h1, h2, h3) {
  scroll-margin-top: 6rem;
}

/* ── Focus / selection / scrollbar ── */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.drawer :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--green);
}

::selection {
  background: var(--green);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--paper);
}

/* ── CRT scanlines (fixed overlay, decorative only) ──
   Must stay above in-flow content (the hero stack tops out at z 3) but below
   product media (11), the sticky header (20) and the cart drawer (30). */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(24, 24, 24, 0.035) 2px,
    rgba(24, 24, 24, 0.035) 4px
  );
}

.card,
.product-media,
.cart-thumb,
.cart-thumb-link {
  position: relative;
  z-index: 11;
}

/* ── Layout ── */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main > h1 {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1.5rem;
}

/* ── Header: the desktop taskbar ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 2px solid var(--green);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
}

.logo-mascot {
  width: 22px;
  height: 25px;
  filter: brightness(0) saturate(100%) invert(76%) sepia(40%) saturate(450%)
    hue-rotate(91deg);
}

.logo-wordmark {
  display: inline-block;
  width: auto;
  height: 26px;
  aspect-ratio: 417.7 / 224.14;
  background-color: var(--green);
  -webkit-mask: url("/public/brand/logo.svg") center / contain no-repeat;
  mask: url("/public/brand/logo.svg") center / contain no-repeat;
}

/* Locale switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1.25rem;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
}

.lang-switch a,
.lang-switch span {
  color: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.1rem 0.15rem;
}

.lang-switch span[aria-current] {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch a:hover {
  color: var(--green);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green);
}

.badge {
  min-width: 1.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  border: 2px solid var(--green);
  font-family: var(--font-pixel);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ── Cart drawer: an XP window sliding from the right ── */

/* Scrim behind the open drawer; clicking it closes the drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  /* under the drawer (30), over the header (20) */
  z-index: 29;
  background: rgba(24, 24, 24, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(400px, 94vw);
  background: var(--xp-face);
  border-left: 2px solid var(--xp-border);
  box-shadow: var(--shadow-hard-3);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 30;
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

/* Fake XP titlebar */
.drawer::before {
  content: 'cart.exe — UGLYCORP';
  display: block;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #0a5edf 0%, #0040b0 100%);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 2.75rem 0.5rem 0.75rem;
  white-space: nowrap;
}

.drawer-close,
.lightbox-close {
  position: absolute;
  top: 0.3rem;
  right: 0.35rem;
  z-index: 2;
  width: 26px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--xp-close);
  color: #fff;
  border: 1.5px outset rgba(255, 255, 255, 0.45);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.drawer-close:active,
.lightbox-close:active {
  border-style: inset;
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.drawer-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--xp-sep);
  padding-bottom: 0.5rem;
}

/* Text column beside the line's .cart-thumb. min-width: 0 lets long titles
   wrap instead of pushing the meta off the drawer's edge. */
.drawer-line-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.drawer-line .cart-thumb,
.drawer-line .ph-img {
  flex: none;
}

.drawer-line-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
}

.drawer-line-title {
  font-weight: 600;
}

.drawer-line-meta {
  color: var(--muted);
  white-space: nowrap;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.drawer-empty {
  color: var(--muted);
  padding: 2rem 0;
}

.drawer-actions .btn {
  width: 100%;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: clamp(34rem, 88vh, 54rem);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.hero-board {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-board {
    left: 38%;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(221, 231, 232, 0.94) 0%,
    rgba(221, 231, 232, 0.88) 38%,
    rgba(221, 231, 232, 0.45) 72%,
    rgba(221, 231, 232, 0.2) 100%
  );
}

@media (min-width: 768px) {
  .hero-veil {
    background: linear-gradient(
      90deg,
      #dde7e8 0%,
      #dde7e8 38%,
      rgba(221, 231, 232, 0.72) 46%,
      rgba(221, 231, 232, 0) 60%
    );
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(4rem, 10vw, 7rem);
}

.hero-eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.hero-logo {
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

.hero-logo img {
  width: min(100%, 28rem);
  height: auto;
}

.hero-tagline {
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.hero-desc {
  color: #26302f;
  max-width: 70ch;
}

/* Ghost controls over the board: near-invisible until touched */
.hero-controls {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(0.75rem, 2.5vw, 1.5rem);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-ctl {
  width: 38px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: 0.32;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 160ms ease;
}

.hero-ctl:hover,
.hero-ctl:focus-visible {
  opacity: 1;
}

.hero-ctl .glyph-play {
  display: none;
}

.hero-ctl.is-paused .glyph-play {
  display: block;
}

.hero-ctl.is-paused .glyph-pause {
  display: none;
}

/* ── Ticker band ── */
.ticker {
  display: flex;
  overflow: hidden;
  width: 100%;
  user-select: none;
  background: var(--green);
  border-block: 2px solid var(--ink);
  padding-block: 0.625rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.ticker-track {
  display: flex;
  flex-shrink: 0;
  gap: 2.5rem;
  padding-right: 2.5rem;
  animation: ticker 34s linear infinite;
  will-change: transform;
}

.ticker-track span {
  font-family: var(--font-pixel);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* ── Screen-reader-only text (real text behind decorative layers) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Filter chips (collections + variant pickers) ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.25rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease,
    color 160ms ease;
}

.chip-opt {
  min-height: 2rem;
  padding: 0.15rem 0.75rem;
}

/* Dark color swatch look at rest — declared before -active so the
   selected state wins. */
.chip-dark {
  background: var(--ink);
  color: var(--paper);
}

.chip-active {
  background: var(--green);
  color: var(--ink);
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (hover: hover) {
  .chip:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard-1);
  }
}

/* ── Product grid: 2-up on phones, never auto-fill ── */
.grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 0 3rem;
}

@media (min-width: 640px) {
  .grid {
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid {
    gap: 1.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Card ── */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-hard-1);
  }
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--ink);
  background: var(--disabled);
}

/* Placeholder plate: mascot silhouette on rotating brand colors */
.ph-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.ph-img::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  height: auto;
  aspect-ratio: 200 / 230;
  background-color: var(--ink);
  -webkit-mask: url('/public/brand/mascota-full.svg') center / contain no-repeat;
  mask: url('/public/brand/mascota-full.svg') center / contain no-repeat;
}

.grid .card:nth-child(3n + 2) .ph-img {
  background: var(--green);
}

.grid .card:nth-child(3n) .ph-img {
  background: var(--ink);
  color: var(--on-ink-muted);
}

.grid .card:nth-child(3n) .ph-img::before {
  background-color: var(--green);
}

.card-body {
  padding: 1rem 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.card-title {
  display: block;
  font-weight: 800;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.card-price {
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Status tag: always text, never color alone */
.soldout {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Product detail ── */
.back {
  display: inline-block;
  margin: 1.5rem 0 1rem;
  font-family: var(--font-pixel);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.back:hover {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-block: 1rem 4rem;
}

@media (max-width: 760px) {
  .product {
    grid-template-columns: 1fr;
  }
}

.product-img,
.product-media .ph-img {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 0;
}

.product-img {
  background: var(--disabled);
}

/* ── Product image zoom ── */
.product-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  touch-action: manipulation;
}

/* Fullscreen viewer as an XP window */
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 3.25rem 1rem 1.5rem;
  background: rgba(24, 24, 24, 0.92);
  overflow: hidden;
  user-select: none;
}

.lightbox[open]::before {
  content: 'zoom.exe';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* above the zoomed (transformed) photo, below the close button — the
     photo pans under the window chrome like the cart drawer's titlebar */
  z-index: 1;
  background: linear-gradient(180deg, #0a5edf 0%, #0040b0 100%);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 2.75rem 0.5rem 0.75rem;
  white-space: nowrap;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  background: var(--disabled);
  box-shadow: var(--shadow-hard-3);
  cursor: zoom-in;
  touch-action: none;
  /* imgs are natively draggable — without this the browser steals the pan
     gesture as a ghost image-drag and pointercancels after a few pixels */
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 180ms ease;
}

.lightbox-img.is-zoomed {
  cursor: grab;
}

.lightbox-img.is-dragging {
  transition: none;
  cursor: grabbing;
}

.product-info h1 {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.price {
  font-family: var(--font-pixel);
  font-size: 1.25rem;
  margin: 0 0 1rem;
  font-variant-numeric: tabular-nums;
}

.desc {
  color: var(--muted-2);
  max-width: 70ch;
}

.opt {
  margin: 1.5rem 0;
}

.opt-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.opt-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Buttons: green pill (brand) / beveled square (system) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease,
    color 160ms ease;
}

.btn-primary {
  background: var(--green);
  color: var(--ink);
}

.btn-primary:disabled {
  background: var(--disabled);
  border-color: var(--disabled);
  cursor: not-allowed;
}

@media (hover: hover) {
  .btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard-1);
  }
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Quantity stepper: an XP button, not a pill */
.btn-qty {
  width: 2.75rem;
  height: 2.75rem;
  min-height: 0;
  padding: 0;
  border: 2px outset #ccc;
  border-radius: 0;
  background: var(--xp-btn);
  font-family: var(--font-pixel);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.btn-qty:active {
  border-style: inset;
  transform: none;
  box-shadow: none;
}

@media (hover: hover) {
  .btn-qty:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ── Cart page ── */
.cart {
  display: flex;
  flex-direction: column;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding: 1rem 0;
}

.cart-thumb {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--disabled);
}

.cart-thumb-link {
  display: block;
  flex: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

@media (hover: hover) {
  .cart-thumb-link:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-hard-1);
  }
}

.cart-line .ph-img,
.drawer-line .ph-img {
  width: 72px;
  border: 2px solid var(--ink);
  padding: 0.35rem 0.4rem;
  font-size: 0.625rem;
}

.cart-line-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cart-line-title {
  font-weight: 700;
}

@media (hover: hover) {
  .cart-line-title:hover,
  .drawer-line-title:hover {
    text-decoration: underline;
    text-decoration-color: var(--green);
    text-decoration-thickness: 2px;
  }
}

.line-variant,
.cart-line-price {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ── Inline variant picker (cart line + drawer line) ── */
.variant-toggle {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: start;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .variant-toggle:hover {
    color: var(--ink);
    text-decoration-color: var(--green);
  }
}

.line-opts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

/* Compact chips */
.chip-line {
  min-height: 1.75rem;
  padding: 0.05rem 0.55rem;
  border-width: 1.5px;
  font-size: 0.6875rem;
}

.chip-line[aria-current] {
  cursor: default;
}

.line-opts-msg {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.qty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qty-value {
  font-family: var(--font-pixel);
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cart-line-total {
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Totals: another XP window */
.cart-totals {
  margin-top: 1.5rem;
  margin-left: auto;
  max-width: 420px;
  background: var(--xp-face);
  border: 2px solid var(--xp-border);
  border-radius: 0;
  box-shadow: var(--shadow-hard-2);
  padding: 0 1.25rem 1.25rem;
}

.cart-totals::before {
  content: 'totals.exe';
  display: block;
  background: linear-gradient(180deg, #0a5edf 0%, #0040b0 100%);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  padding: 0.375rem 0.75rem;
  margin: 0 -1.25rem 1rem;
}

.tot-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
}

.tot-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.tot-strong {
  font-weight: 800;
  font-size: 1.0625rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.checkout-note {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0.75rem 0 0;
}

/* ── Empty states ── */
.empty {
  color: var(--muted-2);
  padding: 3rem 0;
}

.empty a {
  text-decoration: underline;
}

/* ── Footer: ink band, three columns + credit line (as the reference) ── */
.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  border-top: 2px solid var(--green);
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-block: clamp(3rem, 8vw, 5rem);
  font-size: 0.8125rem;
  font-weight: 500;
}

.footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

/* Full logo, paper tone on ink, masked like the header wordmark */
.footer-logo {
  margin: 0;
}

.footer-logo-mark {
  display: inline-block;
  width: min(100%, 15rem);
  aspect-ratio: 417.7 / 224.14;
  background-color: var(--paper);
  -webkit-mask: url('/public/brand/logo.svg') center / contain no-repeat;
  mask: url('/public/brand/logo.svg') center / contain no-repeat;
}

.footer-since {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--green);
  margin-top: 1rem;
}

.footer-mascots {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: 1.5rem;
}

.footer-mascot {
  display: block;
  -webkit-mask: var(--mascot) center / contain no-repeat;
  mask: var(--mascot) center / contain no-repeat;
}

.footer-heading {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--green);
  margin: 0 0 1rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.375rem;
}

.footer-links a {
  display: block;
  padding-block: 0.35rem;
  color: var(--on-ink-muted);
}

@media (hover: hover) {
  .footer-links a:hover {
    color: var(--paper);
    text-decoration: underline;
    text-decoration-color: var(--green);
  }
}

.footer-note {
  margin-bottom: 0.25rem;
}

.footer-ig {
  display: block;
  margin-top: 1.25rem;
  padding-block: 0.35rem;
  font-family: var(--font-pixel);
  font-size: 0.875rem;
  color: var(--green);
}

.footer-ig:hover {
  text-decoration: underline;
}

.footer-mail {
  display: block;
  padding-block: 0.35rem;
  word-break: break-word;
}

.footer-mail:hover {
  color: var(--paper);
}

.footer-bottom {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid #2e2e2e;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #5c5c5c;
}

.footer-signature {
  color: #3f3f3f;
  font-size: 0.875rem;
}

/* ── Phone: fingers win over pixel-perfect chrome ── */
@media (max-width: 767px) {
  .chip {
    min-height: 44px;
  }

  .cart-line {
    grid-template-areas:
      'thumb info info'
      'qty qty total';
    grid-template-columns: 56px 1fr auto;
    row-gap: 0.75rem;
  }

  .cart-line > :first-child {
    grid-area: thumb;
  }

  .cart-line-info {
    grid-area: info;
  }

  .qty {
    grid-area: qty;
  }

  .cart-line-total {
    grid-area: total;
    align-self: center;
  }

  .cart-thumb,
  .cart-line .ph-img,
  .drawer-line .ph-img {
    width: 56px;
    height: 70px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .drawer {
    transition: none;
  }

  .ticker-track {
    animation: none;
    transform: none;
  }
}
