/* Reusable native merchandise carousel; intentionally no checkout or iframe. */
.merch-carousel { width:min(100%,820px); min-width:0; max-width:100%; margin:0 auto; text-align:center; }
.merch-carousel [hidden] { display:none !important; }
.merch-carousel-viewport { display:flex; width:100%; min-width:0; max-width:100%;
  column-gap:22px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory;
  scrollbar-width:none; padding:1px 1px 10px; }
.merch-carousel-viewport::-webkit-scrollbar { display:none; }
.merch-carousel-viewport.merch-two-or-fewer { justify-content:safe center; }
.merch-carousel-viewport.merch-two-or-fewer .merch-item { flex-basis:calc((100% - 22px)/2); }
.merch-item { display:flex; flex:0 0 calc((100% - 44px)/3); flex-direction:column; min-width:0; color:var(--fg);
  text-decoration:none; scroll-snap-align:start; }
.merch-item-photo { position:relative; isolation:isolate; aspect-ratio:1/1; display:grid; place-items:center; min-width:0; overflow:hidden;
  border:1px solid #39332b; background:#0b0a09; transition:border-color .6s ease; color:var(--muted); }
.merch-item-photo img { width:100%; height:100%; object-fit:contain; display:block; transition:transform 1s ease; }
.merch-item:hover .merch-item-photo { border-color:#b49a60; }
.merch-item:hover img { transform:scale(1.035); }
.merch-item-caption { position:absolute; inset:auto 0 0; z-index:1;
  padding:clamp(22px,4vw,40px) clamp(10px,1.7vw,18px) clamp(9px,1.4vw,15px);
  text-align:left; color:var(--fg); font:400 clamp(18px,2.2vw,26px)/1.2 var(--font-title);
  background:linear-gradient(to top,rgba(0,0,0,.82),rgba(0,0,0,.38) 55%,transparent);
  pointer-events:none; overflow-wrap:anywhere; }
.merch-carousel-controls { display:flex; justify-content:center; gap:14px; margin:10px auto 0; }
.merch-carousel-controls button { display:grid; place-items:center; width:42px; height:38px;
  background:transparent; border:1px solid #776344; border-radius:2px; color:var(--accent);
  font:400 26px/1 var(--font-body); cursor:pointer; transition:border-color .3s ease,color .3s ease; }
.merch-carousel-controls button:hover:not(:disabled) { border-color:var(--accent); color:var(--fg); }
.merch-carousel-controls button:disabled { opacity:.35; cursor:default; }
.merch-carousel-status { color:var(--muted); font-size:16px; margin:12px auto; }
.merch-carousel-action { margin-top:22px; }
@media (max-width:680px) {
  .merch-carousel-viewport,.merch-carousel-viewport.merch-two-or-fewer {
    gap:12px; justify-content:flex-start;
  }
  /* A fixed basis and zero shrink are essential: minmax(0,76%) grid tracks
     could contract to fit all products, eliminating the scrollable overflow. */
  .merch-carousel-viewport .merch-item,
  .merch-carousel-viewport.merch-two-or-fewer .merch-item { flex:0 0 76%; }
  .merch-carousel-viewport .merch-item:only-child { flex-basis:100%; }
}
@media (prefers-reduced-motion:reduce) {
 .merch-item-photo,.merch-item-photo img,.merch-carousel-controls button { transition:none; }
}

/* Approved full-width carousel navigation, for the public homepage. */
body.boe-editorial:has(.study-carousel-controls) #main .yt-carousel-shell {
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  min-width:0;
}
body.boe-editorial:has(.study-carousel-controls) #main .yt-carousel-viewport,
body.boe-editorial:has(.study-carousel-controls) #main .yt-posts-viewport {
  flex:0 0 auto;
  width:100%;
  min-width:0;
}
body.boe-editorial:has(.study-carousel-controls) #main .yt-carousel-track { padding-inline:2px; }
body.boe-editorial:has(.study-carousel-controls) #main .study-carousel-controls {
  display:flex;
  justify-content:center;
  gap:14px;
  margin-top:0;
}
body.boe-editorial:has(.study-carousel-controls) #main .study-carousel-controls .yt-carousel-arrow {
  display:grid;
  place-items:center;
  margin:0;
  width:42px;
  height:38px;
  background:transparent;
  border:1px solid #776344;
  border-radius:2px;
  color:var(--accent);
  font:400 26px/1 var(--font-body);
  transition:border-color .3s ease,color .3s ease;
}
body.boe-editorial:has(.study-carousel-controls) #main .study-carousel-controls .yt-carousel-arrow:disabled {
  opacity:.35;
  cursor:default;
}
body.boe-editorial:has(.study-carousel-controls) #main .study-carousel-controls .yt-carousel-arrow:hover:not(:disabled) {
  border-color:var(--accent);
  color:var(--fg);
}
@media(prefers-reduced-motion:reduce) {
 body.boe-editorial:has(.study-carousel-controls) #main .study-carousel-controls .yt-carousel-arrow { transition:none; }
}

.merch-carousel-action .ss-cta { display:inline-block; border:1px solid #776344; padding:12px 21px; border-radius:2px; background:#100f0d; transition:background .55s ease,border-color .55s ease,color .55s ease; }
.merch-carousel-action .ss-cta:hover { background:#211c15; border-color:#cfb47d; color:var(--brand-text); }
.merch-carousel-action .ss-cta { color:var(--accent); font-size:13px; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }
.merch-carousel-action .ss-cta:hover { color:var(--brand-text); }
/* YouTube scripts retain the legacy is-hidden class and toggle is-disabled.
   Keep both arrows visible, including the disabled arrow at either boundary. */
body.boe-editorial #main #store-section {text-align:center;scroll-margin-top:100px;min-width:0;}
@media(prefers-reduced-motion:reduce){.merch-carousel-action .ss-cta{transition:none;}}
