/* Store layer: shared shell, cards, cart drawer, shop / product / checkout pages.
   Builds on the tokens in style.css. */

:root { --gutter: clamp(16px, 5vw, 80px); --radius: 4px; }
html.locked, html.locked body { overflow: hidden; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #6b8cff; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 100px; cursor: pointer;
  padding: 15px 28px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.btn:hover { background: #333; border-color: #333; }
.btn:disabled { opacity: .5; cursor: default; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: var(--light); color: var(--dark); border-color: var(--light); }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn--block { width: 100%; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.link--light { color: #a8a8a8; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.link--light:hover { color: #fff; }

/* Nav ------------------------------------------------------------- */
/* Frosted bar on every page: light over light sections, dark over dark ones (toggled by store.js). */
.nav {
  mix-blend-mode: normal; color: var(--ink);
  background: rgba(238, 238, 238, .78); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line); padding-top: 18px; padding-bottom: 18px;
  transition: background-color .4s, color .4s, border-color .4s;
}
.nav.nav--dark { color: var(--light); background: rgba(5, 5, 5, .62); border-bottom-color: rgba(255, 255, 255, .08); }
/* Over the homepage scroll scenes: no bar at all, just text (a faint halo keeps it legible over the steel). */
.nav.nav--clear { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav--clear .nav__links a, .nav--clear .nav__shop { opacity: 1; }
.nav--clear:not(.nav--dark) { text-shadow: 0 0 2px #eee, 0 0 5px #eee, 0 0 10px #eee, 0 0 18px rgba(238, 238, 238, .9); }
.nav--clear.nav--dark { text-shadow: 0 0 12px rgba(0, 0, 0, .7); }
.nav__links a { position: relative; font-weight: 500; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.nav__links a.on { opacity: 1; }
.nav__links a.on::after { transform: scaleX(1); }
.nav__cart {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: transparent;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 100px; padding: 9px 12px 9px 18px;
}
.nav__count { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 10px; letter-spacing: 0; border: 1px solid currentColor; }
.nav__right { position: relative; display: flex; align-items: center; gap: 28px; }
.nav .nav__links { gap: 28px; }
/* Over the homepage scenes (desktop): the section links stack vertically under Shop / Bag, clear of the watch. */
@media (min-width: 801px) and (min-height: 601px) {
  .nav--clear .nav__links { position: absolute; top: calc(100% + 28px); right: 0; flex-direction: column; align-items: flex-end; gap: 14px; }
  .nav--clear .nav__links a::after { left: auto; right: calc(100% + 12px); top: 50%; bottom: auto; width: 22px; transform-origin: right; }
}
.nav__shop, .nav__menu { font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.nav__shop { opacity: .85; transition: opacity .3s; }
.nav__shop:hover, .nav__shop[aria-current] { opacity: 1; }
.nav__menu { display: none; background: none; border: 0; padding: 0; cursor: pointer; }

/* Phone menu */
.menu { position: fixed; inset: 0; z-index: 150; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; padding: 18px clamp(16px, 4vw, 48px) 40px; }
.menu__head { display: flex; justify-content: space-between; align-items: center; }
.menu__links { display: flex; flex-direction: column; margin-top: 8vh; }
.menu__links a { font-family: var(--display); font-weight: 200; font-size: clamp(30px, 9vw, 44px); padding: 12px 0; border-bottom: 1px solid var(--line); }
.menu__links a:last-child { font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; border: 0; margin-top: 28px; }
.menu__links a.on { padding-left: 14px; border-left: 2px solid var(--ink); }
.nav__count.on { color: #fff; background: var(--ink); border-color: var(--ink); }
.nav--dark .nav__count.on { color: #000; background: #fff; border-color: #fff; }

/* Home tweaks ---------------------------------------------------- */
/* The watch scales with viewport height, so size the letters to fit the gap either side of it. */
.hero__title { font-size: clamp(56px, min(9.6vw, (45vw - 31vh) / 2.4), 190px); margin: 0; }
.hero__cta { pointer-events: auto; margin-top: 10px; }
.hero__vertical { letter-spacing: .12em; }

/* Section heads --------------------------------------------------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2, .page-head h1, .service h2 { font-family: var(--display); font-weight: 200; font-size: clamp(32px, 4.2vw, 64px); line-height: 1.05; margin-top: 14px; letter-spacing: -.01em; }

/* Chips ----------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 100px; cursor: pointer;
  padding: 10px 18px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: all .25s;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Product grid & cards -------------------------------------------- */
.collection { padding: clamp(80px, 14vh, 150px) var(--gutter) clamp(60px, 10vh, 110px); background: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.collection__more { text-align: center; margin-top: clamp(40px, 6vw, 64px); }
.card { position: relative; display: flex; flex-direction: column; }
.card__img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #e9e9e9; border-radius: var(--radius); }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__img img { transform: scale(1.045); }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; background: rgba(255,255,255,.85); backdrop-filter: blur(4px); border-radius: 100px; padding: 6px 12px; font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.card__body { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 2px 0; }
.card__body small { font-size: 10px; }
.card h3 { font-family: var(--display); font-weight: 300; font-size: 17px; margin-top: 6px; letter-spacing: .01em; }
.card__price { font-size: 14px; white-space: nowrap; padding-top: 16px; }
.card__add {
  margin-top: 14px; align-self: flex-start; background: none; border: 0; padding: 0 0 3px; cursor: pointer;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid currentColor;
  opacity: .55; transition: opacity .25s;
}
.card__add:hover, .card:hover .card__add { opacity: 1; }

/* Featured (reuses .specs) ---------------------------------------- */
.featured__copy { font-size: 14px; line-height: 1.75; color: #a8a8a8; max-width: 440px; margin: -20px 0 32px; }
.featured__buy { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 36px; }
.featured__price { font-family: var(--display); font-weight: 300; font-size: 22px; }

/* Service --------------------------------------------------------- */
.service { padding: clamp(80px, 14vh, 150px) var(--gutter); background: var(--bg); }
.service h2 { margin-bottom: clamp(36px, 5vw, 64px); }
.service__grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.service__grid li { border-top: 1px solid var(--line); padding: 22px 0 26px; }
.service__grid b { display: block; font-family: var(--display); font-weight: 300; font-size: 16px; margin-bottom: 10px; }
.service__grid span { font-size: 14px; line-height: 1.7; color: var(--muted); }

/* Footer ---------------------------------------------------------- */
.site-footer { overflow: hidden; background: var(--dark); color: var(--light); padding: clamp(56px, 9vh, 96px) var(--gutter) 28px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 48px; }
.site-footer__grid > div { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__grid small { margin-bottom: 6px; color: #8a8a8a; }
.site-footer__grid a { color: #c8c8c8; transition: color .2s; }
.site-footer__grid a:hover { color: #fff; }
.site-footer__grid span { color: #8a8a8a; }
.site-footer__grid p { color: #8a8a8a; line-height: 1.7; max-width: 300px; }
.site-footer__logo { font-family: var(--display); font-weight: 300; letter-spacing: .4em; font-size: 18px; margin-bottom: 4px; }
.site-footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a; }
.site-footer__base a:hover { color: #fff; }

/* Drawer ---------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .4s; }
.drawer.open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-family: var(--display); font-weight: 300; font-size: 18px; }
.drawer__x { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; width: 36px; height: 36px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; overscroll-behavior: contain; }
.drawer__foot { border-top: 1px solid var(--line); padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.drawer__row { display: flex; justify-content: space-between; font-size: 14px; }
.drawer__row strong { font-weight: 500; }
.drawer__row--muted { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.drawer__note { font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }
.drawer__empty { text-align: center; padding: 80px 0; display: flex; flex-direction: column; align-items: center; gap: 22px; color: var(--muted); }

.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-item:last-child { border-bottom: 0; }
.line-item__img img { width: 76px; height: 95px; object-fit: cover; border-radius: var(--radius); display: block; background: #e6e6e6; }
.line-item__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-item__name { font-family: var(--display); font-weight: 300; font-size: 14px; }
.line-item__meta { font-size: 12px; color: var(--muted); }
.line-item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 100px; margin-top: 8px; align-self: flex-start; }
.qty button { width: 32px; height: 30px; background: none; border: 0; cursor: pointer; font-size: 15px; }
.qty button:disabled { opacity: .3; cursor: default; }
.qty span { min-width: 22px; text-align: center; font-size: 13px; }

/* Toast ----------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 100px; font-size: 13px; max-width: calc(100% - 32px);
  transition: opacity .3s, transform .3s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Inner pages ----------------------------------------------------- */
.page { padding: calc(86px + clamp(24px, 6vh, 64px)) var(--gutter) clamp(72px, 12vh, 140px); min-height: 70vh; }
.page-head { margin-bottom: clamp(28px, 4vw, 48px); }
.page-head p { color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 520px; margin-top: 16px; }
.crumbs { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }

/* Shop */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(28px, 4vw, 44px); }
.toolbar__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.select { position: relative; }
.select select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 36px 10px 16px; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer;
}
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 6px; height: 6px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* Product */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.pdp__img { position: sticky; top: 100px; aspect-ratio: 4 / 5; max-height: calc(100vh - 130px); margin: 0 auto; background: #e9e9e9; border-radius: var(--radius); overflow: hidden; }
.pdp__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__info h1 { font-family: var(--display); font-weight: 200; font-size: clamp(34px, 4vw, 60px); line-height: 1.05; margin: 14px 0 12px; }
.pdp__tag { font-size: 16px; color: var(--muted); line-height: 1.6; }
.pdp__price { font-family: var(--display); font-weight: 300; font-size: 26px; margin: 28px 0 6px; }
.pdp__vat { font-size: 12px; color: var(--muted); }
.pdp__buy { display: flex; gap: 12px; margin: 28px 0 14px; flex-wrap: wrap; }
.pdp__buy .qty { margin: 0; height: 50px; }
.pdp__buy .qty button { height: 48px; width: 40px; }
.pdp__buy .btn { flex: 1; min-width: 200px; }
.pdp__perks { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 36px; }
.pdp__perks li::before { content: "—  "; }
.pdp__desc { font-size: 15px; line-height: 1.8; margin-bottom: 36px; max-width: 560px; }
.pdp__specs > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pdp__specs > div:last-child { border-bottom: 1px solid var(--line); }
.pdp__specs dt { color: var(--muted); }
.pdp__specs dd { text-align: right; }
.related { margin-top: clamp(80px, 12vh, 140px); }
.related h2 { font-family: var(--display); font-weight: 200; font-size: clamp(26px, 3vw, 40px); margin-bottom: 32px; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form h2 { grid-column: 1 / -1; font-family: var(--display); font-weight: 300; font-size: 18px; margin-top: 18px; }
.form h2:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid rgba(0,0,0,.18); border-radius: var(--radius); background: #f6f6f6;
  padding: 14px 14px; font: inherit; font-size: 15px; color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; }
.field input:user-invalid { border-color: #b3261e; }
.hp { position: absolute; left: -9999px; }
.form__error { grid-column: 1 / -1; color: #b3261e; font-size: 14px; line-height: 1.6; }
.form__submit { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.form__submit p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.summary { position: sticky; top: 100px; background: #e7e7e7; border-radius: var(--radius); padding: 24px; }
.summary h2 { font-family: var(--display); font-weight: 300; font-size: 18px; margin-bottom: 8px; }
.summary .drawer__row { padding-top: 12px; }
.summary__total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px !important; font-size: 16px !important; }
.done { max-width: 620px; margin: 0 auto; text-align: center; padding: 40px 0; }
.done h1 { font-family: var(--display); font-weight: 200; font-size: clamp(34px, 4.6vw, 64px); margin: 16px 0 20px; }
.done p { color: var(--muted); line-height: 1.75; margin-bottom: 12px; }
.done .btn { margin-top: 24px; }

/* Mobile ---------------------------------------------------------- */
@media (max-width: 900px) {
  .pdp, .checkout { grid-template-columns: 1fr; }
  .pdp__img, .summary { position: static; }
  .summary { order: -1; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .nav__links { display: none; }
  .nav__menu { display: inline; }
  .hero__scroll, .hero__vertical { display: none; }
  .anat__count { left: auto; right: 16px; transform: none; }
  .hero__title { padding-top: 16vh; }
  .hero__copy .btn { margin-top: 4px; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .card h3 { font-size: 14px; }
  .card__body { flex-direction: column; gap: 4px; }
  .card__price { padding-top: 0; font-size: 13px; }
  .card__add { opacity: 1; }
  .featured__buy { gap: 16px; }
}
.site-footer__credit b { color: var(--light); font-weight: 500; letter-spacing: .2em; }

/* Mobile polish ------------------------------------------------------ */
@media (max-width: 800px) {
  /* VAN / TOR sit either side of the bracelet: size them to the space that's left. */
  .hero__title { font-size: clamp(28px, calc((58vw - 32px) / 4.8), 110px); }
  /* iOS zooms into fields under 16px. */
  .field input, .field textarea, .field select { font-size: 16px; }
}
@media (max-width: 480px) {
  .heart__stats { gap: 14px; right: 16px; }
  .heart__stats b { font-size: 18px; }
  .heart__stats li { flex: 1; min-width: 0; }
  .heart__stats span { display: block; font-size: 9px; letter-spacing: .08em; line-height: 1.4; margin-top: 4px; }
  .site-footer__base { flex-direction: column; gap: 10px; }
}
@media (max-width: 420px) {
  .nav__shop { display: none; } /* "Shop all watches" lives in the menu */
  .nav__logo { letter-spacing: .3em; }
  .nav__right { gap: 16px; }
  .nav__cart { padding: 8px 10px 8px 14px; }
  .chip { padding: 9px 14px; }
}
/* Short landscape phones: not enough height for the stacked links, use the menu instead. */
@media (max-height: 600px) and (orientation: landscape) and (max-width: 1100px) {
  .nav__links { display: none; }
  .nav__menu { display: inline; }
  .anat__count { left: auto; right: clamp(16px, 4vw, 64px); transform: none; }
  .hero__vertical { display: none; }
  .anat__head { top: 64px; }
  .anat__head h2 { font-size: 20px; margin-top: 6px; }
  .anat__count, .anat__count span { font-size: 15px; }
  .anat__count { top: 64px; }
  .anat__count span { font-size: 26px; }
}
/* Bigger tap targets on touch screens */
@media (pointer: coarse) {
  .qty button { width: 40px; height: 38px; }
  .drawer__x { width: 44px; height: 44px; }
}

/* Exploded view on portrait phones runs upright: labels sit in a column beside their parts (main.js sets each top). */
.anat__labels.anat__labels--v { display: block; inset: 0; bottom: auto; height: 100%; padding: 0; pointer-events: none; }
.anat__labels.anat__labels--v li {
  position: absolute; left: 60%; right: 8px; display: flex; align-items: center; gap: 8px; line-height: 1.25;
  transform: translate(10px, -50%); text-align: left; white-space: normal; font-size: 11px;
}
.anat__labels.anat__labels--v li.on { transform: translate(0, -50%); }
.anat__labels.anat__labels--v li:nth-child(n)::before { flex: none; width: 16px; height: 1px; margin: 0; }
.anat__labels.anat__labels--v b { display: inline; margin: 0; }
