/* Pearl Hand International — static site styles */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2a2622;
  --muted: #6f645b;
  --gold: #94713c;
  --gold-hover: #7e5f33;
  --gold-soft: #b08a57;
  --eyebrow: #7e5f33;
  --cream: #f9f6f1;
  --blush: #f1e7de;
  --hair: #eae3da;
  --field: #d9cfc3;
  --white: #fff;
  --danger: #9b2c2c;
  --ok: #2f6b45;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 4.2vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 4px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) var(--pad); }
.section--cream { background: var(--cream); }
.section--blush { background: var(--blush); }
.center { text-align: center; }

.eyebrow {
  font: 600 0.75rem/1.2 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.h2 { font-size: clamp(1.75rem, 3vw, 2.375rem); letter-spacing: -0.005em; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 56ch; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  background: var(--gold);
  color: #fff;
  font: 500 0.8125rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 33px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn:hover { background: var(--gold-hover); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn--ghost {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--field);
}
.btn--ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hover); }
.btn--sm { padding: 12px 18px; font-size: 0.75rem; letter-spacing: 0.1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--hair);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 73px; padding-inline: var(--pad);
}
.logo {
  font-family: var(--serif); font-weight: 500; font-size: 1.4rem; letter-spacing: 0.045em;
  text-decoration: none; color: var(--ink); white-space: nowrap; justify-self: start;
}
.nav { display: flex; gap: 28px; }
.nav a, .header-actions a {
  font-size: 0.9rem; text-decoration: none; color: var(--ink); position: relative; padding: 6px 0;
}
.nav a::after, .header-actions a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav a:hover::after, .header-actions a:hover::after,
.nav a[aria-current="page"]::after, .header-actions a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; gap: 20px; justify-self: end; align-items: center; }
.cart-count {
  display: inline-block; min-width: 1.35em; padding: 0 0.35em; margin-left: 6px; border-radius: 999px;
  background: var(--gold); color: #fff; font-size: 0.72rem; font-weight: 600; line-height: 1.5; text-align: center;
}
.cart-count[data-empty="true"] { display: none; }
.menu-btn {
  display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer;
}
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; }

