/* Product Story — gallery CTA + black-gold fullscreen modal */

.main-product-img,
.mobile-product-slideshow {
  position: relative;
}

.ps-gallery-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.78);
  color: #f5ead0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.ps-gallery-btn:hover,
.ps-gallery-btn:focus-visible {
  background: rgba(17, 17, 17, 0.92);
  color: #e8c76a;
  outline: none;
  transform: translateY(-1px);
}

.ps-gallery-btn__icon {
  flex: 0 0 auto;
}

/* ---- Fullscreen black-gold modal ---- */
.ps-story-modal {
  --ps-bg: #0a0a0a;
  --ps-bg-chrome: #111111;
  --ps-bg-elevated: #161616;
  --ps-bg-panel: #121212;
  --ps-text: #f3ead7;
  --ps-text-muted: #a89878;
  --ps-gold: #c9a227;
  --ps-gold-soft: #e0c56a;
  --ps-line: rgba(201, 162, 39, 0.42);
  --ps-line-soft: rgba(255, 255, 255, 0.08);
}

.ps-story-modal .modal-dialog {
  width: 100%;
  max-width: 100%;
  height: 80vh;
  max-height: 80vh;
  margin-left: 0;
  margin-right: 0;
}

.ps-story-modal .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 80vh;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--ps-bg);
  color: var(--ps-text);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.18), 0 24px 64px rgba(0, 0, 0, 0.55);
}

/* 1) Title band — secondary */
.ps-story-modal__header.modal-header {
  position: relative;
  flex-shrink: 0;
  padding: 18px 56px 10px;
  background: var(--ps-bg-chrome);
  color: var(--ps-text);
  border-bottom: 1px solid var(--ps-line-soft) !important;
}

.ps-story-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.4);
  opacity: 0.7;
}

.ps-story-modal .btn-close:hover {
  opacity: 1;
}

.ps-story-modal__eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ps-text-muted);
}

.ps-story-modal__subtitle {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ps-gold-soft);
}

/* 2) Tab band — primary navigation */
.ps-story-modal__chrome {
  flex-shrink: 0;
  background: var(--ps-bg-chrome);
  padding: 4px 16px 0;
}

.ps-story-modal__tabs {
  flex-shrink: 0;
  margin-bottom: 0;
  gap: 8px;
  border-bottom: 0 !important;
}

.ps-story-modal__tabs .nav-link,
.ps-story-modal .ps-story-modal__tabs .nav-link {
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  margin-bottom: 0;
  color: var(--ps-text-muted) !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 0.85rem 1.35rem 0.95rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.ps-story-modal__tabs .nav-link:hover,
.ps-story-modal__tabs .nav-link:focus,
.ps-story-modal .ps-story-modal__tabs .nav-link:hover,
.ps-story-modal .ps-story-modal__tabs .nav-link:focus {
  color: var(--ps-gold-soft) !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ps-story-modal__tabs .nav-link.active,
.ps-story-modal .ps-story-modal__tabs .nav-link.active {
  color: var(--ps-gold) !important;
  background: transparent !important;
  border-bottom-color: var(--ps-gold) !important;
  box-shadow: none !important;
}

.ps-story-modal__tab-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 1.25em;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.18);
  color: var(--ps-gold-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 1px;
}

/* Explicit gold divider under tabs — primary/secondary break */
.ps-story-modal__divider {
  height: 1px;
  margin: 0 -16px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 162, 39, 0.15) 12%,
    rgba(201, 162, 39, 0.55) 50%,
    rgba(201, 162, 39, 0.15) 88%,
    transparent 100%
  );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* 3) Content band — scroll + panel hierarchy */
.ps-story-modal__scroll.modal-body {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--ps-bg);
  color: var(--ps-text);
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 160, 89, 0.45) rgba(197, 160, 89, 0.08);
}

.ps-story-modal__scroll::-webkit-scrollbar {
  width: 6px;
}

.ps-story-modal__scroll::-webkit-scrollbar-track {
  background: rgba(197, 160, 89, 0.06);
  border-radius: 999px;
}

.ps-story-modal__scroll::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 999px;
}

.ps-story-modal__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.55);
}

.ps-story-modal__tab-content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 36px;
  color: var(--ps-text);
  overflow: visible;
}

@media (min-width: 768px) {
  .ps-story-modal__tab-content {
    padding: 36px 32px 48px;
  }
}

