/* RECLUSE — shared styles
   Linked from every page: <link rel="stylesheet" href="style.css"> */

@import url("https://fonts.googleapis.com/css2?family=Michroma&family=Barlow:wght@400;500;600&display=swap");

:root {
  --ink: #111111;
  --paper: #ffffff;
  --stone: #efefed;
  --line: #e4e4e2;
  --muted: #5f5f5f;

  --radius: 20px;
  --radius-sm: 12px;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1344px;

  --wide: "Michroma", "Arial Black", sans-serif;
  --text: "Barlow", "Helvetica Neue", Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

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

button { font: inherit; color: inherit; cursor: pointer; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- nav ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad);
  font-family: var(--wide);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.nav-links { display: flex; gap: 6px; }

/* every nav link is a tappable pill (except the logo) */
.nav a:not(.nav-logo) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--stone);
  white-space: nowrap;
}

/* invisible margin around each pill so it's easier to tap than it looks */
.nav a:not(.nav-logo)::before {
  content: "";
  position: absolute;
  inset: -7px -3px;
}

.nav a:not(.nav-logo):hover,
.nav a:not(.nav-logo):active { background: var(--ink); color: var(--paper); }

/* cart stands out as the main action */
.nav a[href="cart.html"] { background: var(--ink); color: var(--paper); }
.nav a[href="cart.html"]:hover,
.nav a[href="cart.html"]:active { background: #333333; }

/* small logo used on inner pages */
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; letter-spacing: 0.14em; }

/* ---------- wordmark (home header) ---------- */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px var(--pad) clamp(28px, 5vw, 56px);
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: var(--wide);
  font-weight: 400;
  font-size: clamp(36px, 9.2vw, 132px);
  line-height: 1;
  letter-spacing: 0.14em;
  padding-left: 0.14em; /* balances the trailing letter-spacing */
}

.tagline {
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(8px, 1vw, 11px);
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* ---------- store closed banner ---------- */
.store-banner {
  padding: 10px var(--pad);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-family: var(--wide);
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.6;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--wide);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.btn:hover { background: #333333; }

.btn:disabled { background: #d4d4d2; color: #5f5f5f; cursor: not-allowed; }

/* ---------- drop box (home) ---------- */
.drop-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(440px, 60vw, 600px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone);
  color: var(--paper);
}

.drop-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(0.85);
  transform: scale(1.1); /* hides the soft edges the blur leaves */
}

/* dark fade behind the text so it stays readable on any photo */
.drop-box::after {
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}

.drop-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(20px, 3vw, 40px);
}

.drop-label {
  font-family: var(--wide);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.drop-title {
  margin: 8px 0 6px;
  font-family: var(--wide);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 36px);
  letter-spacing: 0.05em;
  line-height: 1.25;
}

.drop-sub { margin: 0; font-size: 16px; opacity: 0.9; }

.drop-box .btn { background: var(--paper); color: var(--ink); }
.drop-box .btn:hover { background: var(--stone); }

/* ---------- section heads ---------- */
.section { padding-top: clamp(48px, 7vw, 88px); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--wide);
  font-weight: 400;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.24em;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--wide);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.about-text {
  margin: 0;
  max-width: 60ch;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.6;
}