@media (max-width: 1100px) {
  .logo { font-size: 1.35rem; }
  .nav { gap: 22px; }
}
@media (max-width: 940px) {
  .menu-btn { display: block; order: 3; }
  .header-actions { gap: 16px; margin-left: auto; margin-right: 14px; order: 2; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 20px; border-bottom: 1px solid var(--hair);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .nav a::after { display: none; }
}
@media (max-width: 520px) {
  .logo { font-size: 1.05rem; letter-spacing: 0.02em; }
  .header-actions { gap: 12px; margin-right: 6px; }
  .header-actions a { font-size: 0.85rem; }
}
@media (max-width: 360px) { .logo { font-size: 0.92rem; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; perspective: 1100px;
  background: linear-gradient(135deg, #f0e6de 0%, #f5ede6 55%, #f8f4ee 100%);
}
.hero-inner {
  position: relative; z-index: 3; text-align: center;
  min-height: clamp(440px, 58vh, 520px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px var(--pad);
}
.hero h1 {
  font-size: clamp(2.1rem, 3.5vw, 2.75rem); letter-spacing: -0.005em; margin: 24px 0 26px; line-height: 1.1;
}
.hero .sub { font-size: 0.95rem; color: var(--muted); margin-bottom: 38px; }

.h-cluster {
  position: absolute; top: 50%; z-index: 1;
  --hw: clamp(84px, 9.6vw, 136px);
  width: calc(var(--hw) * 2.1); height: calc(var(--hw) * 3.5); margin-top: calc(var(--hw) * -1.75);
  transform-style: preserve-3d; pointer-events: none;
}
.h-cluster.left { left: clamp(-30px, 1.5vw, 24px); }
.h-cluster.right { right: clamp(-30px, 1.5vw, 24px); }
.h-slot { position: absolute; width: var(--hw); transform-style: preserve-3d; }
.h-float, .h-card { transform-style: preserve-3d; }
.h-card {
  width: 100%; aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; opacity: 0;
  box-shadow: 0 26px 46px -20px rgba(58, 38, 18, 0.55), 0 2px 6px rgba(58, 38, 18, 0.15);
  background: #cfc6bd;
}
.h-card img { width: 100%; height: 100%; object-fit: cover; }
.left .s1 { left: 0; top: 0; } .left .s2 { left: 54%; top: 25%; } .left .s3 { left: 6%; top: 51%; }
.right .s1 { right: 0; top: 3%; } .right .s2 { right: 54%; top: 28%; } .right .s3 { right: 6%; top: 52%; }
.left .s2, .right .s2 { transform: translateZ(70px); }
.left .s3, .right .s3 { transform: translateZ(-40px); }
@media (max-width: 860px) { .h-cluster { display: none; } }

/* ---------- Explore / category cards ---------- */
.explore-head { text-align: center; margin-bottom: clamp(32px, 4vw, 52px); }
.explore-head .h2 { margin-top: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: clamp(12px, 1.6vw, 24px); }
.cat { display: block; text-decoration: none; perspective: 1000px; }
.tilt-frame { position: relative; display: block; transform-style: preserve-3d; }
.media {
  position: relative; display: block; overflow: hidden; border-radius: 5px; aspect-ratio: 2 / 3; background: #d3cac1;
  box-shadow: 0 18px 34px -22px rgba(58, 38, 18, 0.55);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.3), transparent 55%);
}
.tilting .glare { opacity: 1; }
.cat-name { font-family: var(--serif); font-size: 1.25rem; margin-top: 16px; }
.cat-meta { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid .cat:nth-child(odd):last-child { grid-column: 1 / -1; }
  .cat-grid .cat:nth-child(odd):last-child .media { aspect-ratio: 3 / 2; }
}

/* ---------- 3D ring ---------- */
.ring-section { overflow: hidden; }
.ring-stage {
  position: relative; height: clamp(430px, 50vw, 590px); perspective: 1700px;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; margin-top: 8px;
}
.ring-stage.dragging { cursor: grabbing; }
.ring-tilt { position: absolute; inset: 0; transform: rotateX(-7deg); transform-style: preserve-3d; }
.ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }
.r-card {
  --rw: clamp(128px, 16vw, 208px);
  position: absolute; width: var(--rw); height: calc(var(--rw) * 1.5);
  left: calc(var(--rw) / -2); top: calc(var(--rw) * -0.75);
  padding: 0; border: 0; background: none; cursor: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.r-card .media { height: 100%; aspect-ratio: auto; }
.r-card img { pointer-events: none; }
.ring-floor {
  position: absolute; left: 50%; bottom: 4%; width: min(70%, 760px); height: 46px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(58, 38, 18, 0.22), transparent 70%); pointer-events: none;
}
.ring-caption { text-align: center; min-height: 3.2em; margin-top: 8px; }
.ring-caption .name { font-family: var(--serif); font-size: 1.25rem; }
.ring-caption .kind { font-size: 0.875rem; color: var(--muted); }
.ring-hint { text-align: center; font-size: 0.875rem; color: var(--muted); margin-top: 6px; }

/* ---------- About teaser / stack ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split .copy .h2 { margin-bottom: 20px; }
.split .copy p + p { margin-top: 14px; }
.split .copy .btn { margin-top: 30px; }
.stack { position: relative; height: clamp(420px, 44vw, 560px); perspective: 1400px; }
.s-card {
  position: absolute; width: min(44%, 250px); aspect-ratio: 2 / 3; opacity: 0;
  transform-style: preserve-3d;
}
.s-card .media { height: 100%; aspect-ratio: auto; }
.stack .a { left: 4%; top: 8%; } .stack .b { left: 30%; top: 24%; } .stack .c { left: 55%; top: 4%; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .stack { order: -1; }
}

/* ---------- Bands ---------- */
.band { text-align: center; }
.band .h2 { margin-bottom: 14px; }
.band .lead { margin: 0 auto 30px; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: linear-gradient(135deg, #f0e6de 0%, #f5ede6 55%, #f8f4ee 100%);
  padding: clamp(48px, 7vw, 88px) var(--pad); text-align: center;
}
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.1rem); margin: 18px 0 14px; }
.page-head .lead { margin-inline: auto; }

