/* ============================================================
   Product detail modal — shared by index.html and products.html
   ============================================================ */

.pdp-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pdp-overlay.open { display: flex; }
.pdp-overlay.shown { opacity: 1; }

.pdp-panel {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 1000px;
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  transform: translateY(12px);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
  overflow: hidden;
}
.pdp-overlay.shown .pdp-panel { transform: translateY(0); }

.pdp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--mist);
  background: var(--white);
  color: var(--graphite);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.pdp-close:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.pdp-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "gallery info"
    "specs   info";
  /* Gallery row hugs its content; the specs row absorbs whatever height the
     info column adds. Without this both rows stretch and leave a gap under
     the thumbnails. */
  grid-template-rows: auto 1fr;
  gap: 0;
}
.pdp-gallery   { grid-area: gallery; }
.pdp-specs-col { grid-area: specs; }
.pdp-info      { grid-area: info; }

/* Specs continue the left panel below the photo — this is the dead space
   the gallery used to leave behind, and it halves the right column. */
.pdp-specs-col {
  background: var(--paper);
  border-right: 1px solid var(--mist);
  padding: 0 32px 32px;
}

/* ── Gallery ─────────────────────────────────────────────── */
.pdp-gallery {
  padding: 32px;
  background: var(--paper);
  border-right: 1px solid var(--mist);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.pdp-stage {
  aspect-ratio: 4/3;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--white) 0%, var(--mist) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.pdp-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-stage svg { width: 38%; height: 38%; color: var(--graphite); }

.pdp-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.pdp-thumb {
  width: 62px;
  height: 62px;
  border-radius: 6px;
  border: 1px solid var(--mist);
  background: var(--white);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb.active { border-color: var(--promise); border-width: 2px; }

.pdp-photo-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--grey);
  font-style: italic;
  line-height: 1.5;
}

/* ── Details ─────────────────────────────────────────────── */
.pdp-info { padding: 40px 36px 36px; }

.pdp-cat {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 10px;
}

.pdp-name {
  font-family: 'Fraunces', serif;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 14px;
}

.pdp-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--graphite);
  margin-bottom: 22px;
}

.pdp-specs { border-top: 1px solid var(--mist); }
.pdp-spec {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 13px;
}
.pdp-spec-key {
  color: var(--grey);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
}
.pdp-spec-val { color: var(--ink); line-height: 1.55; }

/* Nested breakdown inside a spec row (lead time stages) */
.pdp-spec-breakdown { display: flex; flex-direction: column; gap: 5px; }
.pdp-spec-stage {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.pdp-spec-stage span:first-child { color: var(--grey); font-size: 12.5px; }
.pdp-spec-stage span:last-child { color: var(--ink); white-space: nowrap; }
.pdp-spec-stage.total {
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid var(--mist);
}
.pdp-spec-stage.total span:first-child { color: var(--ink); font-weight: 500; }
.pdp-spec-stage.total span:last-child { font-weight: 500; }

/* ── Tier pricing ────────────────────────────────────────── */
.pdp-tier-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 12px;
}

.pdp-tiers { border: 1px solid var(--mist); border-radius: 8px; overflow: hidden; }

.pdp-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mist);
}
.pdp-tier:last-child { border-bottom: none; }
.pdp-tier.best { background: var(--promise-light); }

.pdp-tier-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 3px;
}
.pdp-tier.best .pdp-tier-label { color: var(--promise); font-weight: 500; }
.pdp-tier-qty { font-size: 14px; color: var(--ink); }
.pdp-tier-save {
  font-size: 11.5px;
  color: var(--promise);
  margin-top: 4px;
}

.pdp-tier-price {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--black);
  white-space: nowrap;
  text-align: right;
}
.pdp-tier-unit { display: block; font-family: 'Geist', sans-serif; font-size: 11px; color: var(--grey); }

.pdp-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.6;
}

/* ── Optional add-ons (custom logo printing) ─────────────── */
.pdp-addons { margin-top: 26px; }
.pdp-addons[hidden] { display: none; }
.pdp-addons .pdp-tier-head { margin-bottom: 12px; }

.pdp-addon-rows {
  border: 1px dashed var(--silver);
  border-radius: 8px;
  overflow: hidden;
}
.pdp-addon {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px dashed var(--silver);
}
.pdp-addon:last-child { border-bottom: none; }
.pdp-addon-label { font-size: 13.5px; color: var(--ink); }
.pdp-addon-detail { font-size: 11px; color: var(--grey); margin-top: 2px; }
.pdp-addon-price {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  color: var(--black);
  white-space: nowrap;
}
/* "Why this works out cheaper" — collapsed by default so it does not add
   another block of prose to an already long column. */
