/* Prompt 33D — SILK BHES premium video shopping hub */
:root {
  --sb-vh-cream: #faf8f4;
  --sb-vh-navy: #0f1729;
  --sb-vh-gold: #c9a962;
  --sb-vh-gold-soft: #e8c878;
  --sb-vh-border: #e8e2d6;
  --sb-vh-muted: #5c6478;
}

.sb-vh-page {
  background: linear-gradient(180deg, #fff 0%, var(--sb-vh-cream) 40%, #fff 100%);
  color: var(--sb-vh-navy);
  padding: 1rem 0 6rem;
  max-width: 72rem;
  margin: 0 auto;
}

.sb-vh-hero {
  text-align: center;
  padding: 1.25rem 1rem 1.75rem;
}
.sb-vh-hero__brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0.08em;
  color: var(--sb-vh-navy);
  margin: 0;
}
.sb-vh-hero__sub {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  color: var(--sb-vh-muted);
  font-size: 0.95rem;
}

.sb-vh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  padding: 0 0.875rem;
  list-style: none;
  margin: 0;
}
@media (min-width: 768px) {
  .sb-vh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; padding: 0 1.25rem; }
}
@media (min-width: 1100px) {
  .sb-vh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 339px) {
  .sb-vh-grid { grid-template-columns: 1fr; }
}

.sb-vh-card {
  background: #fff;
  border: 1px solid var(--sb-vh-border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 41, 0.05);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .sb-vh-card { transition: none; }
}
.sb-vh-card:hover,
.sb-vh-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 41, 0.1);
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}
.sb-vh-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, #0f1729 0%, #2a3348 55%, #8b6914 140%);
  overflow: hidden;
}
.sb-vh-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sb-vh-card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  color: #faf8f4;
}
.sb-vh-card__fallback-brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--sb-vh-gold-soft);
}
.sb-vh-card__fallback-cta {
  font-size: 0.75rem;
  opacity: 0.9;
}
.sb-vh-card__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--sb-vh-navy);
  color: var(--sb-vh-gold-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
}
.sb-vh-card__body {
  padding: 0.75rem 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.sb-vh-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  margin: 0;
}
.sb-vh-card__meta {
  font-size: 0.8rem;
  color: var(--sb-vh-muted);
}
.sb-vh-card__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sb-vh-navy);
  color: #faf8f4;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Player shell */
.sb-vh-player-page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.75rem 0.875rem calc(7.5rem + var(--sb-vh-atc-dock-h, 0px) + var(--sb-safe-bottom, 0px));
}
.sb-vh-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sb-vh-navy);
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.sb-vh-back:focus-visible {
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}
.sb-vh-shell {
  background: #fff;
  border: 1px solid var(--sb-vh-border);
  border-radius: 1rem;
  box-shadow: 0 10px 32px rgba(15, 23, 41, 0.08);
  /* Do not clip the Facebook player — portrait Reels need full height */
  overflow: visible;
}
.sb-vh-shell__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--sb-vh-border);
  background: var(--sb-vh-cream);
  border-radius: 1rem 1rem 0 0;
}
.sb-vh-shell__logo {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--sb-vh-navy);
}
.sb-vh-shell__title {
  font-size: 0.85rem;
  color: var(--sb-vh-muted);
  text-align: right;
}

.sb-vh-stage {
  position: relative;
  background: #0f1729;
  /* Grow with portrait player — never force a short landscape box */
  min-height: 0;
  overflow: visible;
}
.sb-vh-stage__player {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  /* Default portrait / Reel frame. NEVER force 16:9 on all videos. */
  aspect-ratio: 9 / 16;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: #0f1729;
}
.sb-vh-stage__player[data-sb-vh-aspect="portrait"] {
  aspect-ratio: 9 / 16;
}
.sb-vh-stage__player[data-sb-vh-aspect="portrait45"] {
  aspect-ratio: 4 / 5;
}
.sb-vh-stage__player[data-sb-vh-aspect="square"] {
  aspect-ratio: 1 / 1;
}
.sb-vh-stage__player[data-sb-vh-aspect="landscape"] {
  aspect-ratio: 16 / 9;
  max-width: 56rem;
}
.sb-vh-stage__player[data-sb-vh-aspect="auto"] {
  aspect-ratio: auto;
  min-height: 280px;
}
/*
 * P36d: Fill the portrait stage with the Facebook plugin — do NOT use height:auto
 * on cross-origin FB iframes (browsers collapse them to ~150px and the stage looks blank).
 * Absolute fill + height:100% restores full-frame Reels without object-fit:cover crop.
 * Store-luxury absolute+cover remains overridden (no cover).
 */
