/* ============================================================
   ACTIVATE BEAUTY — boutique add-ons (cart + live product grid)
   ------------------------------------------------------------
   Loaded only on /shop and the product pages. Everything here is
   built on the Brand Book tokens already defined in site.css, so
   light and dark mode both follow automatically — no hardcoded
   background/text pairs.

   Numerals: prices use LINING + TABULAR figures in Jost.
   Never Cormorant, never oldstyle.
   ============================================================ */

.num,
.prod-card__now,
.prod-card__was,
.dep__price,
.cline__price,
.cline__n,
.cartd__row .num {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-family: var(--sans);
}

/* ============================================================
   1. HEADER CART BUTTON
   ============================================================ */

.cart-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  margin-left: .35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.cart-btn:hover,
.cart-btn:focus-visible { border-color: var(--gold-ink); }
.cart-btn svg { width: 19px; height: 19px; }

.cart-btn__n {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #23201B;
  font-family: var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1;
}
.cart-btn__n[hidden] { display: none; }

/* ============================================================
   2. CART DRAWER
   ============================================================ */

.cartd[hidden] { display: none; }
.cartd { position: fixed; inset: 0; z-index: 1100; }

.cartd__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 13, .55);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
@supports (backdrop-filter: blur(4px)) {
  .cartd__scrim { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}
.cartd.is-open .cartd__scrim { opacity: 1; }

.cartd__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 420px);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line-c);
  box-shadow: var(--shadow-soft);
  transform: translateX(100%);
  transition: transform .34s var(--ease);
}
.cartd.is-open .cartd__panel { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .cartd__panel, .cartd__scrim { transition: none; }
}

.cartd.is-busy .cartd__panel { opacity: .62; pointer-events: none; }

.cartd__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border-bottom: 1px solid var(--line-c);
}
.cartd__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0;
  color: var(--moss-head);
}
.cartd__close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.cartd__close:hover, .cartd__close:focus-visible { border-color: var(--gold-ink); }
.cartd__close svg { width: 18px; height: 18px; }

.cartd__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: .4rem 1.3rem;
}
.cartd__empty {
  font-family: var(--sans);
  color: var(--soft);
  padding: 2.4rem 0;
  text-align: center;
}

.cartd__foot {
  border-top: 1px solid var(--line-c);
  padding: 1.15rem 1.3rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  background: var(--card);
}
.cartd__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .35rem;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
}
.cartd__row .num { font-size: 1.12rem; }
.cartd__note {
  margin: 0 0 .95rem;
  font-family: var(--sans);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--soft);
}
.cartd__err {
  margin: .8rem 0 0;
  font-family: var(--sans);
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ox);
}
.cartd__err[hidden] { display: none; }

body.cartd-open { overflow: hidden; }

/* --- one cart line --- */

.cline {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: .9rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-c);
}
.cline:last-child { border-bottom: 0; }

.cline__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--marble);
}
.cline__media img { width: 100%; height: 100%; object-fit: cover; }

.cline__body { min-width: 0; }
.cline__title {
  margin: 0 0 .15rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--ink);
}
.cline__variant {
  margin: 0 0 .3rem;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--soft);
}
.cline__price {
  margin: 0 0 .55rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--gold-ink);
}

.cline__qty { display: flex; align-items: center; gap: .3rem; }
.cline__step {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1;
}
.cline__step:hover, .cline__step:focus-visible { border-color: var(--gold-ink); }
.cline__n {
  min-width: 2ch;
  text-align: center;
  font-size: .9rem;
  color: var(--ink);
}
.cline__remove {
  margin-left: auto;
  border: 0;
  background: transparent;
  padding: .2rem 0;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cline__remove:hover, .cline__remove:focus-visible { color: var(--ox); }

/* ============================================================
   3. LIVE PRODUCT CARD  (extends .prod-card from site.css)
   ============================================================ */

.prod-card--live { display: flex; flex-direction: column; }
/* live cards are not links, so kill the lift-on-hover that .prod-card
   applies — the button inside is the affordance, not the card. */
.prod-card--live:hover { transform: none; }

.prod-card__vlabel {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
  margin-top: .35rem;
}
.prod-card__variant {
  width: 100%;
  font-family: var(--sans);
  font-size: .9rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line-c);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
}
.prod-card__add { margin-top: .85rem; width: 100%; }
.prod-card__add[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.prod-card__tag--out {
  color: var(--soft);
  background: var(--marble);
}

.shop-status {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--soft);
  margin: 1.4rem 0 0;
}
.shop-status--err { color: var(--ox); }
.shop-status[hidden] { display: none; }

.shop-empty {
  font-family: var(--sans);
  color: var(--soft);
  padding: 2rem 0;
}

/* ============================================================
   4. DEPOSIT — highest-intent item, its own band
   ============================================================ */

[data-shop-deposit][hidden] { display: none; }

.dep {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 2.8rem);
  align-items: center;
  max-width: var(--colw, 1080px);
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line-c);
  border-left: 4px solid var(--gold);
  border-radius: 16px;
}
@media (max-width: 700px) {
  .dep { grid-template-columns: 1fr; }
}

.dep__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--marble);
}
.dep__media img { width: 100%; height: 100%; object-fit: cover; }
/* the deposit has no product photo in Shopify — show a calm tinted
   panel rather than an empty box or a stand-in image. */
.dep__media--blank {
  background: linear-gradient(150deg, var(--marble), var(--champagne));
}

/* branded monogram stand-in for any product without a photo */
.prod-ph {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: linear-gradient(150deg, var(--paper), var(--bone));
  border: 1px solid var(--line-c);
  border-radius: inherit;
}
.prod-ph__mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  letter-spacing: .06em;
  line-height: 1;
  color: var(--clay);
}
.prod-ph__name {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--soft);
}
.dep__media .prod-ph { min-height: 100%; border: 0; background: transparent; }

.dep__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin: .35rem 0 .7rem;
  color: var(--moss-head);
}
.dep__copy {
  font-family: var(--sans);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 .9rem;
  max-width: 56ch;
}
.dep__price {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-ink);
  margin: 0 0 1.1rem;
}
.dep__cta { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ============================================================
   5. MOBILE
   ============================================================ */

@media (max-width: 520px) {
  .cartd__panel { width: 100%; }
  .cline { grid-template-columns: 64px 1fr; }
  .dep { padding: 1.1rem; }
}
