/* ===========================================================================
   product.css: Shopify-style product page (Dawn layout) in the
   navy and blue brand. Loads on top of site.css (tokens, buttons, order-bump modal).
   Layout: media grid left / sticky buy box + description right; on mobile the
   media grid becomes a swipe slider with a "1 / 8" counter, as on Shopify.
   =========================================================================== */

:root {
  --page-w: 1200px;
  --media-radius: 10px;
}

body.product-page { background: var(--white); }
.page-width { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 0 clamp(16px, 3.6vw, 50px); }

/* ---- Announcement bar ----------------------------------------------------- */
.announcement {
  background: var(--navy);
  color: #dbe7f8;
  font-size: 0.86rem;
  text-align: center;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}
.announcement strong { color: #fff; font-weight: 700; }
.announcement code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.86em;
  letter-spacing: 0.08em;
}

/* ---- Header (Dawn-style: logo · nav · utilities) -------------------------- */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.shop-header .page-width {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}
.shop-header .logo { display: inline-flex; align-items: center; text-decoration: none; }
.shop-header .logo img { height: 44px; width: auto; }
.shop-nav { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.shop-nav a {
  display: inline-block;
  padding: 10px 12px;
  color: #3a4458;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.shop-nav a:hover, .shop-nav a[aria-current="page"] { color: var(--navy); border-color: var(--navy); }
.header-utils { display: flex; align-items: center; gap: 14px; }
.header-utils .util-price { font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.header-utils .util-cta {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.header-utils .util-cta:hover { background: var(--navy); color: #fff; }
.menu-toggle { display: none; }
.shop-header .logo-mark { display: none; }
@media (max-width: 989px) {
  .shop-header .page-width { grid-template-columns: auto 1fr auto; gap: 12px; min-height: 64px; }
  .shop-nav { display: none; }
  .shop-header .logo img { height: 34px; }
  .header-utils .util-price { display: none; }
}
/* Phones: the horizontal wordmark (500x112) needs about 150px next to a signed-in email address
   and the offer button, which is more than a 375px screen has. It was the wordmark that lost, so
   it got clipped and the button was pushed out of reach, leaving the offer bar with no way back to
   the page that sells. The brand mark alone buys back that space; the wordmark stays everywhere
   else. The email truncates rather than wraps, and the offer button never shrinks away. */
@media (max-width: 700px) {
  .shop-header .logo-full { display: none; }
  .shop-header .logo-mark { display: block; height: 34px; width: auto; }
  .shop-header .page-width { gap: 10px; }
  .header-utils { gap: 10px; min-width: 0; }
  .header-utils [data-auth] { min-width: 0; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-utils .util-cta { flex: 0 0 auto; padding: 8px 13px; font-size: 0.84rem; }
}

/* ---- Breadcrumb ----------------------------------------------------------- */
.crumbs { font-size: 0.84rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }
.crumbs span { margin: 0 6px; opacity: 0.6; }

/* ---- Product section ------------------------------------------------------ */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  padding: 22px 0 60px;
}
@media (min-width: 990px) {
  .product { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(36px, 4.5vw, 64px); padding-top: 28px; }
}

/* Media: grid on desktop, swipe slider on mobile (same DOM) */
.product-media { position: relative; min-width: 0; }
/* desktop: masonry (CSS columns) so a tall image only extends its own column */
.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 14px;
}
.media-item { position: relative; margin: 0 0 14px; break-inside: avoid; }
.media-item:first-child { column-span: all; }
.media-item .media-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--media-radius);
  overflow: hidden;
  background: var(--tint-2);
  cursor: zoom-in;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.media-item .media-btn:hover { box-shadow: var(--shadow-md); }
.media-item img { width: 100%; height: auto; aspect-ratio: var(--item-ratio, var(--media-ratio, 4 / 3)); object-fit: contain; display: block; background: var(--tint-2); }
.media-item .zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--navy);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.media-item .media-btn:hover .zoom-hint, .media-item .media-btn:focus-visible .zoom-hint { opacity: 1; transform: none; }
.media-item .zoom-hint svg { width: 18px; height: 18px; }
.media-item .media-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.media-item:first-child .media-caption { display: none; }

/* slider controls (mobile only) */
.slider-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.slider-controls .counter { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.slider-btn:disabled { opacity: 0.35; cursor: default; }
.slider-btn svg { width: 16px; height: 16px; }

@media (max-width: 989px) {
  .product-media { margin: 0 calc(-1 * clamp(16px, 3.6vw, 50px)); }
  .media-list {
    display: flex;
    columns: auto;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .media-list::-webkit-scrollbar { display: none; }
  .media-item { flex: 0 0 100%; scroll-snap-align: center; padding: 0 clamp(16px, 3.6vw, 50px); margin: 0; }
  /* every slide shares the first image's ratio, so one tall image doesn't stretch the slider */
  .media-item img { aspect-ratio: var(--media-ratio, 1 / 1); max-height: 72vh; }
  .media-item .zoom-hint { opacity: 1; transform: none; }
  .slider-controls { display: flex; }
  .rte .swipe-hint { display: block; }
}

/* ---- Product info (right column) ----------------------------------------- */
.product-info { min-width: 0; }
@media (min-width: 990px) {
  .product-info { position: sticky; top: 92px; align-self: start; }
}
.product-vendor {
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 10px;
}
.product-title {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}
.price .price-compare { color: var(--muted); text-decoration: line-through; font-size: 1.05rem; }
.price .price-sale { font-family: "Raleway", sans-serif; font-weight: 800; font-size: 1.55rem; color: var(--navy); letter-spacing: -0.01em; }
.price .badge {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--navy);
  color: #fff;
  padding: 5px 11px;
  border-radius: 999px;
}
.price .badge.badge--save { background: var(--good); }
.tax-note { font-size: 0.82rem; color: var(--muted); margin: 0 0 20px; }
.tax-note a { color: var(--muted); }

/* rating row (Dawn shows it under the title on many stores) */
.rating-row { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--muted); margin: 0 0 12px; }
.rating-row .stars { color: #f3b21b; letter-spacing: 1px; font-size: 0.95rem; }

/* variant (format) picker, Dawn-style pills */
.variant-picker { border: 0; padding: 0; margin: 0 0 20px; }
.variant-picker legend { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; padding: 0; }
.variant-picker label { display: inline-block; margin: 0 8px 8px 0; cursor: pointer; }
.variant-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.variant-picker span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  background: #fff;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.variant-picker input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.variant-picker input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.variant-picker label:hover span { border-color: var(--navy); }
.media-item[hidden], .mm-slide[hidden], .slider-controls[hidden] { display: none; }

/* buy box */
.buy-box { display: grid; gap: 12px; margin: 0 0 12px; }
/* flat brand blue instead of site.css's gradient */
.btn--primary { background: var(--blue); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  box-shadow: none;
  font-size: 1rem;
  padding: 15px 24px;
  border-radius: 10px;
}
.btn--outline:hover { background: var(--tint); }
.buy-box .btn--primary { font-size: 1.02rem; padding: 16px 24px; border-radius: 10px; }
.buy-box .btn--primary .shop-word { font-weight: 800; letter-spacing: -0.02em; }
.more-options { text-align: center; font-size: 0.86rem; margin: 0 0 22px; }
.more-options a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.more-options a:hover { color: var(--navy); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 26px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; color: var(--good); flex: 0 0 auto; }

/* description (rich text) */
.rte { color: #2c3650; font-size: 1rem; line-height: 1.7; }
.rte p { margin: 0 0 1rem; }
.rte .swipe-hint { display: none; }
.rte .swipe-hint a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.rte .lead-line { font-weight: 600; color: var(--navy); }
.rte ul.checks { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.rte ul.checks li { position: relative; padding-left: 30px; margin: 0 0 9px; }
.rte ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.rte ul.checks li strong { color: var(--navy); }
.rte .discount-box {
  margin: 1.2rem 0 0;
  padding: 14px 16px;
  border: 1px dashed var(--blue);
  background: var(--tint);
  border-radius: 10px;
  color: var(--navy);
  font-size: 0.95rem;
}
.rte .discount-box code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--navy);
  color: #fff;
  padding: 2px 9px;
  border-radius: 6px;
  letter-spacing: 0.1em;
}

/* collapsible rows (Dawn "collapsible tab" blocks) */
.collapsibles { margin: 26px 0 0; border-top: 1px solid var(--line); }
.collapsibles details { border-bottom: 1px solid var(--line); }
.collapsibles summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.98rem;
}
.collapsibles summary::-webkit-details-marker { display: none; }
.collapsibles summary .ic { width: 20px; height: 20px; color: var(--blue); flex: 0 0 auto; }
.collapsibles summary .chev { margin-left: auto; width: 14px; height: 14px; transition: transform 0.25s; color: var(--muted); }
.collapsibles details[open] summary .chev { transform: rotate(180deg); }
.collapsibles .c-body { padding: 0 0 18px 32px; color: #2c3650; font-size: 0.95rem; }
.collapsibles .c-body p { margin: 0 0 0.7rem; }
.collapsibles .c-body ul { margin: 0 0 0.6rem; padding-left: 18px; }
.collapsibles .c-body li { margin-bottom: 5px; }
.collapsibles .c-body dt { font-weight: 700; color: var(--navy); margin-top: 10px; }
.collapsibles .c-body dd { margin: 2px 0 0; }

/* share */
.share-row { margin: 22px 0 0; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
}
.share-btn svg { width: 16px; height: 16px; }
.share-status { color: var(--good); font-size: 0.85rem; }

/* ---- Payment icons (same set as the Shopify store) ------------------------ */
.pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pay-icon { width: 38px; height: 24px; display: block; border-radius: 3px; }
.pay-row { display: flex; flex-direction: column; gap: 8px; margin: -6px 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.pay-row .pay-list { gap: 5px; }
.pay-row .pay-icon { width: 34px; height: 22px; }
.pay-list--footer { width: 100%; margin-bottom: 14px; }
.pay-list--footer .pay-icon { width: 38px; height: 24px; }

/* ---- Related products ("You may also like") ------------------------------- */
.related { padding: 54px 0 70px; border-top: 1px solid var(--line); }
.related h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 24px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--media-radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .card-media { aspect-ratio: 1 / 1; background: var(--tint-2); overflow: hidden; }
.card .card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .card-body { padding: 14px 16px 16px; }
.card .card-vendor { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.card h3 { font-size: 0.98rem; margin: 0 0 8px; line-height: 1.35; }
.card .card-price { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.card .card-price s { color: var(--muted); font-weight: 400; margin-right: 6px; }

/* ---- Footer --------------------------------------------------------------- */
.shop-footer { background: var(--navy-deep); color: #c9d6ea; padding: 48px 0 28px; }
.shop-footer .cols { display: grid; grid-template-columns: minmax(0, 560px); gap: 32px; margin-bottom: 30px; }
.shop-footer h4 { color: #fff; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 12px; }
.shop-footer p { font-size: 0.92rem; margin: 0 0 8px; }
.shop-footer ul { list-style: none; margin: 0; padding: 0; }
.shop-footer li { margin: 0 0 8px; font-size: 0.92rem; }
.shop-footer a { color: #dbe7f8; text-decoration: none; }
.shop-footer a:hover { text-decoration: underline; }
.shop-footer .brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.shop-footer .brand-line img { height: 34px; width: 34px; }
.shop-footer .brand-line span { font-family: "Raleway", sans-serif; font-weight: 800; color: #fff; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; }
.shop-footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; font-size: 0.8rem; opacity: 0.75; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .shop-footer .cols { grid-template-columns: 1fr; gap: 22px; } }

/* ---- Media modal (lightbox) ------------------------------------------------ */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.98);
  display: none;
  flex-direction: column;
}
.media-modal.open { display: flex; }
body.media-modal-open { overflow: hidden; }
.media-modal .mm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}
.media-modal .mm-title { font-family: "Raleway", sans-serif; font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.media-modal .mm-count { color: var(--muted); font-size: 0.9rem; margin-left: 14px; font-variant-numeric: tabular-nums; }
.media-modal .mm-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.media-modal .mm-close svg { width: 18px; height: 18px; }
.media-modal .mm-track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.media-modal .mm-track::-webkit-scrollbar { display: none; }
.media-modal .mm-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
}
.media-modal .mm-slide img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--media-radius);
  box-shadow: var(--shadow-md);
}
.media-modal .mm-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 18px;
}
.media-modal .mm-nav .slider-btn { width: 46px; height: 46px; }
.media-modal .mm-nav .counter { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 60px; text-align: center; }

/* ---- Sticky mobile buy bar ------------------------------------------------- */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  padding: 10px clamp(16px, 3.6vw, 50px) calc(10px + env(safe-area-inset-bottom));
  display: none;
  align-items: center;
  gap: 12px;
  transform: translateY(110%);
  transition: transform 0.3s ease;
}
.sticky-buy.show { transform: none; }
.sticky-buy .sb-price { font-family: "Raleway", sans-serif; font-weight: 800; color: var(--navy); font-size: 1.05rem; line-height: 1.1; }
.sticky-buy .sb-price s { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.sticky-buy .btn { flex: 1; padding: 13px 16px; font-size: 0.98rem; border-radius: 10px; animation: none; }
@media (max-width: 989px) { .sticky-buy { display: flex; } .product-page main { padding-bottom: 76px; } }

/* ---- Catalog (collection) page ------------------------------------------- */
.catalog-hero { padding: 40px 0 10px; }
.catalog-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 6px; }
.catalog-hero p { color: var(--muted); margin: 0; }
.catalog-grid { padding: 26px 0 70px; }