.sb-vh-stage__player .sb-fb-host {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block !important;
  border: 0 !important;
  transform: none !important;
  overflow: hidden !important;
}
.sb-vh-stage__player .sb-fb-host .fb-video,
.sb-vh-stage__player .sb-fb-host .fb-video > span,
.sb-vh-stage__player .sb-fb-host iframe,
.sb-vh-stage__player iframe[data-sb-video-iframe],
.sb-vh-stage__player .fb-video,
.sb-vh-stage__player .fb-video > span,
.sb-vh-stage__player .fb-video iframe {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  /* iframes ignore object-fit for cross-origin plugin paint; keep contain for any native media */
  object-fit: contain !important;
  display: block !important;
  border: 0 !important;
  transform: none !important;
}
.sb-vh-stage__player[data-sb-vh-aspect="auto"] .sb-fb-host {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 280px !important;
}
.sb-vh-stage__player[data-sb-vh-aspect="auto"] .sb-fb-host .fb-video,
.sb-vh-stage__player[data-sb-vh-aspect="auto"] .sb-fb-host iframe,
.sb-vh-stage__player[data-sb-vh-aspect="auto"] iframe[data-sb-video-iframe] {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 280px !important;
}
.sb-vh-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(160deg, #0f1729, #243049);
  color: #faf8f4;
}
.sb-vh-loading[hidden] { display: none !important; }
.sb-vh-loading__brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.14em;
  color: var(--sb-vh-gold-soft);
}
.sb-vh-skeleton {
  width: 64%;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.sb-vh-skeleton::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: rgba(232, 200, 120, 0.45);
  animation: sb-vh-shimmer 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .sb-vh-skeleton::after { animation: none; width: 100%; opacity: 0.35; }
}
@keyframes sb-vh-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
.sb-vh-fail {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #faf8f4;
}
.sb-vh-fail[hidden] { display: none !important; }

.sb-vh-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.sb-vh-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.sb-vh-hotspot__dot {
  display: block;
  width: 18px;
  height: 18px;
  margin: 13px auto;
  border-radius: 50%;
  border: 2px solid #0f1729;
  background: radial-gradient(circle at 35% 35%, #e8c878, #c9a962 55%, #a8843f);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.85);
}
.sb-vh-hotspot[hidden] { display: none !important; }

.sb-vh-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sb-vh-border);
  background: #fff;
}
.sb-vh-nav__btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--sb-vh-border);
  background: #fff;
  color: var(--sb-vh-navy);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.sb-vh-nav__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sb-vh-nav__btn:focus-visible {
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}
.sb-vh-counter {
  font-weight: 700;
  color: var(--sb-vh-navy);
  text-align: center;
}
.sb-vh-counter__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--sb-vh-muted);
}

.sb-vh-chapters-rail {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--sb-vh-border);
  background: #fff;
}
.sb-vh-chapters-rail[data-sb-vh-chapters-overflow="0"] {
  grid-template-columns: 1fr;
}
.sb-vh-chapters {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  padding: 0.75rem 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  min-width: 0;
}
.sb-vh-chapters-rail[data-sb-vh-chapters-overflow="0"] .sb-vh-chapters {
  padding-left: 1rem;
  padding-right: 1rem;
}
.sb-vh-chapters-arrow {
  align-self: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--sb-vh-border);
  background: #fffdf8;
  color: var(--sb-vh-navy);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 41, 0.08);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sb-vh-chapters-arrow[hidden] {
  display: none !important;
}
.sb-vh-chapters-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.sb-vh-chapters-arrow:focus-visible {
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sb-vh-chapters { scroll-behavior: auto; }
}
.sb-vh-chapter {
  flex: 0 0 auto;
  width: 72px;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: center;
}
.sb-vh-chapter img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 0.35rem 0.35rem 0 0;
  display: block;
  background: #f3efe6;
}
.sb-vh-chapter__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0;
  color: var(--sb-vh-muted);
}
.sb-vh-chapter.is-current,
.sb-vh-chapter[aria-current="true"] {
  border-color: var(--sb-vh-navy);
  box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.45);
}
.sb-vh-chapter.is-current .sb-vh-chapter__num {
  color: var(--sb-vh-navy);
}
.sb-vh-chapter:focus-visible {
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}