/* ---------- Shop ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: clamp(32px, 5vw, 56px); }
.chip {
  border: 1px solid var(--field); background: transparent; border-radius: 4px; padding: 11px 20px; cursor: pointer;
  font-size: 0.9375rem; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.shop-section + .shop-section { margin-top: clamp(56px, 8vw, 96px); }
.shop-section[hidden] { display: none; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--hair); padding-bottom: 14px; flex-wrap: wrap; }
.shop-head p { color: var(--muted); font-size: 0.9375rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(20px, 2.6vw, 36px) clamp(14px, 2vw, 28px); }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card { position: relative; }
.card-media {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: inherit; perspective: 1000px;
}
.card h3 { font-size: 1.125rem; margin-top: 14px; }
.card .kind { font-size: 0.8125rem; color: var(--muted); }
.card .add {
  margin-top: 10px; background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 0.875rem;
  color: var(--gold-hover); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--field);
}
.card .add:hover { text-decoration-color: var(--gold); }
.js .reveal { opacity: 0; }

/* ---------- Temporarily paused (Add to cart / Login) ---------- */
.is-paused { opacity: 0.45; cursor: not-allowed !important; pointer-events: none; text-decoration-color: transparent !important; }

/* ---------- Photo not uploaded yet: hide the placeholder block ---------- */
.media.no-img, .h-card.no-img { background: none; box-shadow: none; }
.media.no-img::after, .h-card.no-img::after { display: none; }
.h-card.no-img { visibility: hidden; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1px solid var(--field); padding-top: 18px; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 1.5rem; color: var(--gold); display: block; margin-bottom: 8px; }
.steps h3 { font-size: 1.125rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.points h3 { font-size: 1.25rem; margin-bottom: 8px; }
.points p { color: var(--muted); }
@media (max-width: 820px) { .points { grid-template-columns: 1fr; gap: 24px; } }

.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; perspective: 1200px; }
.strip .media { aspect-ratio: 2 / 3; }
@media (max-width: 820px) { .strip { grid-template-columns: repeat(3, 1fr); } .strip > :nth-child(n + 4) { display: none; } }