@media (min-width: 1200px) {
  .ps-story-modal__tab-content {
    max-width: 1200px;
    padding-left: 40px;
    padding-right: 40px;
  }
}

.ps-story-modal__panel {
  padding: 28px 24px;
  background: var(--ps-bg-panel);
  border: 1px solid var(--ps-line-soft);
  border-top: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ps-story-modal__panel--media {
  padding: 20px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

@media (min-width: 768px) {
  .ps-story-modal__panel {
    padding: 36px 40px;
  }

  .ps-story-modal__panel--media {
    padding: 8px 0 0;
  }
}

.ps-story-modal__empty {
  margin-top: 24px;
  color: var(--ps-text-muted) !important;
}

/* Centered content column inside full-width shell */
.ps-story-rich {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  color: var(--ps-text) !important;
  background: transparent !important;
  text-align: left;
  line-height: 1.7;
}

.ps-story-rich,
.ps-story-rich *:not(a):not(img):not(svg):not(path):not(video) {
  color: var(--ps-text) !important;
  background-color: transparent !important;
}

.ps-story-rich h1,
.ps-story-rich h2,
.ps-story-rich h3,
.ps-story-rich h4,
.ps-story-rich h5,
.ps-story-rich h6 {
  margin-top: 1.6em;
  margin-bottom: 0.55em;
  color: var(--ps-gold-soft) !important;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.ps-story-rich h1:first-child,
.ps-story-rich h2:first-child,
.ps-story-rich h3:first-child {
  margin-top: 0;
}

.ps-story-rich h1 {
  font-size: 1.75rem;
  padding-bottom: 0.45em;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
}

.ps-story-rich h2 {
  font-size: 1.35rem;
}

.ps-story-rich p {
  margin-bottom: 1em;
  color: rgba(243, 234, 215, 0.88) !important;
}

.ps-story-rich ul,
.ps-story-rich ol {
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}

.ps-story-rich li {
  margin-bottom: 0.45em;
  color: rgba(243, 234, 215, 0.88) !important;
}

.ps-story-rich a {
  color: var(--ps-gold) !important;
}

.ps-story-rich a:hover {
  color: var(--ps-gold-soft) !important;
}

.ps-story-rich strong,
.ps-story-rich b {
  color: #fff6df !important;
  font-weight: 650;
}

.ps-story-rich img,
.ps-story-rich video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.35em auto;
  border-radius: 4px;
}

.ps-story-rich table {
  color: var(--ps-text);
  border-color: var(--ps-line);
}

.ps-story-rich hr {
  margin: 1.75em 0;
  border: 0;
  border-top: 1px solid rgba(201, 162, 39, 0.22);
}

.ps-story-masonry {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 8px;
  column-count: 1;
  column-gap: 12px;
}

@media (min-width: 576px) {
  .ps-story-masonry {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .ps-story-masonry {
    column-count: 3;
    column-gap: 16px;
  }
}

.ps-story-masonry__item {
  break-inside: avoid;
  margin: 0 0 12px;
}

.ps-story-video-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ps-bg-elevated);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
}

.ps-story-video-card__poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
  transition: opacity 0.2s ease;
}

.ps-story-video-card__poster--placeholder {
  background:
    radial-gradient(circle at 30% 20%, rgba(201, 162, 39, 0.18), transparent 55%),
    #111;
}

.ps-story-video-card.is-ready .ps-story-video-card__poster,
.ps-story-video-card.is-playing .ps-story-video-card__poster {
  opacity: 0;
  pointer-events: none;
}

.ps-story-video-card__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
  background: #000;
}

.ps-story-video-card__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ps-story-video-card.is-playing .ps-story-video-card__play {
  opacity: 0;
  pointer-events: none;
}

.ps-story-video-card__play-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.88);
  border: 1px solid var(--ps-gold);
  position: relative;
}

.ps-story-video-card__play-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--ps-gold-soft);
}

@media (max-width: 575.98px) {
  .ps-gallery-btn {
    right: 10px;
    bottom: 10px;
    min-height: 36px;
    font-size: 12px;
    padding: 0 12px 0 10px;
  }
}

/* ---- UGC filmstrip inside story tab ---- */
.ps-story-ugc {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(201, 162, 39, 0.28);
}

.ps-story-ugc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.ps-story-ugc__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ps-gold);
}

