/* ==========================================================================
   site-extras.css — additions layered on top of styles.css
   Ambient background canvas • modals (welcome / rules) • services & plans
   • Open Source badges • campaign ribbons • dynamic blog cards
   ========================================================================== */

/* ── ambient background canvas ─────────────────────────────────── */
#site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity .6s ease;
}
#site-bg .site-bg-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* soft vignette so particles never fight with text */
#site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(5, 10, 24, .55) 100%);
  pointer-events: none;
}
#site-bg[data-effect="none"] { display: none; }

/* every real layer sits above the canvas.
   NOTE: only elements that genuinely live in the document flow may be forced to
   `position: relative` here. Overlays (modals, drawers, the skip link, ...) keep
   their own fixed/absolute positioning and only get a stacking level, otherwise
   they fall back into the flow and reserve empty space at the top of the page. */
body > .announce,
body > .site-header,
body > main,
body > #main,
body > footer,
body > .site-footer,
body > #mobile-nav { position: relative; z-index: 1; }

/* Overlay layers: stacking only — never touch their positioning. */
body > .modal,
body > .drawer-overlay,
body > .cart-drawer,
body > #search-overlay,
body > #lightbox,
body > .toasts,
body > [data-toasts],
body > .to-top { z-index: 130; }

/* The skip link must stay out of the flow until it is focused. When it was
   forced to `position: relative` it rendered as an inline box above the
   announcement bar and pushed the whole site down by ~26px. */
body > .skip-link { position: absolute; z-index: 300; }
body > .skip-link:focus,
body > .skip-link:focus-visible { position: fixed; left: 0; top: 0; }

body.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #site-bg { transition: none; }
}

/* ── generic modal shell ─────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(86vh, 780px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy800) 0%, var(--navy900) 100%);
  border: 1px solid rgba(227, 179, 65, .22);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
  overflow: hidden;
  animation: modal-in .22s cubic-bezier(.2, .8, .2, 1);
}
.modal-card.modal-lg { max-width: 760px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-card { animation: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(154, 167, 201, .16);
  flex: 0 0 auto;
}
.modal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cream);
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
}
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid rgba(154, 167, 201, .16);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

/* ── rules list ────────────────────────────────────────────── */
.rules-body .rules-sec + .rules-sec {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(154, 167, 201, .14);
}
.rules-body h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold2);
}
.rules-body p { margin: 0 0 10px; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.rules-body ul { margin: 0; padding-left: 20px; }
.rules-body li {
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.65;
  margin-bottom: 6px;
}
.rules-body li::marker { color: var(--gold); }

/* rules trigger button rendered inline in prose */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--gold2);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--cream); }
.link-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.rules-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(227, 179, 65, .35);
  background: rgba(227, 179, 65, .08);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
}
.rules-cta:hover { background: rgba(227, 179, 65, .16); border-color: var(--gold); }
.rules-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── welcome gate ─────────────────────────────────────────── */
.modal-welcome { z-index: 130; }
.welcome-body { padding: 32px 28px 26px; text-align: center; }
.welcome-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--gold2);
  background: rgba(227, 179, 65, .1);
  border: 1px solid rgba(227, 179, 65, .3);
}
.welcome-mark svg { width: 26px; height: 26px; }
.welcome-body h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream);
}
.welcome-lead {
  margin: 0 auto 18px;
  max-width: 46ch;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.65;
}
.welcome-points {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  text-align: left;
  display: grid;
  gap: 10px;
}
.welcome-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.55;
}
.welcome-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(227, 179, 65, .7);
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(154, 167, 201, .22);
  background: rgba(5, 10, 24, .5);
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.55;
  cursor: pointer;
}
.consent-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--gold);
  flex: 0 0 auto;
  cursor: pointer;
}
.welcome-actions { display: grid; gap: 10px; }
.welcome-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── badges, chips, ribbons ─────────────────────────────────── */
.badge-os {
  background: rgba(74, 222, 128, .14);
  color: #86EFAC;
  border: 1px solid rgba(74, 222, 128, .4);
}
.badge-custom {
  background: rgba(94, 159, 232, .14);
  color: #9EC5F5;
  border: 1px solid rgba(94, 159, 232, .42);
}
.chip-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--muted);
  background: rgba(26, 42, 94, .5);
  border: 1px solid rgba(154, 167, 201, .2);
}
.chip-tag:hover { color: var(--cream); border-color: rgba(227, 179, 65, .5); }
.nav-badge {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy950);
  background: var(--gold);
}
.sale-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #E56458, #C2382B);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.os-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 222, 128, .3);
  background: rgba(74, 222, 128, .07);
  color: #BBF7D0;
  font-size: .89rem;
  line-height: 1.6;
}

/* ── services grid ───────────────────────────────────────── */
.services-grid,
.plans-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.service-card,
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(154, 167, 201, .18);
  background: linear-gradient(180deg, rgba(16, 28, 68, .9), rgba(10, 18, 48, .9));
}
.service-card:hover,
.plan-card:hover { border-color: rgba(227, 179, 65, .42); }
.service-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--gold2);
  background: rgba(227, 179, 65, .1);
  border: 1px solid rgba(227, 179, 65, .28);
}
.service-card h3,
.plan-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
}
.service-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.62; }
.service-price { color: var(--ink) !important; }
.service-price strong { color: var(--gold2); }
.service-card ul,
.plan-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.service-card li,
.plan-card li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: .89rem;
  line-height: 1.5;
}
.service-card li::before,
.plan-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.service-foot { margin-top: auto; padding-top: 8px; }

