/* Swami Aditya - media.css
   v1.0.0 | Claude Opus 4.8 (1M) - effort:high | 2026-06-14
   Real-photography layer: cinematic scene bands, framed figures, and a
   privacy-friendly YouTube facade. Tokens come from site.css :root.
   All motion is reduced-motion-safe (opt-in via no-preference). */

/* ---------- framed photo figure ---------- */
.media-figure{ margin:0; border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:var(--sh-3); border:1px solid rgba(233,217,174,.22);
  background:linear-gradient(155deg,#5A3A24,#241410) }
/* default aspect-ratio reserves layout space so an unclassed figure (e.g. the host-page
   category image) does not cause CLS while it loads; size modifiers below override it. */
/* height:auto (NOT 100%) so aspect-ratio governs the box and reserves space pre-load -
   with BOTH width+height:100% set, aspect-ratio is ignored and height:100% collapses to
   the natural image height on load = CLS. object-fit:cover still crops the aspect box. */
/* object-position default 50% 30% (NOT center) - the subject (a person's FACE) sits in the
   upper-middle of a portrait, so cover-crop with default center-center cuts the head off.
   Per-image focal is set inline via the $focal arg (see inc/media.php / inc/components.php). */
.media-figure img{ display:block; width:100%; height:auto; object-fit:cover; object-position:50% 30%; aspect-ratio:4/5 }
.media-figure.tall img{ aspect-ratio:4/5 }
.media-figure.portrait img{ aspect-ratio:3/4 }
.media-figure.wide img{ aspect-ratio:16/10 }
.media-figure.square img{ aspect-ratio:1/1 }
.media-figure figcaption{ font-size:var(--step--1); color:var(--ink-soft);
  padding:.7em .95em; background:var(--bg-warm); border-top:1px solid var(--line) }
.media-figure figcaption b{ color:var(--ink) }

/* ---------- full-bleed cinematic scene band ---------- */
.scene-band{ position:relative; min-height:clamp(360px,54vh,580px);
  display:flex; align-items:flex-end; overflow:hidden;
  background:#241410; margin:0 }
.scene-band .scene-img{ position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover }
.scene-band .scene-veil{ position:absolute; inset:0; background:linear-gradient(
    180deg,rgba(36,20,16,.22) 0%,rgba(36,20,16,.30) 42%,rgba(36,20,16,.72) 100%) }
.scene-band .scene-copy{ position:relative; z-index:1; color:#F4EEDF;
  padding:var(--s9) 0; max-width:60ch }
.scene-band .scene-copy .eyebrow{ color:var(--gold-soft) }
/* all heading levels light (global h1-h4 sets dark var(--night) which would
   otherwise win on specificity and go dark-on-dark over the photo veil). */
.scene-band .scene-copy h1,.scene-band .scene-copy h2,
.scene-band .scene-copy h3,.scene-band .scene-copy h4{ color:#fff; margin:.2em 0 .4em }
.scene-band .scene-copy p,.scene-band .scene-copy li{ color:#EFE7D6 }
.scene-band .scene-copy a:not(.btn){ color:var(--gold-soft) }
.scene-band .scene-copy .btn-ghost-light{ margin-top:var(--s5) }

/* ---------- image + text two-up ---------- */
.figure-split{ display:grid; grid-template-columns:1fr 1fr;
  gap:var(--s8); align-items:center }
.figure-split.tighter{ gap:var(--s6) }
@media (max-width:780px){ .figure-split{ grid-template-columns:1fr; gap:var(--s6) } }

/* page-hero figure (sits in a subpage hero, smaller and elegant) ---------- */
.page-figure{ max-width:460px; margin-left:auto }
@media (max-width:880px){ .page-figure{ max-width:520px; margin:var(--s6) auto 0 } }

/* ---------- privacy-friendly YouTube facade ---------- */
.yt-facade{ margin:0 }
.yt-facade .yt-play{ position:relative; display:block; width:100%; aspect-ratio:16/9;
  border:0; padding:0; cursor:pointer; border-radius:var(--radius-lg); overflow:hidden;
  background-size:cover; background-position:center 26%; box-shadow:var(--sh-3) }
.yt-facade .yt-veil{ position:absolute; inset:0; background:radial-gradient(
    65% 65% at 50% 50%,rgba(36,20,16,.16),rgba(36,20,16,.55)) }
.yt-facade .yt-btn{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:74px; height:74px; border-radius:50%; background:var(--gold); color:#241410;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 28px rgba(36,20,16,.5) }
.yt-facade .yt-btn svg{ width:30px; height:30px; margin-left:4px }
.yt-facade .yt-eyebrow{ position:absolute; left:18px; top:15px; z-index:1;
  font-family:var(--f-body); letter-spacing:.16em; text-transform:uppercase;
  font-size:.7rem; color:var(--gold-soft) }
.yt-facade .yt-label{ position:absolute; left:18px; right:18px; bottom:16px; z-index:1;
  color:#F4EEDF; font-family:var(--f-display); font-size:var(--step-1);
  line-height:1.2; text-align:left }
.dark .media-figure figcaption{ color:var(--warm-grey-soft,#C3B7A0); background:rgba(255,255,255,.05);
  border-top-color:rgba(233,217,174,.16) }
.yt-facade .yt-frame{ width:100%; aspect-ratio:16/9; border:0;
  border-radius:var(--radius-lg); box-shadow:var(--sh-3); display:block }

/* ---------- motion (opt-in; reduced-motion users get none) ---------- */
@media (prefers-reduced-motion:no-preference){
  .scene-band .scene-img{ transform:scale(1.07); transition:transform 9s ease-out }
  .scene-band.in .scene-img{ transform:scale(1) }              /* slow ken-burns settle */
  .media-figure img{ transition:transform 1s cubic-bezier(.16,1,.3,1) }
  .media-figure:hover img{ transform:scale(1.04) }
  .yt-facade .yt-veil,.yt-facade .yt-btn{ transition:transform .3s ease, background .3s ease }
  .yt-facade .yt-play:hover .yt-btn{ transform:translate(-50%,-50%) scale(1.08) }
  .yt-facade .yt-play:hover .yt-veil{ background:radial-gradient(
      65% 65% at 50% 50%,rgba(36,20,16,.06),rgba(36,20,16,.42)) }
}

/* ============================================================
   Slide-out mini-cart drawer (mattresscenter pattern)
   Mobile-first. Saffron palette. Sits ABOVE the consent banner
   (consent z-index:9999 -> overlay 10000, drawer 10001).
   ============================================================ */
:root{
  --sa-gold:#B8923A; --sa-ink:#2A2016; --sa-ink-soft:#5A4A36;
  --sa-bg:#FBF6EB; --sa-line:rgba(42,32,22,.14);
}
.sa-cart-locked{ overflow:hidden }

.sa-cart-overlay{ position:fixed; inset:0; z-index:10000;
  background:rgba(36,20,16,.55); opacity:0; transition:opacity .3s ease;
  -webkit-backdrop-filter:blur(1px); backdrop-filter:blur(1px) }
.sa-cart-overlay.open{ opacity:1 }

.sa-cart-drawer{ position:fixed; top:0; right:0; bottom:0; z-index:10001;
  width:100%; max-width:92vw; display:flex; flex-direction:column;
  background:var(--sa-bg); color:var(--sa-ink);
  box-shadow:-12px 0 40px rgba(36,20,16,.32);
  transform:translateX(100%); transition:transform .32s cubic-bezier(.16,1,.3,1);
  font-family:Inter,system-ui,Arial,sans-serif; will-change:transform }
.sa-cart-drawer.open{ transform:translateX(0) }

@media (min-width:560px){ .sa-cart-drawer{ width:min(400px,100%); max-width:400px } }

.sa-cart-head{ display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--sa-line) }
.sa-cart-title{ margin:0; font-family:"Cormorant Garamond",Georgia,serif;
  font-size:1.5rem; font-weight:600; color:var(--sa-ink); letter-spacing:.01em }
.sa-cart-close{ display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:999px; border:1px solid var(--sa-line);
  background:#fff; color:var(--sa-ink); cursor:pointer; flex:0 0 auto;
  transition:border-color .2s,color .2s }
.sa-cart-close:hover{ border-color:var(--sa-gold); color:var(--sa-gold) }
.sa-cart-close svg{ width:20px; height:20px }

.sa-cart-body{ flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:8px 20px 16px }

/* WooCommerce mini-cart list inside the drawer */
.sa-cart-body .woocommerce-mini-cart,
.sa-cart-body ul.cart_list{ list-style:none; margin:0; padding:0 }
/* Clean two-column line: thumb (col 1) | name + price + stepper (col 2).
   Remove (x) floats to the top-right of the content. CSS grid lays the WC
   source order (remove, thumb, name, quantity, sa-qty) into a tidy card. */
.sa-cart-body .woocommerce-mini-cart-item,
.sa-cart-body li.mini_cart_item{ position:relative;
  display:grid; grid-template-columns:60px 1fr; gap:4px 14px;
  align-items:start; padding:16px 0; border-bottom:1px solid var(--sa-line) }
.sa-cart-body .woocommerce-mini-cart-item img,
.sa-cart-body li.mini_cart_item img{ grid-column:1; grid-row:1 / span 3;
  width:60px; height:60px; object-fit:cover; object-position:50% 28%;
  border-radius:8px; flex:0 0 auto; border:1px solid var(--sa-line) }
/* Om tile that replaces the grey WC placeholder for image-less line items.
   Same 60px footprint + position as the real thumbnail; saffron on warm fill. */
.sa-cart-body .sa-mini-thumb--ph{ grid-column:1; grid-row:1 / span 3;
  width:60px; height:60px; flex:0 0 auto;
  border-radius:8px; border:1px solid var(--sa-line);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:2rem; line-height:1; color:var(--sa-gold);
  background:linear-gradient(160deg,#FBEFD2,#F3E3BC) }
.sa-cart-body .woocommerce-mini-cart-item a:not(.remove),
.sa-cart-body li.mini_cart_item a:not(.remove){ grid-column:2; grid-row:1;
  color:var(--sa-ink); text-decoration:none; font-weight:600; line-height:1.3;
  font-size:.95rem; padding-right:26px }
.sa-cart-body .woocommerce-mini-cart-item a:not(.remove):hover{ color:var(--sa-gold) }
.sa-cart-body .quantity{ grid-column:2; grid-row:2; display:block;
  color:var(--sa-ink-soft); font-size:.86rem; margin:0 }
/* Editable quantity stepper inside the drawer (minus / value / plus).
   Sits on its own row in the content column; tap targets >= 40px. */
.sa-cart-body .sa-qty{ grid-column:2; grid-row:3;
  display:inline-flex; align-items:center; margin-top:6px; justify-self:start;
  border:1px solid var(--sa-line); border-radius:999px; background:#fff;
  overflow:hidden; line-height:1; transition:opacity .2s ease }
.sa-cart-body .sa-qty--loading{ opacity:.55 }
.sa-cart-body .sa-qty-dec,
.sa-cart-body .sa-qty-inc{ display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; min-width:40px; padding:0; margin:0; border:0; cursor:pointer;
  background:transparent; color:var(--sa-ink); font-size:1.2rem; font-weight:600;
  -webkit-appearance:none; appearance:none; transition:background .2s,color .2s }
.sa-cart-body .sa-qty-dec:hover:not([disabled]),
.sa-cart-body .sa-qty-inc:hover:not([disabled]){ background:var(--sa-gold); color:#fff }
.sa-cart-body .sa-qty-dec[disabled],
.sa-cart-body .sa-qty-inc[disabled]{ opacity:.35; cursor:not-allowed }
.sa-cart-body .sa-qty__value{ min-width:36px; padding:0 6px; text-align:center;
  font-size:.95rem; font-weight:600; color:var(--sa-ink);
  font-variant-numeric:tabular-nums }
.sa-cart-body .sa-qty--single{ grid-column:2; grid-row:3;
  margin-top:4px; border-radius:999px; padding:0; justify-self:start;
  background:transparent; border:0 }
.sa-cart-body .sa-qty__single-label{ display:inline-block; padding:2px 0;
  font-size:.82rem; color:var(--sa-ink-soft); font-weight:600 }
.sa-cart-body a.remove,
.sa-cart-body a.remove_from_cart_button{ position:absolute; right:0; top:16px;
  width:24px; height:24px; line-height:22px; text-align:center; border-radius:999px;
  color:var(--sa-ink-soft)!important; background:transparent; border:1px solid var(--sa-line);
  font-size:15px; text-decoration:none; transition:color .2s,border-color .2s,background .2s }
.sa-cart-body a.remove:hover{ color:#fff!important; background:#b3402f; border-color:#b3402f }
.sa-cart-body .woocommerce-mini-cart__total,
.sa-cart-body p.total{ display:flex; justify-content:space-between; align-items:baseline;
  margin:16px 0 0; padding-top:14px; font-size:1.05rem; color:var(--sa-ink) }
.sa-cart-body .woocommerce-mini-cart__total strong,
.sa-cart-body p.total strong{ font-weight:600 }
/* subtotal amount: a deep gold that clears WCAG AA on the cream drawer bg.
   (--sa-gold #B8923A on #FBF6EB is only 2.70:1 = FAIL; #7A5F20 = 5.59:1.) */
.sa-cart-body .woocommerce-mini-cart__total .amount,
.sa-cart-body p.total .amount{ color:#7A5F20; font-weight:700 }
/* hide WC's own buttons inside the mini cart (we render our own in the foot) */
.sa-cart-body .woocommerce-mini-cart__buttons,
.sa-cart-body p.buttons{ display:none!important }
.sa-cart-body .woocommerce-mini-cart__empty-message,
.sa-cart-body p.empty,
.sa-cart-body .cart-empty{ color:var(--sa-ink-soft); padding:28px 4px; text-align:center }

.sa-cart-foot{ flex:0 0 auto; display:flex; flex-direction:column; gap:10px;
  padding:16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top:1px solid var(--sa-line); background:var(--sa-bg) }
.sa-cart-foot .btn{ width:100%; text-align:center; justify-content:center }

@media (min-width:560px){
  .sa-cart-foot{ flex-direction:row }
  .sa-cart-foot .btn{ flex:1 1 0 }
}

/* respect reduced-motion: no slide, just appear */
@media (prefers-reduced-motion:reduce){
  .sa-cart-drawer{ transition:none }
  .sa-cart-overlay{ transition:none }
}