/* ---------- exclusive rail (home) ---------- */
.motion-toggle {
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: var(--stone);
  font-family: var(--wide);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.motion-toggle[aria-pressed="false"] { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

.rail {
  position: relative;
  margin: 0 calc(var(--pad) * -1);
  overflow: hidden;
  touch-action: pan-y; /* vertical scrolling still works on phones */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.rail.is-dragging { cursor: grabbing; }

/* chrome tube: sits in front of the hooks, so each hook looks like it wraps around it */
.rail-bar {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 0;
  right: 0;
  height: 10px;
  border-radius: 5px;
  background:
    linear-gradient(to bottom,
      #7d7d7d 0%, #e9e9e9 14%, #ffffff 24%, #cfcfcf 38%,
      #9b9b9b 55%, #5a5a5a 76%, #2b2b2b 92%, #4a4a4a 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 12px 14px -9px rgba(0, 0, 0, 0.45);
}

/* wall brackets at each end (desktop, where the ends are visible) */
@media (min-width: 900px) {
  .rail-bar { left: 24px; right: 24px; }

  .rail-bar::before,
  .rail-bar::after {
    content: "";
    position: absolute;
    top: -22px;
    width: 12px;
    height: 32px;
    border-radius: 4px 4px 7px 7px;
    background: linear-gradient(to right, #6b6b6b, #f2f2f2 45%, #8a8a8a);
    box-shadow: 0 6px 8px -4px rgba(0, 0, 0, 0.35);
  }

  .rail-bar::before { left: -6px; }
  .rail-bar::after { right: -6px; }
}

.rail-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  z-index: 1;
  width: max-content;
  padding: 14px var(--pad) 32px;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}

.rail.is-ready .rail-track { opacity: 1; }

.rail-loading {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--wide);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
  transition: opacity 0.4s ease;
}

.rail.is-ready .rail-loading { opacity: 0; }

.hang {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 12px; /* swings from where the hook sits on the rail */
}

/* pieces hang tight together, sleeves slightly overlapping like a real rail */
.hang + .hang { margin-left: clamp(-30px, -4.5vw, -14px); }

.hook { display: block; position: relative; z-index: 1; width: 44px; height: 68px; }

/* the garment sits over the bottom of the hook, like it's inside the collar */
.hang-garment {
  position: relative;
  z-index: 2;
  /* same length for every piece, like real garments on a rail; width follows the shape */
  height: clamp(130px, 34vw, 180px);
  width: auto;
  margin-top: -10px;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.rail-hint {
  margin: 0;
  text-align: center;
  font-family: var(--wide);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

/* ---------- shop pills ---------- */
.pills { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

.pill:hover, .pill.is-active { background: var(--ink); color: var(--paper); }

/* ---------- product grid + cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

/* home teaser: 2 pieces side by side */
@media (min-width: 900px) {
  .teaser { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; margin: 0 auto; }
}

.view-all { display: flex; justify-content: center; margin-top: 28px; }

.card { display: flex; flex-direction: column; gap: 10px; }

.card-img {
  aspect-ratio: 4 / 5;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--stone);
  object-fit: cover;
}

/* white-background photos get a slim outline (set by markLight in products.js) */
.card-img.is-light { border-color: var(--line); }

.card:hover .card-img { opacity: 0.9; }

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
  font-size: 14px;
}

.card-name { font-weight: 500; }
.card-price { color: var(--muted); }

/* ---------- product page ---------- */
.product { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); } /* room so the size buttons never hide behind the fixed buy bar */

.product-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
}

.product-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.product-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.1;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: #ebebea;
  font-size: 15px;
}

.details-link {
  align-self: flex-start;
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-desc { margin: 0; max-width: 60ch; color: var(--muted); }

/* photo: full width on phones */
.gallery {
  position: relative;
  margin: 0 calc(var(--pad) * -1);
  background: var(--stone);
}

/* show the whole photo, whatever its shape (no cropping) */
.gallery img { width: 100%; height: auto; }

.counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(40, 40, 40, 0.8);
  color: var(--paper);
}

.counter button { width: 44px; height: 40px; border: none; background: none; color: inherit; font-size: 18px; }
.counter span { min-width: 44px; text-align: center; }

/* hidden when a product has only one photo / one color */
[hidden] { display: none !important; }

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

.option { display: flex; flex-direction: column; gap: 10px; }

.option-head { display: flex; justify-content: space-between; align-items: center; }

.option-head h2 { margin: 0; font-size: 17px; font-weight: 600; }

.option-head span { font-size: 15px; color: var(--muted); }

.swatches { display: flex; gap: 10px; }

.swatch {
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 15px;
  background: none;
}

.swatch span {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 11px;
  border: 1px solid #d9d9d6;
}

.swatch[aria-pressed="true"] { border-color: var(--ink); }

.sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.size {
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 15px;
  font-weight: 500;
}

.size[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* buy bar: fixed to the bottom on phones */
.buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
}

.price-block { flex-grow: 1; display: flex; flex-direction: column; }

.price { font-size: 22px; font-weight: 500; }

.price-note { font-size: 14px; color: var(--muted); }

.save-btn {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: #ebebea;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-btn {
  flex-shrink: 0;
  height: 56px;
  padding: 0 26px;
  border: none;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 18px;
  font-weight: 500;
}

.add-btn:hover { background: #333333; }

/* desktop: photo left, details right, buy bar sits in the column */
@media (min-width: 900px) {
  .product { padding-bottom: 64px; }

  .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "gallery intro"
      "gallery panel"
      "gallery buy"
      "gallery .";
    column-gap: 40px;
    align-items: start;
  }

  .gallery { grid-area: gallery; margin: 0; border-radius: 28px; overflow: hidden; }

  .product-intro { grid-area: intro; padding-top: 0; }
  .panel { grid-area: panel; margin-top: 0; }

  .buy-bar {
    grid-area: buy;
    position: static;
    margin-top: 24px;
    padding: 0;
    box-shadow: none;
  }
}

/* ---------- cart ---------- */
.cart-list { display: flex; flex-direction: column; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 84px;
  height: 104px;
  border-radius: var(--radius-sm);
  background: var(--stone);
  object-fit: cover;
}

.cart-info { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }

.cart-name { font-weight: 500; }

.cart-meta { font-size: 14px; color: var(--muted); }

.qty { display: flex; align-items: center; gap: 4px; }

.qty button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.qty span { min-width: 24px; text-align: center; }

.remove-btn {
  min-height: 44px;
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* delivery choice */
.delivery-options { display: flex; flex-direction: column; gap: 8px; }

.delivery-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.delivery-option[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
  font-size: 15px;
  color: var(--muted);
}

.totals div { display: flex; justify-content: space-between; }

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 20px;
  font-weight: 500;
}

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label { font-size: 14px; font-weight: 500; }

.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
}