/* ── plans ──────────────────────────────────────────────── */
.plan-card { position: relative; }
.plan-card.featured {
  border-color: rgba(227, 179, 65, .5);
  box-shadow: var(--glow);
}
.plan-flag {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy950);
  background: var(--gold);
}
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.plan-price strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--cream);
}
.plan-period { color: var(--muted); font-size: .88rem; }
.plan-tag { margin: 0; color: var(--muted); font-size: .9rem; }
.plan-card .btn { margin-top: auto; }

/* ── pricing note callout ──────────────────────────────────── */
.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(227, 179, 65, .28);
  background: rgba(227, 179, 65, .06);
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.65;
}
.notice svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--gold2); }
.notice-danger { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .07); }
.notice-danger svg { color: #FCA5A5; }

/* ── step list (custom order flow) ────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 60px;
  border-radius: var(--radius);
  border: 1px solid rgba(154, 167, 201, .18);
  background: rgba(16, 28, 68, .6);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--navy950);
  background: var(--gold);
}
.steps strong { display: block; color: var(--cream); font-family: var(--font-display); margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* ── dynamic blog cards ───────────────────────────────────── */
.post-body h2 {
  margin: 32px 0 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
}
.post-body h3 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cream);
}
.post-body p { margin: 0 0 16px; color: var(--ink); line-height: 1.75; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; color: var(--ink); }
.post-body li { margin-bottom: 8px; line-height: 1.7; }
.post-body blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(227, 179, 65, .06);
  color: var(--cream);
  font-style: italic;
}
.post-body pre {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(154, 167, 201, .18);
  background: rgba(5, 10, 24, .8);
  overflow-x: auto;
}
.post-body pre code { color: #C8D6F5; font-size: .86rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 0 0 18px; }
.post-body figure { margin: 0 0 18px; }
.post-body figcaption { color: var(--muted); font-size: .84rem; margin-top: 6px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .86rem; margin-bottom: 18px; }

/* ── helpers ────────────────────────────────────────────── */
.muted { color: var(--muted); }
.section-head { max-width: 68ch; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.7rem; color: var(--cream); }
.section-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

@media (max-width: 560px) {
  .modal { padding: 12px; }
  .welcome-body { padding: 24px 18px 20px; }
  .welcome-body h2 { font-size: 1.28rem; }
  .modal-card { max-height: 92vh; }
}


/* ── QA fixes ─────────────────────────────────────────────────────── */
/* the shared .section-head is a flex row with a trailing link; these heads
   stack a title over an intro paragraph instead */
.section-head-block { display: block; max-width: 72ch; }
.section-head-block h2 { margin: 0 0 10px; }
.section-head-block p { margin: 0; max-width: 72ch; }

/* .badge is pinned inside a card media box by the storefront stylesheet.
   Runtime-injected badges can land on hosts with no positioning, so keep them
   inline by default and pin them only where a media box provides the context. */
.badge-os,
.badge-custom {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.6;
  white-space: nowrap;
}
.product-card-media .badge-os,
.card-media .badge-os { position: absolute; top: 12px; left: 12px; z-index: 2; }
.product-card-media .badge-custom,
.card-media .badge-custom { position: absolute; top: 12px; right: 12px; left: auto; z-index: 2; }


/* ═══════════════════ Integrated storefront fixes ═══════════════════ */
[hidden] { display: none !important; }

/* Keep overlays fixed. The former body > .modal rule made them render at the
   end of the document; these declarations intentionally win. */
body > .modal,
body > .page-loader,
body > .drawer-overlay,
body > .cart-drawer,
body > .search-overlay,
body > #search-overlay,
body > .lightbox { position: fixed; }
body > .modal { inset: 0; z-index: 1000; }
body.modal-open { overflow: hidden; }
.modal-card { max-height: min(88vh, 820px); overflow: hidden; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; }

/* Desktop dropdowns: no dead 8px gap, plus explicit click-open state. */
.main-nav { gap: 2px; }
.nav-item .nav-toggle { appearance: none; border: 0; background: transparent; font: inherit; cursor: pointer; }
.nav-item .drop {
  display: flex; visibility: hidden; opacity: 0; transform: translateY(-5px);
  pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  top: calc(100% + 7px); z-index: 400;
}
.nav-item .drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 12px; }
.nav-item:hover .drop,
.nav-item:focus-within .drop,
.nav-item.is-open .drop {
  visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto;
  transition-delay: 0s;
}
.nav-item.is-open .nav-toggle { color: var(--gold2); background: rgba(26,42,94,.45); }
.nav-item.is-open .nav-toggle svg { transform: rotate(180deg); }
.nav-toggle svg { transition: transform .15s ease; }
.nav-link:focus-visible, .drop a:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; }
.mobile-nav-group { border-bottom: 1px solid rgba(154,167,201,.12); }
.mobile-nav-group summary { min-height: 48px; padding: 13px 10px; cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; }
.mobile-nav-group summary::-webkit-details-marker { display: none; }
.mobile-nav-group summary::after { content: "+"; float: right; color: var(--gold2); }
.mobile-nav-group[open] summary::after { content: "−"; }
.mobile-nav-group > div { padding: 0 0 8px 12px; display: grid; }
@media (max-width: 1180px) {
  .header-in { gap: 14px; }
  .nav-link { padding: 9px 8px; font-size: 13.5px; }
  .discord-btn span { display: none; }
  .discord-btn { width: 42px; }
}
@media (max-width: 940px) { .main-nav { display: none; } .menu-btn { display: inline-flex; } }