.pdp-addon-why {
  margin-top: 14px;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 8px;
}
.pdp-addon-why[hidden] { display: none; }
.pdp-addon-why > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--promise);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pdp-addon-why > summary::-webkit-details-marker { display: none; }
.pdp-addon-why > summary::after {
  content: '';
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--promise);
  border-bottom: 1.5px solid var(--promise);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.pdp-addon-why[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.pdp-addon-why[open] > summary { border-bottom: 1px solid var(--mist); }
.pdp-addon-why > summary:focus-visible { outline: 2px solid var(--promise); outline-offset: -2px; }
.pdp-addon-why .pdp-addon-why-lead { padding: 14px 18px 0; }
.pdp-addon-why .pdp-addon-why-body { padding: 0 18px 16px; }
.pdp-addon-why-lead {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .pdp-addon-why > summary::after { transition: none; }
}
.pdp-addon-why-body {
  font-size: 12.5px;
  color: var(--graphite);
  line-height: 1.65;
}

.pdp-cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.pdp-cta .btn { flex: 1; justify-content: center; min-width: 160px; }

/* ── Card affordance ─────────────────────────────────────── */
.prod-card[data-product],
.featured-card[data-product] { cursor: pointer; }

.pdp-view-hint {
  font-size: 12px;
  color: var(--promise);
  font-weight: 500;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pdp-view-hint svg { transition: transform 0.18s ease; }
.prod-card:hover .pdp-view-hint svg,
.featured-card:hover .pdp-view-hint svg { transform: translateX(3px); }

body.pdp-open { overflow: hidden; }

/* Badges must paint above the product image — .product-img is
   position:relative and comes later in the DOM, so without this it
   covers the top of the badge. */
.featured-card .featured-badge,
.prod-card .prod-badge { z-index: 2; }

/* ── Coming soon ─────────────────────────────────────────── */
.prod-badge.soon,
.featured-badge.soon {
  background: var(--graphite);
  color: var(--white);
}

.prod-card.is-soon .prod-icon,
.featured-card.is-soon .product-img {
  opacity: 0.5;
  filter: grayscale(1);
}

.prod-card.is-soon .prod-name,
.featured-card.is-soon .product-name { color: var(--graphite); }

.price.price-soon {
  font-size: 17px;
  color: var(--grey);
  letter-spacing: -0.005em;
}

.pdp-soon {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-left: 3px solid var(--graphite);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--graphite);
}
/* `display: flex` above outranks the UA's `[hidden] { display: none }`,
   so hidden has to be restated at higher specificity or the notice shows
   on every product. */
.pdp-soon[hidden] { display: none; }
.pdp-soon strong { display: block; color: var(--black); margin-bottom: 3px; }
.pdp-soon svg { flex-shrink: 0; margin-top: 2px; color: var(--graphite); }

/* Two-up featured grid on the home page (extra specificity so it wins
   against the page's own .featured-grid rules, which load after this file) */
.catalog .featured-grid--duo {
  grid-template-columns: 1fr 1fr;
  max-width: 940px;
  gap: 24px;
}
@media (max-width: 760px) {
  .catalog .featured-grid--duo { grid-template-columns: 1fr; }
}

/* Four-step "How it works" grid (extra specificity so it wins against the
   page's own .values-grid rules, which load after this file) */
.values .values-grid--four {
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
@media (max-width: 1000px) {
  .values .values-grid--four { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 620px) {
  .values .values-grid--four { grid-template-columns: 1fr; gap: 36px; }
}
.values-grid--four .value-title { font-size: 23px; }

/* Payment terms panel */
.terms-panel {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 10px;
  padding: 40px 44px;
}
.terms-panel-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 18px;
}
.terms-panel-lead {
  font-size: 14px;
  line-height: 1.7;
  color: var(--graphite);
}
.terms-panel-lead + .terms-panel-lead { margin-top: 14px; }
.terms-panel-lead strong { color: var(--black); font-weight: 500; }

.terms-panel-side { display: flex; flex-direction: column; gap: 26px; }
.terms-block-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 12px;
}
.terms-list { list-style: none; margin: 0; padding: 0; }
.terms-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 9px;
}
.terms-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--promise);
}

@media (max-width: 860px) {
  .terms-panel {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px 26px;
  }
  .terms-panel-side { flex-direction: row; flex-wrap: wrap; gap: 30px; }
  .terms-panel-side .terms-block { flex: 1; min-width: 190px; }
}

/* Privacy reassurance directly under the submit button — the moment a
   buyer is deciding whether to hand over their details. */
.form-privacy {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--mist);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--grey);
}

/* "What happens after you pay" — the timeline that answers prepayment
   anxiety. Concrete dates beat reassurance. */
.after-pay {
  max-width: 940px;
  margin: 22px 0 0;
  padding: 28px 32px 26px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 10px;
}
.after-pay-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 20px;
}
.after-pay-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}
.after-pay-steps li {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 14px;
  border-top: 2px solid var(--promise-mid);
}
.after-pay-when {
  font-size: 12px;
  font-weight: 500;
  color: var(--promise);
  letter-spacing: 0.01em;
}
.after-pay-what {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--graphite);
}
.after-pay-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--mist);
  font-size: 12.5px;
  color: var(--grey);
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .after-pay-steps { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
}
@media (max-width: 560px) {
  .after-pay { padding: 24px 22px; }
  .after-pay-steps { grid-template-columns: 1fr; gap: 18px; }
}

/* "Also coming soon" strip under the featured products */
.soon-strip {
  max-width: 940px;
  margin: 36px 0 0;
  padding: 22px 26px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: var(--white);
}
.soon-strip-head {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 14px;
}
.soon-strip-items { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-strip-items span {
  font-size: 13px;
  color: var(--graphite);
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 100px;
  padding: 5px 13px;
}
.soon-strip-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .pdp-overlay { padding: 0; }
  .pdp-panel { border-radius: 0; min-height: 100%; max-width: none; }
  .pdp-body {
    grid-template-columns: 1fr;
    grid-template-areas: "gallery" "info" "specs";
  }
  .pdp-gallery { border-right: none; border-bottom: 1px solid var(--mist); padding: 24px; }
  .pdp-specs-col {
    border-right: none;
    border-top: 1px solid var(--mist);
    padding: 24px;
    background: var(--white);
  }
  .pdp-info { padding: 28px 24px 40px; }
  .pdp-name { font-size: 23px; }
  .pdp-spec { grid-template-columns: 96px 1fr; gap: 10px; }
  .pdp-cta .btn { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-overlay, .pdp-panel, .pdp-close, .pdp-view-hint svg { transition: none; }
  .pdp-panel { transform: none; }
}