.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  max-width: var(--max);
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding: 24px var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--wide);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }

.footer a { display: inline-flex; align-items: center; min-height: 44px; }

.footer a:hover { color: var(--ink); }

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


/* ---------- legal pages (privacy, terms) ---------- */
.legal { max-width: 720px; padding-bottom: 24px; }
.legal h1 { margin: 16px 0 8px; font-family: var(--wide); font-weight: 400; font-size: clamp(16px, 2vw, 22px); letter-spacing: 0.18em; }
.legal h2 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; }
.legal p, .legal li { margin: 0 0 12px; line-height: 1.65; color: #333333; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal .updated { font-size: 14px; color: var(--muted); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }


/* ---------- wall frames ---------- */
.card-img-poster { aspect-ratio: 2 / 3; }

.frames-hero { display: block; }
.frames-hero img { display: block; width: 100%; height: clamp(110px, 26vw, 200px); object-fit: cover; border-radius: var(--radius); background: var(--stone); }

.section-compact { padding-top: clamp(32px, 5vw, 48px); }

.btn-sm { min-height: 40px; padding: 0 20px; font-size: 10px; }

/* "Various" pill: set apart from the clothing pills */
.pill-alt { border-style: dashed; border-color: var(--muted); color: var(--muted); font-weight: 400; }
.pill-alt:hover { border-style: solid; border-color: var(--ink); }

/* extras shelf: quieter and smaller than the clothing */
.section-extras { margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
.section-extras .section-head h2 { font-size: 10px; color: var(--muted); letter-spacing: 0.22em; }

.grid-extras { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-extras .card { gap: 6px; }
.grid-extras .card-img { border-radius: 12px; }
.grid-extras .card-meta { padding: 0 2px; font-size: 11px; }
.grid-extras .card-name { font-weight: 400; }

@media (min-width: 900px) {
  .grid-extras { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
}


/* ---------- real frames ---------- */
.frame {
  position: relative;
  display: block;
  background: #ffffff;
  border: var(--fw, 4px) solid #141414;
  box-shadow: 0 12px 18px -8px rgba(0, 0, 0, 0.38), 0 2px 4px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* faint glass shine */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.frame img { display: block; width: 100%; height: auto; }
.frame .card-img { border: 0; border-radius: 0; }
.grid-extras .frame { --fw: 3px; }

/* gallery wall (home) */
.wall {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 10 / 9;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 0%, #f5f2eb 0%, #e5e0d6 100%);
  overflow: hidden;
}

.wall .frame { --fw: clamp(2px, 0.9vw, 5px); }

.wall-piece {
  position: absolute;
  display: block;
  transform-origin: 50% 0;
  animation: sway 6s ease-in-out infinite;
}

/* the nail it hangs from */
.wall-piece::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #8d877b;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

@keyframes sway {
  0%, 100% { transform: rotate(-0.7deg); }
  50% { transform: rotate(0.7deg); }
}

/* product page: frame on a wall */
.gallery-frame {
  display: flex;
  justify-content: center;
  padding: 36px 0 64px;
  background: radial-gradient(ellipse at 50% 0%, #f5f2eb 0%, #e2ddd3 100%);
}

.gallery-frame .frame { width: min(72%, 380px); --fw: 8px; }

/* see it on your wall */
.room-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 15px;
  font-weight: 500;
}

.room { margin-top: 12px; }
.room-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.room svg { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.room-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }


/* ---------- clean product cards ---------- */
.card-meta { font-size: 13px; }
.card-name { text-transform: uppercase; letter-spacing: 0.04em; }

.card-media { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--stone); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.slides::-webkit-scrollbar { display: none; }
.slides .card-img { flex: 0 0 100%; scroll-snap-align: start; border: 0; border-radius: 0; }

.dots { position: absolute; left: 0; right: 0; bottom: 9px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, 0.25); }
.card-media:not([data-i]) .dots i:nth-child(1),
.card-media[data-i="0"] .dots i:nth-child(1),
.card-media[data-i="1"] .dots i:nth-child(2) { background: rgba(0, 0, 0, 0.75); }

/* mouse: back view fades in on hover; touch: swipe the card */
@media (hover: hover) {
  .dots { display: none; }
  .slides { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
  .slides .card-img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.35s ease; }
  .slides .card-img + .card-img { opacity: 0; }
  .card:hover .slides .card-img + .card-img { opacity: 1; }
}

.tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font-family: var(--wide); font-size: 8px; letter-spacing: 0.16em; line-height: 1.4; }
.tag-out { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card.is-out .card-media { opacity: 0.55; }

.add-btn:disabled { background: #d4d4d2; color: #5f5f5f; cursor: not-allowed; }


/* ---------- tabs: small, flat, underlined ---------- */
.pills { gap: 22px; padding-bottom: 0; border-bottom: 1px solid var(--line); }
.pill, .pill-alt {
  min-height: 34px;
  padding: 0 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  background: none;
  font-family: var(--wide);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill:hover, .pill-alt:hover, .pill.is-active { background: none; color: var(--ink); border-color: transparent; border-bottom-color: var(--ink); }

/* top nav: smaller and lighter */
.nav a:not(.nav-logo) { min-height: 26px; padding: 0 10px; background: transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16); font-size: 8px; }
.nav a:not(.nav-logo):hover, .nav a:not(.nav-logo):active { background: var(--ink); color: var(--paper); box-shadow: none; }
.nav a[href="cart.html"] { background: var(--ink); color: var(--paper); box-shadow: none; }


/* ---------- fancier product page ---------- */
.back-link { min-height: 36px; gap: 8px; font-family: var(--wide); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.back-link svg { width: 16px; height: 11px; }
.back-link:hover { color: var(--ink); }

.product-title-row { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
.product-title { font-family: var(--wide); font-weight: 400; font-size: clamp(17px, 4.6vw, 26px); letter-spacing: 0.08em; line-height: 1.3; text-transform: uppercase; }
.badge { padding: 0; background: none; font-family: var(--wide); font-size: 9px; letter-spacing: 0.26em; color: var(--muted); }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: 22px; font-weight: 500; }
.pdp-save { margin-left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-family: var(--wide); font-size: 8px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; }
.product-desc { font-size: 15px; line-height: 1.7; }

.gallery .counter { display: none; }
.thumbs { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; gap: 8px; }
.thumbs button { width: 46px; height: 58px; padding: 0; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 8px; overflow: hidden; background: var(--paper); opacity: 0.7; }
.thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.panel { margin-top: 8px; padding: 22px 0 0; gap: 24px; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.option-head h2 { font-family: var(--wide); font-weight: 400; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; }
.option-head span { font-size: 13px; }
.size { height: 46px; border-radius: 6px; font-size: 14px; }

.accs { border-bottom: 1px solid var(--line); }
.acc { border-top: 1px solid var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; cursor: pointer; list-style: none; font-family: var(--wide); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-family: var(--text); font-size: 20px; letter-spacing: 0; }
.acc[open] summary::after { content: "\2212"; }
.acc div { padding: 0 0 18px; font-size: 14.5px; line-height: 1.65; color: #444444; }
.acc p { margin: 0 0 6px; }
.acc a { text-decoration: underline; text-underline-offset: 3px; }

.buy-bar { background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.add-btn { border-radius: 999px; }

.pdp-more { margin-top: 56px; }
.pdp-more h2 { margin: 0 0 18px; font-family: var(--wide); font-weight: 400; font-size: 11px; letter-spacing: 0.24em; }
.more-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: 0 var(--pad); margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 6px; }
.more-row::-webkit-scrollbar { display: none; }
.more-row .card { flex: 0 0 44%; scroll-snap-align: start; }
@media (min-width: 900px) {
  .more-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; overflow: visible; margin: 0; padding: 0; }
  .more-row .card { flex: none; }
}


/* ---------- product page: photo first and fully visible, smaller controls ---------- */
@media (max-width: 899px) {
  .product-layout { display: flex; flex-direction: column; }
  .gallery { order: 1; margin-top: 2px; }
  .product-intro { order: 2; padding-top: 22px; }
  .panel { order: 3; }
  .back-link { display: none; } /* the SHOP button in the top menu does this on phones */
}

@media (min-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 560px) minmax(0, 440px); justify-content: center; column-gap: 72px; }
  .gallery { position: sticky; top: 16px; align-self: start; }
}

.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 50px; height: 36px; padding: 0 14px; border: 1px solid #cfcfcd; border-radius: 4px; font-family: var(--wide); font-size: 10px; font-weight: 400; letter-spacing: 0.1em; }
.size[aria-pressed="true"] { border-color: var(--ink); }

.swatches { gap: 8px; }
.swatch { padding: 2px; border-radius: 12px; }
.swatch span { width: 40px; height: 40px; border-radius: 9px; }

.acc summary { min-height: 46px; }
.option-head h2 { font-size: 9px; }


/* ---------- buy row: not fixed, sits in the page right under the product ---------- */
.buy-bar .price { display: none; } /* the price is already shown under the name */

@media (max-width: 899px) {
  .product { padding-bottom: 32px; }
  .product-layout { gap: 22px; }
  .product-intro { padding: 0; }
  .panel { display: contents; }
  .panel > * { order: 3; }
  .panel > .accs { order: 5; }
  .buy-bar { order: 4; position: static; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