.sb-vh-product {
  padding: 1rem;
  touch-action: pan-y;
}
.sb-vh-product__card {
  display: grid;
  grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
  gap: 0.875rem;
  align-items: start;
}
@media (min-width: 768px) {
  .sb-vh-product__card { grid-template-columns: 160px minmax(0, 1fr); }
}
.sb-vh-product__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f3efe6;
  display: block;
}
.sb-vh-product__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sb-vh-product__cat {
  font-size: 0.8rem;
  color: var(--sb-vh-muted);
  margin: 0 0 0.35rem;
}
.sb-vh-product__price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.sb-vh-product__sale {
  font-weight: 700;
  color: #8b6914;
  font-size: 1.05rem;
}
.sb-vh-product__was {
  text-decoration: line-through;
  color: var(--sb-vh-muted);
  font-size: 0.85rem;
}
.sb-vh-product__stock {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.sb-vh-product__stock.is-out { color: #b42318; }
.sb-vh-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.sb-vh-btn {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sb-vh-btn--primary {
  background: var(--sb-vh-navy);
  color: #faf8f4;
}
.sb-vh-btn--ghost {
  background: #fff;
  border-color: var(--sb-vh-border);
  color: var(--sb-vh-navy);
}
.sb-vh-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sb-vh-btn:focus-visible {
  outline: 2px solid var(--sb-vh-gold);
  outline-offset: 2px;
}

.sb-vh-empty-chapters {
  padding: 1rem;
  color: var(--sb-vh-muted);
  font-size: 0.9rem;
  text-align: center;
}

.sb-vh-toast {
  position: fixed;
  left: 50%;
  bottom: calc(
    var(--sb-bottom-nav-height, 72px)
    + var(--sb-safe-bottom, 0px)
    + var(--sb-vh-atc-dock-h, 0px)
    + 16px
  );
  transform: translateX(-50%);
  z-index: 1020;
  background: var(--sb-vh-navy);
  color: #faf8f4;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  max-width: calc(100vw - 2rem);
}
.sb-vh-toast[hidden] { display: none !important; }

/*
 * Prompt 33I — fixed ATC dock (not sticky-inside overflow:hidden shell).
 * Clears bottom nav + safe-area structurally; z-index above nav only as backup.
 */
.sb-vh-sticky-bag {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--sb-app-max, 460px));
  /* Clear full measured bottom-nav + gap (do not use undersized 72px token). */
  bottom: calc(var(--sb-bottom-nav-height, 96px) + var(--sb-safe-bottom, 0px) + 12px);
  z-index: 1010;
  padding: 0 0.875rem;
  box-sizing: border-box;
  pointer-events: none;
}
.sb-vh-sticky-bag .sb-vh-btn {
  pointer-events: auto;
  width: 100%;
  box-shadow: 0 8px 22px rgba(15, 23, 41, 0.18);
}
/* Mobile: single Add to Bag control = fixed dock (avoid in-card duplicate under nav). */
@media (max-width: 767.98px) {
  .sb-vh-product__actions > [data-sb-vh-bag] {
    display: none !important;
  }
}
body.sb-body--videos {
  --sb-vh-atc-dock-h: 56px;
}
@media (min-width: 768px) {
  .sb-vh-sticky-bag { display: none; }
  body.sb-body--videos {
    --sb-vh-atc-dock-h: 0px;
  }
}

body.sb-body--videos .sb-vh-page,
body.sb-body--videos .sb-vh-player-page {
  overflow-x: hidden;
}