/* Transparent page transition supplied by the user, shortened for usability. */
.page-loader { inset: 0; z-index: 5000; overflow: hidden; pointer-events: all; opacity: 0; transition: opacity .18s ease; }
.page-loader.is-active { opacity: 1; }
.page-loader.is-leaving { opacity: 0; pointer-events: none; }
.page-loader__veil { position: absolute; inset: 0; background: rgba(5,4,26,.56); backdrop-filter: blur(11px) saturate(115%); -webkit-backdrop-filter: blur(11px) saturate(115%); }
.page-loader__badge { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; justify-content: center; align-content: center; gap: 12px; text-align: center; width: 100%; }
.page-loader__stack { position: relative; width: clamp(82px, 16vw, 142px); aspect-ratio: 1; }
.page-loader__mark { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 14px rgba(217,180,92,.35)); }
.page-loader__mark.line { fill: none; stroke: url(#page-gold); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: page-draw .72s cubic-bezier(.5,0,.3,1) forwards; }
.page-loader__mark.solid { fill: url(#page-gold); opacity: 0; animation: page-fill .35s ease .48s forwards; }
.page-loader__word { display: block; margin: 0 auto; color: #EBD79A; font: 700 16px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .28em; text-transform: uppercase; text-align: center; /* cancels the trailing letter-space so the word is optically centred */ padding-left: .28em; opacity: 0; transform: translateY(5px); animation: page-word .28s ease .58s forwards; }
@keyframes page-draw { to { stroke-dashoffset: 0; opacity: .9; } }
@keyframes page-fill { to { opacity: 1; } }
@keyframes page-word { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .page-loader__mark.line { animation: none; stroke-dashoffset: 0; }
  .page-loader__mark.solid, .page-loader__word { animation: none; opacity: 1; transform: none; }
}

/* Tebex catalogue and managed homepage. */
.catalog-skeleton { min-height: 360px; border-radius: var(--radius); border: 1px solid var(--navy700); background: linear-gradient(100deg, rgba(16,28,68,.42) 20%, rgba(32,51,105,.62) 40%, rgba(16,28,68,.42) 60%); background-size: 220% 100%; animation: catalog-shimmer 1.25s linear infinite; }
@keyframes catalog-shimmer { to { background-position: -220% 0; } }
.catalog-empty { grid-column: 1 / -1; border: 1px dashed rgba(227,179,65,.42); border-radius: 14px; padding: 34px; text-align: center; background: rgba(16,28,68,.34); }
.catalog-empty h1, .catalog-empty h2, .catalog-empty h3 { margin: 0 0 8px; }
.catalog-empty p { color: var(--muted); margin: 0 0 16px; }
.catalog-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 210px; background: radial-gradient(circle at 30% 20%, rgba(227,179,65,.22), transparent 38%), linear-gradient(145deg, var(--navy800), var(--navy950)); color: var(--gold2); font: 700 58px var(--font-display); }
.price-stack { display: inline-flex; align-items: baseline; gap: 8px; }
.price-stack del, .detail-price del { color: var(--muted); font-size: 13px; }
.category-showcase { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.category-card { position: relative; min-height: 164px; overflow: hidden; border: 1px solid var(--navy700); border-radius: 14px; background: rgba(16,28,68,.5); color: var(--cream); display: flex; align-items: flex-end; padding: 18px; }
.category-card > img, .category-card > .category-orb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .46; }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(5,10,24,.92)); }
.category-card > span, .category-card > em { position: relative; z-index: 1; }
.category-card strong { display: block; font: 700 18px var(--font-display); }
.category-card small { display: block; margin-top: 5px; color: var(--ink); opacity: .8; line-height: 1.45; }
.category-card em { position: absolute; right: 12px; top: 12px; font-style: normal; font-size: 11px; color: var(--gold2); }
.category-orb { display: block; background: radial-gradient(circle at 30% 25%, rgba(227,179,65,.52), transparent 28%), radial-gradient(circle at 75% 70%, rgba(94,159,232,.32), transparent 35%), var(--navy800); }
.custom-order-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.custom-order-card { overflow: hidden; border: 1px solid var(--navy700); border-radius: 14px; background: rgba(16,28,68,.46); }
.custom-order-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.custom-order-media img, .custom-order-media .category-orb { width: 100%; height: 100%; object-fit: cover; }
.custom-order-card > div:last-child { padding: 18px; }
.custom-order-card h3 { margin: 8px 0; }
.custom-order-card p { color: var(--muted); min-height: 3em; }
.video-chip { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 7px; background: rgba(5,10,24,.84); color: var(--cream); font-size: 11px; }

/* Dynamic Tebex product page. */
.dynamic-product { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 28px; align-items: start; padding: 22px 0 44px; }
.dynamic-gallery { min-width: 0; }
.dynamic-primary { aspect-ratio: 16/9; border: 1px solid var(--navy700); border-radius: 16px; overflow: hidden; background: var(--navy900); }
.dynamic-primary img { width: 100%; height: 100%; object-fit: cover; }
.dynamic-thumbs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.product-media-item { aspect-ratio: 16/10; padding: 0; border: 1px solid var(--navy700); border-radius: 9px; overflow: hidden; background: var(--navy900); cursor: pointer; }
.product-media-item img { width: 100%; height: 100%; object-fit: cover; }
.product-media-video { grid-column: span 2; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; border: 1px solid var(--navy700); }
.product-media-video iframe, .product-media-video video { width: 100%; height: 100%; border: 0; object-fit: cover; }
.media-link { display: grid; place-items: center; height: 100%; background: var(--navy900); }
.dynamic-product .buy-panel { position: sticky; top: 90px; }
.dynamic-product .buy-panel h1 { margin: 8px 0 12px; }
.product-lead { color: var(--muted); line-height: 1.65; }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin: 20px 0; }
.detail-price strong { color: var(--gold2); font: 700 28px var(--font-display); }
.product-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(227,179,65,.35); }
.review-stars { margin-left: auto; color: var(--navy700); letter-spacing: 1px; white-space: nowrap; }
.review-stars .on { color: var(--gold2); }