/* ---------- Forms ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h2 { margin-bottom: 16px; }
.contact-info .mail {
  display: inline-block; margin-top: 22px; font-family: var(--serif); font-size: 1.25rem;
  text-decoration: underline; text-decoration-color: var(--gold-soft); text-underline-offset: 6px; word-break: break-all;
}
.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.9375rem; font-weight: 500; margin-bottom: 8px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 4px;
  padding: 13px 14px; min-height: 50px; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(148, 113, 60, 0.2); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 0.875rem; margin-top: 6px; min-height: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 0.9375rem; }
.form-status.error { color: var(--danger); }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-note { font-size: 0.8125rem; color: var(--muted); }
.form-done { border: 1px solid var(--field); border-radius: 6px; padding: 32px; background: #fff; }
.form-done h3 { font-size: 1.5rem; margin-bottom: 8px; }
.form-done p { color: var(--muted); }
.section--cream .form-done { background: #fff; }

/* ---------- Cart ---------- */
.cart-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.cart-item img { width: 84px; height: 126px; object-fit: cover; border-radius: 4px; }
.cart-item h3 { font-size: 1.125rem; }
.cart-item .kind { color: var(--muted); font-size: 0.875rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: 4px; margin-top: 10px; }
.qty button { background: none; border: 0; width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; }
.qty output { min-width: 2ch; text-align: center; font-size: 0.9375rem; }
.remove { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px; }
.cart-layout { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-empty { text-align: center; padding: 40px 0; }
.cart-empty p { margin-bottom: 24px; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: clamp(22px, 3vw, 34px); }
.panel h2 { font-size: 1.5rem; margin-bottom: 6px; }
.panel .lead { margin-bottom: 22px; font-size: 0.9375rem; }

/* ---------- Modal: full-screen photo / video viewer ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 0; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: #000; }
.modal-panel {
  position: relative; background: #000; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: hidden;
  box-shadow: none; border-radius: 0;
}
@supports (height: 100dvh) { .modal-panel { height: 100dvh; max-height: 100dvh; } }
.modal [hidden] { display: none !important; }

/* the stage fills the whole screen; the photo is fitted inside it (never cropped) over a blurred copy of itself */
.modal-media { position: absolute; inset: 0; overflow: hidden; background: #000; }
.m-bg {
  position: absolute; inset: -48px; background-size: cover; background-position: center;
  filter: blur(34px) brightness(0.55) saturate(1.15); transition: background-image 0.2s;
}
.m-zoom {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; transition: transform 0.22s ease;
}
.m-zoom.no-anim { transition: none; }
.modal-image {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  cursor: zoom-in; -webkit-user-drag: none; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.modal.is-zoomed .modal-image { cursor: grab; }
.modal.is-dragging .modal-image { cursor: grabbing; }
.modal-video { width: 100%; height: 100%; object-fit: contain; background: #000; outline: none; }
.m-hint {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 3; pointer-events: none; opacity: 0; white-space: nowrap;
  font-size: 0.8125rem; color: #fff; background: rgba(0, 0, 0, 0.6); padding: 7px 14px; border-radius: 999px;
}
.m-hint.show { animation: mHint 3.6s ease 0.5s both; }
@keyframes mHint { 0% { opacity: 0; } 12%, 78% { opacity: 1; } 100% { opacity: 0; } }
.modal.is-video .m-hint { display: none; }

/* controls float above the photo; they fade away while zoomed in so nothing covers the picture */
.m-count {
  position: absolute; left: 16px; top: 20px; z-index: 3; font-size: 0.8125rem; color: #fff; background: rgba(0, 0, 0, 0.55);
  padding: 6px 12px; border-radius: 999px; letter-spacing: 0.02em; transition: opacity 0.25s;
}
.m-tools { position: absolute; right: 14px; top: 14px; z-index: 5; display: flex; gap: 8px; align-items: center; }
.m-tool, .modal-close {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 1.5rem; line-height: 1; transition: background 0.2s, opacity 0.2s;
}
.m-tool:hover:not(:disabled), .modal-close:hover { background: #fff; }
.m-tool:disabled { opacity: 0.4; cursor: default; }
.modal.is-video .m-zin, .modal.is-video .m-zout, .modal.no-media .m-zin, .modal.no-media .m-zout { display: none; }
.m-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.9); color: var(--ink); font-size: 1.9rem; line-height: 1; padding: 0 0 4px; display: grid; place-items: center;
  transition: background 0.2s, opacity 0.25s;
}
.m-nav:hover { background: #fff; }
.m-prev { left: 14px; }
.m-next { right: 14px; }
.modal.is-zoomed .m-nav, .modal.is-zoomed .m-count, .modal.is-zoomed .m-thumbs, .modal.is-zoomed .m-bottom { opacity: 0; pointer-events: none; }

/* thumbnails: a vertical strip down the left edge on large screens */
.m-thumbs {
  position: absolute; z-index: 4; left: 16px; top: 84px; bottom: 150px; width: 66px; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; padding: 2px; scrollbar-width: none; transition: opacity 0.25s;
}
.m-thumbs::-webkit-scrollbar { display: none; }
.modal.has-thumbs .m-prev { left: 96px; }
.m-thumb {
  flex: none; width: 58px; height: 87px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer;
  background: #1c1815; opacity: 0.65; transition: opacity 0.2s, border-color 0.2s;
}
.m-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-thumb:hover { opacity: 0.95; }
.m-thumb.is-active { opacity: 1; border-color: var(--gold-soft); }
.m-thumb--video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; }
.m-thumb--video span { font-size: 1.15rem; line-height: 1; }
.m-thumb--video small { font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }

/* product details: a compact overlay along the bottom */
/* large screens: a small frosted card in the lower-left corner, kept in the blurred margin beside the photo so it never dims the picture */
.m-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none; transition: opacity 0.25s;
  padding: 0 clamp(18px, 3vw, 40px) clamp(16px, 2.4vw, 30px);
}
.modal-info {
  pointer-events: auto; max-width: max(260px, min(560px, calc(50vw - 33.4vh - 64px))); color: #fff; display: flex; flex-direction: column; gap: 6px;
  background: rgba(12, 10, 8, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 16px 20px 18px; border-radius: 12px;
}
.m-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.modal-info h2 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); color: #fff; }
.modal-info .kind { color: #e7d8bf; font-size: 0.8125rem; font-weight: 600; }
.modal-info .desc { color: #f1ece4; font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.modal-actions .btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.m-more { display: none; flex: none; background: none; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 0.8125rem; cursor: pointer; }

/* touch screens zoom by tapping and pinching, so the +/- buttons (and their crowding of the hint) are not needed */
@media (pointer: coarse) { .m-zin, .m-zout { display: none; } }

/* no photo or video at all: just the details, centred on a plain page */
.modal.no-media .modal-panel { background: #fff; display: grid; place-items: center; }
.modal.no-media .modal-media, .modal.no-media .m-count { display: none; }
.modal.no-media .m-bottom { position: static; background: none; padding: 24px; pointer-events: auto; text-align: center; }
.modal.no-media .modal-info { color: var(--ink); align-items: center; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; max-width: 560px; }
.modal.no-media .modal-info h2 { color: var(--ink); }
.modal.no-media .modal-info .kind, .modal.no-media .modal-info .desc { color: var(--muted); }
.modal.no-media .m-head { justify-content: center; }
.modal.no-media .modal-actions .btn--ghost { color: var(--ink); border-color: var(--ink); }

@media (max-width: 900px) {
  /* phones / small tablets: thumbnails run along the bottom, details fold away behind a button */
  .m-thumbs { left: 0; right: 0; top: auto; bottom: 0; width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0 12px; gap: 8px; z-index: 4; }
  .m-thumb { width: 44px; height: 66px; }
  .modal.has-thumbs .m-bottom { padding-bottom: 86px; }
  .modal.has-thumbs .m-prev { left: 8px; }
  .m-prev { left: 8px; } .m-next { right: 8px; }
  .m-nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .m-more { display: inline-block; }
  .m-details { display: none; }
  .modal-info.is-open .m-details { display: block; }
  .modal-info .desc { -webkit-line-clamp: 4; }
  .m-bottom { padding-top: 44px; background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0)); }
  .modal-info { max-width: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
  .modal.no-media .m-more { display: none; }
  .modal.no-media .m-details { display: block; }
}

/* small "3 photos · ▶ video" tag on shop cards that have more than one photo or a video */
.media-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: 0.6875rem; line-height: 1; letter-spacing: 0.02em; color: #fff;
  background: rgba(20, 16, 12, 0.72); padding: 5px 9px; border-radius: 999px; pointer-events: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 120; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: 6px; font-size: 0.9375rem; display: flex; gap: 16px; align-items: center; opacity: 0; pointer-events: none;
}
.toast a { color: #fff; text-underline-offset: 4px; }
.toast.show { pointer-events: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #2a2622; color: #e9e2d9; padding: clamp(48px, 6vw, 72px) var(--pad) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .logo { color: #fff; font-size: 1.4rem; }
.site-footer p { color: #c9bfb3; font-size: 0.9375rem; margin-top: 12px; max-width: 32ch; }
.site-footer h4 { font-family: var(--sans); font-size: 0.875rem; font-weight: 600; margin-bottom: 14px; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #e9e2d9; text-decoration: none; font-size: 0.9375rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { max-width: var(--maxw); margin: 44px auto 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.8125rem; color: #b8ada0; }

/* ---------- Misc ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px var(--pad); }
.notfound h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 14px 0; }
.notfound p { margin-bottom: 28px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
  .js .reveal, .h-card, .s-card { opacity: 1 !important; }
}

/* Light product photos need a hairline edge on cream backgrounds */
.media::after, .h-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(58, 38, 18, 0.1);
}
.h-card { position: relative; }
