/* Horizon-style storefront chrome for the Nearby demo PDP.
 * Original markup/CSS that mirrors the layout of a modern Shopify theme. */
:root {
  --ink: #161616;
  --muted: #6b7280;
  --line: #e6e6e6;
  --bg: #ffffff;
  --soft: #f6f6f6;
  --board-r: 42px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hz-wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* announcement bar */
.hz-announce {
  background: var(--soft); color: #555; text-align: center;
  font-size: 12.5px; letter-spacing: .01em; padding: 9px 16px; border-bottom: 1px solid var(--line);
}

/* header */
.hz-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hz-header__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; }
.hz-logo { display: inline-flex; align-items: center; max-width: 200px; width: 100%; justify-self: start; }
.hz-logo__img { height: 42px; width: auto; display: block; }
.hz-nav { display: flex; gap: 26px; justify-self: center; }
.hz-nav a { font-size: 14px; color: #333; }
.hz-nav a:hover { color: #000; }
.hz-utils { display: flex; align-items: center; gap: 6px; justify-self: end; color: #1d1d1d; }
.hz-cur { background: none; border: none; font-size: 13px; color: #333; display: inline-flex; align-items: center; gap: 4px; padding: 8px 8px; }
.hz-caret { font-size: 10px; color: #888; }
.hz-iconbtn { background: none; border: none; color: #1d1d1d; padding: 8px; display: inline-flex; border-radius: 8px; position: relative; }
.hz-iconbtn:hover { background: var(--soft); }
.hz-cart__count {
  position: absolute; top: 2px; right: 2px; background: #161616; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* product detail layout */
.hz-pdp { display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; padding: 48px 40px 72px; align-items: start; }

/* product media — the snowboard image fills the frame (images ship on white) */
.hz-media {
  background: #fff; border: 1px solid #efefef; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hz-media__img { width: 100%; height: auto; display: block; }

/* product info column — sticks below the header as the media scrolls past */
.hz-info { position: sticky; top: 84px; align-self: start; }
.hz-title { font-size: 30px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 12px; line-height: 1.1; }
.hz-price { font-size: 17px; color: #1d1d1d; margin-bottom: 28px; }
.hz-buybar { display: flex; gap: 12px; margin-bottom: 12px; }
.hz-qty { display: inline-flex; align-items: center; border: 1px solid #d9d9d9; border-radius: 10px; overflow: hidden; }
.hz-qty button { background: #fff; border: none; width: 42px; height: 50px; font-size: 18px; color: #444; }
.hz-qty button:hover { background: var(--soft); }
.hz-qty__n { min-width: 36px; text-align: center; font-size: 15px; font-weight: 600; }
.hz-atc {
  flex: 1; background: #161616; color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.hz-atc:hover { background: #000; }
.hz-buynow {
  width: 100%; background: #161616; color: #fff; border: none; border-radius: 10px;
  height: 52px; font-size: 15px; font-weight: 600; margin-bottom: 22px;
}
.hz-buynow:hover { background: #000; }

/* related products */
.hz-related { padding: 28px 40px 56px; }
.hz-h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 24px; }
.hz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.hz-card__media {
  background: #fff; border: 1px solid #efefef; border-radius: 14px; overflow: hidden; margin-bottom: 14px;
}
.hz-card__media img { width: 100%; height: auto; display: block; }
.hz-card__title { font-size: 14.5px; font-weight: 500; margin: 0 0 5px; }
.hz-card__price { font-size: 13.5px; color: var(--muted); margin: 0; }

/* email signup */
.hz-email { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px 40px; border-top: 1px solid var(--line); }
.hz-email__lead h2 { margin: 0 0 6px; }
.hz-email__lead p { margin: 0; color: var(--muted); font-size: 14px; }
.hz-email__form { display: flex; align-items: center; border: 1px solid #d9d9d9; border-radius: 999px; padding: 5px 5px 5px 22px; }
.hz-email__form input { flex: 1; border: none; outline: none; font-size: 14.5px; background: none; padding: 12px 0; }
.hz-email__form button { background: #161616; color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* footer */
.hz-footer { border-top: 1px solid var(--line); padding: 26px 0; }
.hz-footer__row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* cart drawer (unchanged behaviour from the prior demo) */
.dz-cart-backdrop { position: fixed; inset: 0; background: rgba(20,20,20,.36); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.dz-cart-backdrop.is-open { opacity: 1; pointer-events: auto; }
.dz-cart {
  position: fixed; top: 0; right: 0; height: 100vh; width: 380px; max-width: 90vw; background: #fff;
  box-shadow: -24px 0 60px -30px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 41; padding: 22px 22px 28px; display: flex; flex-direction: column;
}
.dz-cart.is-open { transform: translateX(0); }
.dz-cart__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dz-cart__head strong { font-size: 18px; font-weight: 700; }
.dz-cart__close { border: none; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.dz-cart__item { display: flex; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dz-cart__thumb { width: 60px; height: 74px; border-radius: 9px; background: #f3f3f3 url("assets/snowboard-1.webp") center/cover no-repeat; flex: 0 0 auto; }
.dz-cart__meta b { display: block; font-size: 15px; }
.dz-cart__meta span { font-size: 13px; color: var(--muted); }
.dz-cart__remove { display: inline-block; margin-top: 7px; background: none; border: none; padding: 0; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.dz-cart__remove:hover { color: var(--ink); }
.dz-cart__empty { padding: 44px 4px; text-align: center; color: var(--muted); font-size: 14px; }
.dz-cart__fulfil { display: none; flex-direction: column; gap: 3px; background: #f3faf5; border: 1px solid #d8efe1; border-radius: 12px; padding: 13px 15px; margin: 18px 0; }
.dz-cart__fulfil strong { font-size: 14px; }
.dz-cart__fulfil span { font-size: 12.5px; color: var(--muted); }
.dz-cart__row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-top: auto; padding-top: 18px; }
.dz-cart__checkout { margin-top: 14px; padding: 15px; border: none; border-radius: 12px; background: #161616; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.dz-cart__note { font-size: 11.5px; color: var(--muted); text-align: center; margin: 10px 0 0; }

@media (max-width: 900px) {
  .hz-pdp { grid-template-columns: 1fr; gap: 32px; }
  .hz-grid { grid-template-columns: repeat(2, 1fr); }
  .hz-email { grid-template-columns: 1fr; gap: 20px; }
  .hz-nav { display: none; }
}

/* ── Live "Customise" settings panel ── */
#ds-launch {
  position: fixed; left: 20px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: #161616; color: #fff; border: none; border-radius: 999px;
  padding: 11px 16px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); cursor: pointer;
}
#ds-launch:hover { background: #000; }
#ds-scrim {
  position: fixed; inset: 0; background: rgba(20,20,20,.30);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 51;
}
#ds-scrim.is-open { opacity: 1; pointer-events: auto; }
#ds-panel {
  position: fixed; top: 0; left: 0; height: 100vh; width: 340px; max-width: 90vw;
  background: #fff; box-shadow: 24px 0 60px -30px rgba(0,0,0,.4);
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 52; padding: 22px 22px 28px; overflow-y: auto; display: flex; flex-direction: column;
}
#ds-panel.is-open { transform: translateX(0); }
.ds-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ds-head strong { font-size: 17px; font-weight: 700; }
.ds-head #ds-close { border: none; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.ds-intro { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.ds-group { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.ds-group h4 { margin: 0 0 12px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #8a8a8a; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.ds-row__label { font-size: 13.5px; color: #2a2a2a; }
.ds-row select, .ds-row input[type="text"] {
  flex: 0 0 150px; height: 34px; border: 1px solid #d9d9d9; border-radius: 8px;
  padding: 0 10px; font: inherit; font-size: 13px; background: #fff; color: #1a1a1a;
}
.ds-row input[type="color"] {
  flex: 0 0 40px; width: 40px; height: 30px; padding: 0; border: 1px solid #d9d9d9;
  border-radius: 8px; background: none; cursor: pointer;
}
.ds-row input[type="range"] { flex: 0 0 150px; accent-color: #161616; }
/* toggle */
.ds-toggle { appearance: none; -webkit-appearance: none; position: relative; width: 42px; height: 24px; border-radius: 14px; background: #d6d6d6; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.ds-toggle:checked { background: var(--green, #0f9d58); }
.ds-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.ds-toggle:checked::after { left: 21px; }
#ds-reset {
  margin-top: 18px; padding: 12px; border: 1px solid #d9d9d9; border-radius: 10px;
  background: #fff; font-size: 13.5px; font-weight: 600; color: #2a2a2a; cursor: pointer;
}
#ds-reset:hover { background: var(--soft, #f6f6f6); }