@media (max-width: 900px) {
  .category-showcase { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .custom-order-grid { grid-template-columns: 1fr 1fr; }
  .dynamic-product { grid-template-columns: 1fr; }
  .dynamic-product .buy-panel { position: static; }
}
@media (max-width: 560px) {
  .category-showcase, .custom-order-grid { grid-template-columns: 1fr; }
  .dynamic-thumbs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-skeleton { min-height: 300px; }
}

/* Strong contrast while a dropdown overlays the hero. */
.nav-item .drop { background: #101c44; border-color: rgba(227,179,65,.24); box-shadow: 0 20px 48px rgba(0,0,0,.55); }
.nav-item .drop a { color: #f2f4fb; opacity: 1; }
.nav-item .drop a:hover, .nav-item .drop a:focus-visible { background: #1a2a5e; color: #f6cf68; }

/* ==========================================================================
   "suggested" side rail (heading reads "pishnahadi" in Persian)
   Docks to the right edge of the page, collapses to a vertical tab.
   ========================================================================== */
.suggested-panel {
  position: fixed; right: 0; top: 96px; z-index: 95;
  width: 288px;
  display: flex; align-items: flex-start;
  transform: translateX(288px);
  transition: transform .28s ease;
}
.suggested-panel.is-open { transform: translateX(0); }

.suggested-panel .sg-inner {
  width: 288px; max-height: calc(100vh - 132px); overflow: auto;
  background: var(--navy800, #0C1430);
  border: 1px solid var(--navy700, #1A2A5E);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  padding: 14px 14px 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
}

.suggested-panel .sg-tab {
  position: absolute; left: -38px; top: 10px;
  width: 38px; padding: 16px 0;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; text-orientation: mixed;
  background: var(--navy800, #0C1430);
  border: 1px solid var(--navy700, #1A2A5E); border-right: 0;
  border-radius: 12px 0 0 12px;
  color: var(--gold2, #F5D67B);
  font-weight: 700; font-size: 13px; letter-spacing: .04em;
  cursor: pointer;
  box-shadow: -6px 10px 24px rgba(0, 0, 0, .35);
}
.suggested-panel .sg-tab:hover { background: var(--navy700, #1A2A5E); }

.sg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sg-title-fa { margin: 0; font-size: 17px; line-height: 1.6; color: var(--gold2, #F5D67B); font-weight: 700; }
.sg-actions { display: flex; gap: 6px; }
.sg-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--navy700, #1A2A5E); background: transparent;
  color: var(--muted, #94A3C4); cursor: pointer;
}
.sg-icon-btn:hover { color: var(--gold2, #F5D67B); border-color: var(--gold, #E3B341); }
.sg-icon-btn svg { width: 15px; height: 15px; }
.sg-sub { margin: 2px 0 12px; font-size: 12px; color: var(--muted, #94A3C4); letter-spacing: .02em; }

.sg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; transition: opacity .18s ease; }
.sg-list.is-swapping { opacity: 0; }
.sg-link {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 10px; color: inherit;
  border: 1px solid transparent;
}
.sg-link:hover { background: rgba(26, 42, 94, .5); border-color: var(--navy700, #1A2A5E); }
.sg-thumb {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 8px;
  overflow: hidden; background: var(--navy700, #1A2A5E);
  display: grid; place-items: center;
}
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-ph { font-weight: 700; color: var(--gold2, #F5D67B); }
.sg-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sg-name {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(227, 179, 65, .14); color: var(--gold2, #F5D67B); }
.sg-price { font-size: 12px; font-weight: 600; color: var(--muted, #94A3C4); }

@media (max-width: 720px) {
  .suggested-panel { top: auto; bottom: 0; width: min(320px, 92vw); transform: translateX(min(320px, 92vw)); }
  .suggested-panel .sg-inner { width: min(320px, 92vw); max-height: 56vh; }
  .suggested-panel .sg-tab { top: auto; bottom: 12px; }
}
@media print { .suggested-panel { display: none; } }

/* ==================================================================
   PATCH-2026-08 · header stacking, background images, page rhythm
   ================================================================== */

/* 1 - the header and its dropdowns always paint above the page ----- */
body > .site-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  overflow: visible;
}
body > .announce { position: relative; z-index: 901; }
body > main,
body > #main,
body > footer,
body > .site-footer { position: relative; z-index: 1; }
.site-header .nav-wrap,
.site-header .main-nav,
.site-header .nav-item { overflow: visible; }
.nav-item { position: relative; }
.drop,
.site-header .drop,
.nav-item .drop { z-index: 1000; }
#mobile-nav { z-index: 1200; }
.hero,
section.hero { position: relative; z-index: 0; }

/* 2 - global background image -------------------------------------- */
#site-bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: .35;
  pointer-events: none;
  transition: opacity .3s ease;
}
@media (max-width: 720px) { #site-bg-image { background-attachment: scroll; } }

/* 3 - menu / header background image ------------------------------- */
body.has-menu-bg .site-header,
body.has-menu-bg .site-header .nav-wrap,
body.has-menu-bg .drop,
body.has-menu-bg #mobile-nav {
  background-image:
    linear-gradient(rgba(6, 11, 26, .78), rgba(6, 11, 26, .78)),
    var(--menu-bg-image, none);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* 4 - hero background image ---------------------------------------- */
.hero .hero-media,
.hero .hero-media-injected {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.hero .hero-media img,
.hero .hero-media-injected img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero.has-hero-image .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 11, 26, .55), rgba(6, 11, 26, .84));
}
.hero > *:not(.hero-media):not(.hero-media-injected) { position: relative; z-index: 1; }

/* 5 - Custom Orders / Subscriptions rhythm ------------------------- */
main > section.container { margin-block: clamp(34px, 5vw, 64px); }
main > section.container:not(.stack-24) > * + * { margin-top: 18px; }
.page-head,
.section-head-block { margin-bottom: 22px; }
.page-lead,
.page-head p,
.section-head-block p {
  margin: 8px 0 0;
  max-width: 74ch;
  line-height: 1.75;
}
.eyebrow { display: inline-block; margin-bottom: 8px; }
h1 + p, h2 + p, h3 + p { margin-top: 8px; }
.services-grid,
.plans-grid { align-items: start; gap: 22px; }
.service-card,
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
}
.service-card p,
.plan-card p { margin: 0; line-height: 1.7; }
.service-card ul,
.plan-card ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.steps { margin-top: 6px; display: grid; gap: 18px; align-items: start; }
.step p { margin: 6px 0 0; line-height: 1.7; }
.notice { margin-block: 20px; align-items: flex-start; gap: 12px; line-height: 1.7; }
.cta-band { margin-block: clamp(34px, 5vw, 64px); overflow: hidden; }
.cta-band p { margin: 8px 0 0; line-height: 1.7; }

/* ==========================================================================
   PATCH-2026-08B — header, dropdowns, FAQ motion, ribbons, buttons,
   the Tebex sign-in dialog and the new background controls.
   ========================================================================== */

/* ---- header: nothing may wrap onto a second line --------------------- */
.header-in { flex-wrap: nowrap; gap: 18px; }
.brand { flex: 0 0 auto; white-space: nowrap; }
.brand-name { white-space: nowrap; font-size: clamp(15px, 1.35vw, 20px); }
.main-nav { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; overflow: visible; }
.main-nav .nav-link,
.main-nav .nav-item > .nav-link { white-space: nowrap; }
.header-actions { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 1240px) {
  .header-in { gap: 12px; }
  .main-nav { gap: 0; }
  .nav-link { padding: 9px 9px; font-size: 13.5px; }
}
@media (max-width: 1080px) {
  .brand-name { font-size: 15px; letter-spacing: .10em; }
  .nav-link { padding: 9px 7px; font-size: 13px; }
}

/* ---- dropdowns: real motion, and always above the hero --------------- */
.site-header { z-index: 900; }
.nav-item.has-drop { position: relative; }
.drop {
  z-index: 950;
  transform-origin: top center;
  transition: opacity .18s ease, transform .22s cubic-bezier(.22,.61,.36,1), visibility 0s linear .22s;
}
.nav-item.has-drop:hover > .drop,
.nav-item.has-drop:focus-within > .drop,
.nav-item.has-drop.is-open > .drop {
  transition-delay: 0s;
}
.drop > a { transition: background .15s ease, color .15s ease, padding-left .15s ease; }
.drop > a:hover { padding-left: 18px; }

/* ---- Support FAQ accordions ------------------------------------------ */
.faq details {
  border: 1px solid var(--line, rgba(255,255,255,.10));
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease;
}
.faq details[open] { border-color: rgba(227,179,65,.38); background: rgba(227,179,65,.05); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 16px 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .28s cubic-bezier(.22,.61,.36,1); flex: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq summary + * { padding: 0 18px 16px; }

/* ---- discount ribbon stays on its card ------------------------------- */
.card, .product-card, .grid-products > *, .category-card { position: relative; }
.sale-ribbon, .badge-sale {
  position: absolute; top: 10px; left: 10px; right: auto; z-index: 3;
  padding: 5px 10px; border-radius: 999px;
  font: 700 11.5px/1 var(--font-ui, inherit); letter-spacing: .06em;
  background: linear-gradient(135deg, #E3B341, #B8862B); color: #14100A;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap;
}
body > .sale-ribbon, main > .sale-ribbon { display: none !important; }

/* ---- section heads: "View all" is a button, pinned right ------------- */
.section-head { flex-wrap: wrap; align-items: center; }
.section-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.section-head .link-more {
  flex: 0 0 auto; margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(227,179,65,.45);
  background: linear-gradient(180deg, rgba(227,179,65,.16), rgba(227,179,65,.06));
  color: var(--gold, #E3B341); font-weight: 600; font-size: 14px; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.section-head .link-more:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(227,179,65,.28), rgba(227,179,65,.12));
  box-shadow: 0 10px 26px rgba(227,179,65,.18);
}
@media (max-width: 620px) { .section-head .link-more { margin-left: 0; } }

/* ---- Tebex sign-in dialog -------------------------------------------- */
#tbx-login { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; }
.tbx-login-backdrop { position: absolute; inset: 0; background: rgba(6,8,16,.72); backdrop-filter: blur(6px); animation: tbx-fade .2s ease; }
.tbx-login-card {
  position: relative; width: min(440px, calc(100vw - 40px));
  padding: 26px 26px 24px; border-radius: 20px;
  background: linear-gradient(180deg, #131826, #0D1119);
  border: 1px solid rgba(227,179,65,.28);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: tbx-pop .26s cubic-bezier(.22,.61,.36,1);
}
.tbx-login-card h3 { margin: 0 0 8px; font-size: 20px; }
.tbx-login-card p { margin: 0 0 18px; opacity: .78; font-size: 14px; line-height: 1.55; }
.tbx-login-list { display: grid; gap: 10px; }
.tbx-login-list .btn { width: 100%; justify-content: center; }
.tbx-login-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.tbx-login-x:hover { background: rgba(255,255,255,.08); }
@keyframes tbx-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes tbx-pop { from { opacity: 0; transform: translateY(14px) scale(.97) } to { opacity: 1; transform: none } }

/* ---- background layout modes ----------------------------------------- */
#site-bg-image.bg-fit-cover   { background-size: cover; background-repeat: no-repeat; }
#site-bg-image.bg-fit-contain { background-size: contain; background-repeat: no-repeat; }
#site-bg-image.bg-fit-stretch { background-size: 100% 100%; background-repeat: no-repeat; }
#site-bg-image.bg-fit-tile    { background-size: var(--bg-tile, 240px) auto; background-repeat: repeat; }
#site-bg-image.bg-fixed       { background-attachment: fixed; }

#site-bg-gradient {
  position: fixed; inset: -35%; z-index: -3; pointer-events: none;
  background: conic-gradient(from 0deg,
      var(--grad-1, #0A1230), var(--grad-2, #1A2A5E),
      var(--grad-3, #E3B341), var(--grad-2, #1A2A5E), var(--grad-1, #0A1230));
  filter: blur(var(--grad-blur, 70px));
  opacity: var(--grad-opacity, .45);
  animation: bg-spin var(--grad-speed, 26s) linear infinite;
  will-change: transform;
}
@keyframes bg-spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { #site-bg-gradient { animation: none } }

/* ---- "View all" pinned to the section's right edge ------------------------
   The older `.section-head { max-width: 68ch }` rule above shrank the flex
   row, so `margin-left: auto` only pushed the link to the middle of the
   page. Heads that actually contain a trailing link must be full width. */
.section-head:has(> .link-more) { max-width: none; }

/* ---- PATCH-2026-08D: blog listing — no flash of removed/overridden posts --
   blog-sync.js adds .blog-syncing to <html> while it merges the panel state
   and removes it right after; a failed fetch simply fades the static cards
   back in, so the page never stays empty. */
article.blog-card { transition: opacity .3s ease; }
html.blog-syncing article.blog-card { opacity: 0; }

/* search overlay: thumbnails keep their box even before/without an image */
.search-hit img { object-fit: cover; background: var(--navy800, #101B36); }


/* ==========================================================================
   Bundles / Occasions organisation  (v5)
   Sub-navigation chips shared by /bundles/, /custom/, /occasions/ and every
   season page, plus the season tiles on the Occasions hub.
   ========================================================================== */
.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.chip-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .035);
  color: var(--text-dim, #b9b9c6);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.chip-nav-link:hover,
.chip-nav-link:focus-visible {
  border-color: rgba(227, 179, 65, .45);
  background: rgba(227, 179, 65, .10);
  color: #fff;
  transform: translateY(-1px);
}
.chip-nav-link.is-active {
  border-color: rgba(227, 179, 65, .60);
  background: rgba(227, 179, 65, .16);
  color: #fff;
}
.chip-nav-link.is-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #e3b341);
}

/* season tiles on the Occasions hub */
.occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 6px 0 34px;
}
.occasion-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.occasion-card:hover,
.occasion-card:focus-visible {
  border-color: rgba(227, 179, 65, .42);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
}
.occasion-card .occasion-emoji {
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 6px;
}
.occasion-card h3 {
  margin: 0;
  font-size: 1.06rem;
  letter-spacing: .01em;
}
.occasion-card p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-dim, #b9b9c6);
}
.occasion-card .occasion-count {
  margin-top: 10px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold, #e3b341);
}

@media (max-width: 640px) {
  .chip-nav { gap: 8px; }
  .chip-nav-link { padding: 8px 13px; font-size: .87rem; }
  .occasion-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .occasion-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-nav-link, .occasion-card { transition: none; }
  .chip-nav-link:hover, .occasion-card:hover { transform: none; }
}

/* ==========================================================================
   PATCH-2026-08F
   1. Gallery: 8 thumbnails + "Show more" / "Show less"
   2. Video facade (fixes the blocked YouTube frame)
   3. Clickable links inside the product description
   4. Media viewer with previous / next and zoom
   5. Optional "Product details" box
   ========================================================================== */

/* --- 1. gallery ---------------------------------------------------------- */
.dynamic-primary { position: relative; }
.dynamic-primary img { cursor: zoom-in; transition: transform .35s ease; }
.dynamic-primary:hover img { transform: scale(1.015); }
.primary-hint,
.primary-count {
  position: absolute; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(5,10,24,.72); border: 1px solid var(--navy700);
  color: var(--ink); font-size: .78rem; letter-spacing: .01em;
  backdrop-filter: blur(6px); pointer-events: none;
}
.primary-hint { left: 10px; opacity: 0; transition: opacity .2s ease; }
.dynamic-primary:hover .primary-hint { opacity: 1; }
.primary-count { right: 10px; color: var(--muted); }

.product-media-item { position: relative; transition: border-color .2s ease, transform .2s ease; }
.product-media-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.product-media-item.is-active { border-color: var(--gold); box-shadow: var(--glow); }
.product-media-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* collapsed state: everything past the eighth tile stays hidden */
.dynamic-thumbs[data-expanded="0"] .product-media-item.is-extra { display: none; }
.dynamic-thumbs[data-expanded="1"] .media-more-veil { display: none; }
.dynamic-thumbs[data-expanded="1"] .product-media-item.is-more img { filter: none; }

.media-more-veil {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  background: rgba(5,10,24,.68); color: var(--gold2);
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  letter-spacing: .02em; cursor: pointer; transition: background .2s ease;
}
.media-more-veil small { font-size: .72rem; font-weight: 600; color: var(--cream); text-transform: uppercase; letter-spacing: .08em; }
.product-media-item.is-more:hover .media-more-veil { background: rgba(5,10,24,.5); }

.gallery-toggle-row { display: flex; justify-content: center; margin-top: 12px; }
.gallery-toggle { min-width: 190px; }

/* --- 2. videos ----------------------------------------------------------- */
.dynamic-videos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.dynamic-videos .product-media-video { grid-column: auto; }
.video-facade {
  position: relative; width: 100%; height: 100%; cursor: pointer;
  background: var(--navy900); display: block;
}
.video-facade .video-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade .video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(227,179,65,.92); color: #08122c;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); transition: transform .2s ease;
}
.video-facade:hover .video-play { transform: translate(-50%,-50%) scale(1.08); }
.video-facade:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.video-fallback {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 5px 10px; border-radius: 999px; font-size: .74rem;
  background: rgba(5,10,24,.78); border: 1px solid var(--navy700); color: var(--cream);
  text-decoration: none;
}
.video-fallback:hover { border-color: var(--gold); color: var(--gold2); }
.video-frame { width: 100%; height: 100%; border: 0; display: block; }

/* --- 3. links inside the description ------------------------------------- */
.prose a, .prose-link {
  color: var(--gold2); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; word-break: break-word; transition: color .15s ease;
}
.prose a:hover, .prose-link:hover { color: var(--gold); }
.prose a:focus-visible, .prose-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--navy700); padding: 8px 10px; text-align: left; }

/* --- 4. media viewer ----------------------------------------------------- */
body.viewer-open { overflow: hidden; }
.media-viewer { position: fixed; inset: 0; z-index: 12000; display: grid; }
.media-viewer[hidden] { display: none; }
.media-viewer-backdrop { position: absolute; inset: 0; background: rgba(3,6,16,.92); backdrop-filter: blur(4px); }
.media-viewer-shell {
  position: relative; z-index: 1; width: 100%; height: 100%;
  display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 56px 1fr;
  align-items: center;
}
.media-viewer-top {
  grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 0 14px;
}
.media-viewer-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.media-viewer-tools { display: flex; align-items: center; gap: 6px; }
.media-viewer-scale { color: var(--muted); font-size: .8rem; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.media-viewer-btn {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--navy700); background: rgba(16,28,68,.72);
  color: var(--ink); font-size: .95rem; cursor: pointer; text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.media-viewer-btn:hover { border-color: var(--gold); color: var(--gold2); background: rgba(26,42,94,.8); }
.media-viewer-nav {
  grid-row: 2; width: 46px; height: 92px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--navy700); background: rgba(16,28,68,.6); color: var(--ink);
  font-size: 2rem; line-height: 1; display: grid; place-items: center;
  transition: border-color .15s ease, color .15s ease;
}
.media-viewer-nav:hover { border-color: var(--gold); color: var(--gold2); }
.media-viewer-nav.prev { grid-column: 1; justify-self: center; }
.media-viewer-nav.next { grid-column: 3; justify-self: center; }
.media-viewer.is-single .media-viewer-nav { display: none; }
.media-viewer-stage {
  grid-column: 2; grid-row: 2; width: 100%; height: 100%;
  display: grid; place-items: center; overflow: hidden; padding: 8px 0 22px;
}
.media-viewer-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px;
  transform-origin: center center; transition: transform .12s ease-out;
  box-shadow: 0 24px 70px rgba(0,0,0,.55); user-select: none;
}
.media-viewer.is-zoomed .media-viewer-stage img { transition: none; }
@media (max-width: 720px) {
  .media-viewer-shell { grid-template-columns: 44px 1fr 44px; }
  .media-viewer-nav { width: 38px; height: 74px; font-size: 1.5rem; }
  .media-viewer-tools .media-viewer-btn[data-viewer-zoom="reset"] { display: none; }
}

/* --- 5. product details box ---------------------------------------------- */
.spec-box {
  margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--navy700); background: linear-gradient(180deg, rgba(16,28,68,.55), rgba(10,18,48,.55));
}
.spec-title {
  margin: 0 0 12px; font-family: var(--font-display); font-size: 1.05rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--gold2);
}
.spec-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; margin: 0; }
.spec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed rgba(154,167,201,.18);
}
.spec-row dt { color: var(--muted); font-size: .86rem; }
.spec-row dd { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 600; text-align: right; display: flex; align-items: center; gap: 8px; }
.spec-flag { padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid transparent; }
.spec-flag-yes { color: var(--success); background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.35); }
.spec-flag-no { color: var(--danger); background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.3); }
.spec-coords { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--cream); }
.spec-copy {
  padding: 3px 8px; border-radius: 7px; cursor: pointer; font-size: .72rem;
  border: 1px solid var(--navy700); background: rgba(16,28,68,.8); color: var(--muted);
}
.spec-copy:hover { border-color: var(--gold); color: var(--gold2); }
.spec-note { margin: 12px 0 0; color: var(--muted); font-size: .85rem; }
.spec-map { margin: 14px 0 0; }
.spec-map-btn {
  position: relative; display: block; width: 100%; padding: 0; cursor: zoom-in;
  border: 1px solid var(--navy700); border-radius: 12px; overflow: hidden; background: var(--navy900);
}
.spec-map-btn img { width: 100%; height: auto; display: block; }
.spec-map-btn:hover { border-color: var(--gold); }
.spec-map-zoom {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(5,10,24,.78); border: 1px solid var(--navy700); color: var(--cream); font-size: .76rem;
}
.spec-map figcaption { margin-top: 6px; color: var(--muted); font-size: .8rem; }
@media (max-width: 720px) {
  .spec-grid { grid-template-columns: 1fr; }
  .dynamic-videos { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PATCH-2026-08G
   1. the details box moved under the buy card (right column)
   2. big, tidy, stacked product videos under the gallery
   3. the main image flips like a slider (arrows, swipe, arrow keys)
   ========================================================================== */

/* --- 1. right column: buy card + details box ----------------------------- */
.product-side { display: grid; gap: 18px; align-self: start; min-width: 0; }
.product-side .buy-panel { margin: 0; }
.product-side .spec-box { margin-top: 0; }
/* the card can only stay pinned while the column is short */
.product-side:has(.spec-box) .buy-panel,
.dynamic-product .product-side:has(.spec-box) .buy-panel { position: static; }
/* the side column is narrow, so the details always read as one clean list */
.product-side .spec-grid { grid-template-columns: 1fr; gap: 0; }
.product-side .spec-row:last-child { border-bottom: 0; }
.product-side .spec-box { padding: 18px; }
.product-side .spec-map { margin-top: 12px; }

/* --- 2. product videos --------------------------------------------------- */
.product-videos { padding: 6px 0 40px; }
.video-section-title {
  margin: 0 0 16px; font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: .02em; color: var(--cream);
}
.video-section-title::after {
  content: ""; display: block; width: 54px; height: 3px; margin-top: 8px;
  border-radius: 3px; background: linear-gradient(90deg, var(--gold), rgba(227,179,65,0));
}
.video-list { display: grid; grid-template-columns: 1fr; gap: 26px; max-width: 1060px; }
.video-item { margin: 0; }
.video-frame-box {
  position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden;
  border: 1px solid var(--navy700); border-radius: 16px; background: var(--navy900);
  box-shadow: var(--shadow);
}
.video-frame-box .video-facade,
.video-frame-box iframe,
.video-frame-box video { width: 100%; height: 100%; border: 0; display: block; }
.video-frame-box .video-play { width: 88px; height: 88px; }
.video-frame-box .video-play svg { width: 38px; height: 38px; }
.video-frame-box .video-fallback { right: 12px; bottom: 12px; font-size: .82rem; padding: 7px 13px; }
.video-caption { margin-top: 8px; color: var(--muted); font-size: .84rem; }

/* --- 3. the main frame is a slider --------------------------------------- */
.dynamic-primary { position: relative; overflow: hidden; touch-action: pan-y; outline: none; }
.dynamic-primary:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
.primary-track {
  display: flex; width: 100%; height: 100%; will-change: transform;
  transition: transform .42s cubic-bezier(.22,.61,.36,1);
}
.primary-track.is-dragging { transition: none; }
.primary-slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; }
.dynamic-primary .primary-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
/* the old hover zoom would fight the slide animation */
.dynamic-primary:hover .primary-slide img { transform: none; }

.primary-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 66px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--navy700); border-radius: 12px; color: var(--ink);
  background: rgba(5,10,24,.6); backdrop-filter: blur(6px);
  font-size: 2rem; line-height: 1; padding: 0 0 4px;
  opacity: 0; transition: opacity .2s ease, border-color .15s ease, color .15s ease;
}
.primary-nav.prev { left: 12px; }
.primary-nav.next { right: 12px; }
.dynamic-primary:hover .primary-nav,
.dynamic-primary:focus-within .primary-nav { opacity: 1; }
.primary-nav:hover { border-color: var(--gold); color: var(--gold2); }
.primary-nav:focus-visible { opacity: 1; outline: 2px solid var(--gold); outline-offset: 2px; }
.dynamic-primary .primary-hint { z-index: 2; }
.dynamic-primary .primary-count { z-index: 2; }

@media (hover: none) {
  .primary-nav { opacity: 1; background: rgba(5,10,24,.5); }
  .primary-hint { display: none; }
}
@media (max-width: 720px) {
  .primary-nav { width: 36px; height: 54px; font-size: 1.5rem; }
  .video-list { gap: 18px; }
  .video-frame-box { border-radius: 12px; }
  .video-frame-box .video-play { width: 64px; height: 64px; }
}