.ps-story-ugc__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ps-text-muted);
  transition: color 0.2s ease;
}

.ps-story-ugc__more:hover {
  color: var(--ps-gold-soft);
}

.ps-story-ugc__viewport {
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: pan-y;
  margin: 0 -4px;
  padding: 4px 0 8px;
  mask-image: linear-gradient(90deg, transparent 0, #000 2%, #000 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2%, #000 98%, transparent 100%);
}

.ps-story-ugc__viewport.is-dragging {
  cursor: grabbing;
}

.ps-story-ugc__viewport.is-dragging a {
  pointer-events: none;
}

.ps-story-ugc__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
  user-select: none;
}

.ps-story-ugc__card {
  flex: 0 0 min(260px, 72vw);
  background: var(--ps-bg-elevated);
  border: 1px solid var(--ps-line-soft);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ps-story-ugc__card:hover {
  border-color: var(--ps-gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 162, 39, 0.18);
  transform: translateY(-3px);
}

.ps-story-ugc__link {
  display: block;
  color: inherit;
  height: 100%;
}

.ps-story-ugc__media {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #0a0a0a;
}

.ps-story-ugc__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
  transition: transform 0.5s ease, filter 0.4s ease;
}

.ps-story-ugc__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ps-story-ugc__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  max-width: calc(100% - 1rem);
  padding: 0.18rem 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-gold);
  background: rgba(5, 5, 5, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-story-ugc__card:hover .ps-story-ugc__media img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.ps-story-ugc__card:hover .ps-story-ugc__veil {
  opacity: 1;
}

.ps-story-ugc__meta {
  padding: 0.7rem 0.8rem 0.85rem;
}

.ps-story-ugc__title {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ps-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-story-ugc__card:hover .ps-story-ugc__title {
  color: var(--ps-gold-soft);
}

.ps-story-ugc__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--ps-text-muted);
}

.ps-story-ugc__author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-story-ugc__stats {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ps-story-ugc__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

  .ps-story-ugc__stat .bi {
  font-size: 0.65rem;
}

/* ---- Showcase embed tab ---- */
.ps-story-modal__panel--showcase {
  min-height: 200px;
  max-width: 100%;
  overflow-x: hidden;
}

.ps-story-embed {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ps-story-embed__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
}

.ps-story-embed__back,
.ps-story-embed__external {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ps-text-muted);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ps-story-embed__back:hover,
.ps-story-embed__external:hover {
  color: var(--ps-gold-soft);
}

.ps-story-embed__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ps-gold-soft);
}

.ps-story-embed__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  color: var(--ps-text-muted);
}

.ps-story-embed__meta .bi {
  margin-right: 0.3rem;
}

.ps-story-embed__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.ps-story-embed__cat {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-gold);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.12);
}

.ps-story-embed__images {
  margin: 0.25rem 0 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Match UserShowcase detail masonry, constrained inside modal */
.ps-story-embed__masonry {
  width: 100%;
  max-width: 100%;
  column-count: 2;
  column-gap: 1rem;
  column-fill: balance;
  box-sizing: border-box;
}

@media (max-width: 767.98px) {
  .ps-story-embed__masonry {
    column-count: 1;
  }
}

.ps-story-embed__item {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  vertical-align: top;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  box-sizing: border-box;
}

.ps-story-embed__link {
  display: block;
  width: 100%;
  max-width: 100%;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 6px;
}

.ps-story-embed__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--ps-line-soft);
  background: #0a0a0a;
  object-fit: contain;
  object-position: center top;
  transition: border-color 0.25s ease, filter 0.25s ease;
}

.ps-story-embed__link:hover .ps-story-embed__img {
  border-color: rgba(201, 162, 39, 0.45);
  filter: brightness(1.04);
}

.ps-story-embed__desc {
  color: rgba(243, 234, 215, 0.9);
  line-height: 1.7;
  font-size: 0.95rem;
}

.ps-story-embed__desc img {
  max-width: 100%;
  height: auto;
}

.ps-story-embed__desc a {
  color: var(--ps-gold);
}

@media (prefers-reduced-motion: reduce) {
  .ps-story-ugc__card,
  .ps-story-ugc__media img,
  .ps-story-ugc__veil {
    transition: none;
  }

  .ps-story-ugc__card:hover {
    transform: none;
  }

  .ps-story-ugc__card:hover .ps-story-ugc__media img {
    transform: none;
  }
}
