/**
 * PDP mobile “What you’ll get” strip + photo viewer.
 * Desktop gallery (.pdp-hero-media) stays as-is. This is ≤1023 only.
 */
.pdp-mobile-photos {
  display: none;
}

@media (max-width: 1023px) {
  /* Visual lock: intro → #plan-picker → this strip. Host is a fold-stack sibling. */
  .pdp-fold-stack > .pdp-intro { order: 1; }
  .pdp-fold-stack > .buy-col { order: 2; }
  .pdp-fold-stack > .pdp-mobile-photos { order: 3; }
  .pdp-mobile-photos:not([hidden]) {
    display: block;
    width: min(100%, var(--hero-widget-stacked-max, 440px));
    max-width: var(--hero-widget-stacked-max, 440px);
    margin: 0 auto;
  }
  .pdp-mobile-photos-title {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft, #5c6b80);
  }
  /* Lock: always one row of 4. Never wrap to 2×2. */
  .pdp-mobile-photos-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 0.4rem;
  }
  .pdp-mobile-photos-item {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line, #dce3ee);
    border-radius: 10px;
    background: #f7f8fb;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .pdp-mobile-photos-item:focus-visible {
    outline: 2px solid var(--blue, #2060f0);
    outline-offset: 2px;
  }
  .pdp-mobile-photos-item img {
    display: block;
    width: 100%;
    height: 64px;
    object-fit: contain;
    object-position: center;
  }
  .pdp-mobile-photos-item span {
    display: block;
    padding: 0.28rem 0.2rem 0.35rem;
    border-top: 1px solid var(--line, #dce3ee);
    background: #fff;
    text-align: center;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--ink-soft, #5c6b80);
  }
}

/* Mid widths (phones-plus → just under desktop): still ONE row of 4.
   Drop the 440 teaser cap so tiles use the content column. Never 2×2. */
@media (min-width: 481px) and (max-width: 1023px) {
  .pdp-mobile-photos:not([hidden]) {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  .pdp-mobile-photos-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 0.55rem;
  }
  .pdp-mobile-photos-item {
    border-radius: 12px;
  }
  .pdp-mobile-photos-item img {
    height: clamp(6.25rem, 14vw, 8.5rem);
  }
  .pdp-mobile-photos-item span {
    padding: 0.38rem 0.28rem 0.42rem;
    font-size: clamp(0.6rem, 1.15vw, 0.72rem);
  }
}

@media (min-width: 1024px) {
  .pdp-mobile-photos,
  .pdp-photo-sheet {
    display: none !important;
  }
}

.pdp-photo-sheet {
  display: none;
}
.pdp-photo-sheet.is-open {
  display: block;
}
.pdp-photo-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(11, 18, 32, 0.5);
}
.pdp-photo-sheet-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 141;
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 760px);
  padding: 0 0 calc(0.7rem + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(11, 18, 32, 0.18);
  transform: translateY(0);
}
.pdp-photo-sheet-panel.is-dragging {
  transition: none;
}
.pdp-photo-sheet-handle {
  width: 2.75rem;
  height: 5px;
  margin: 0.45rem auto 0.15rem;
  border-radius: 999px;
  background: #c5cedd;
}
.pdp-photo-sheet-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.7rem;
}
.pdp-photo-sheet-chrome h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pdp-photo-sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.7rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue, #2060f0);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}
.pdp-photo-sheet-close:hover,
.pdp-photo-sheet-close:focus-visible {
  background: var(--sky, #f2f6fc);
}
.pdp-photo-sheet-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pdp-photo-sheet-track::-webkit-scrollbar {
  display: none;
}
.pdp-photo-sheet-slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 0 0.85rem 0.35rem;
}
.pdp-photo-sheet-well {
  overflow: hidden;
  border: 1px solid var(--line, #dce3ee);
  border-radius: 14px;
  background: #f7f8fb;
}
.pdp-photo-sheet-well img {
  display: block;
  width: 100%;
  height: min(68vw, 22rem);
  object-fit: contain;
  object-position: center;
}
.pdp-photo-sheet-caption {
  margin: 0.55rem 0 0;
  color: var(--ink-soft, #5c6b80);
  font-size: 0.9rem;
  line-height: 1.4;
}
.pdp-photo-sheet-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}
.pdp-photo-sheet-dots button {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c5cedd;
  cursor: pointer;
}
.pdp-photo-sheet-dots button[aria-current="true"] {
  background: var(--blue, #2060f0);
}

body.pdp-photo-open {
  overflow: hidden;
}
body.pdp-photo-open .sticky-cta {
  visibility: hidden;
}
body.pdp-photo-open chat-widget,
body.pdp-photo-open [data-fm-ghl-chat],
body.pdp-photo-open #chat-widget-container,
body.pdp-photo-open #lc_text-widget,
body.pdp-photo-open #lc_text-widget--btn {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .pdp-photo-sheet-track {
    scroll-behavior: auto;
  }
}
