/* Responsive Story Stage */
.pdp-gallery-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pdp-main-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.pdp-stage-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  padding: 16px;
}
.pdp-stage-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.pdp-stage-video-wrap {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000000;
  z-index: 25;
}
.pdp-stage-video-wrap iframe,
.pdp-stage-video-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
}
.pdp-stage-ctrls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 30;
}
.pdp-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.pdp-ctrl-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.pdp-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 28;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  opacity: 0.85;
}
.pdp-nav-arrow:hover {
  opacity: 1;
  background: var(--surface-2);
  transform: translateY(-50%) scale(1.08);
}
.pdp-nav-prev { left: 12px; }
.pdp-nav-next { right: 12px; }

/* Horizontal Story Bar (Bubbles below gallery) */
.pdp-story-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}
.pdp-story-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.pdp-story-pill:hover,
.pdp-story-pill.active {
  border-color: var(--brand);
  background: var(--surface-2);
  color: var(--ink);
}
.pdp-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--plate);
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.pdp-pill-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Thumbs Strip */
.pdp-thumbs-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}
.pdp-thumb-btn {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm, 10px);
  border: 2px solid var(--line);
  background: var(--plate);
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.pdp-thumb-btn.active,
.pdp-thumb-btn:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.pdp-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pdp-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 9px;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

/* Variation Swatches */
.pdp-variations-box {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pdp-variation-group dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.pdp-variation-group dt strong {
  color: var(--ink);
}
.pdp-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pdp-swatch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pdp-swatch-pill:hover {
  border-color: var(--ink-3);
}
.pdp-swatch-pill.active {
  border-color: var(--brand);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--brand);
}
.pdp-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}
.pdp-swatch-thumb {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

/* PDP Tabs Section */
.pdp-tabs-container {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
}
.pdp-tab-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--plate);
  overflow-x: auto;
}
.pdp-tab-btn {
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.pdp-tab-btn:hover {
  color: var(--ink);
}
.pdp-tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: var(--surface);
}
.pdp-tab-pane {
  display: none;
  padding: 28px;
}
.pdp-tab-pane.active {
  display: block;
}

/* Reviews Section (Instagram Style) */
.pdp-reviews-wrap {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
  padding: 28px;
}
.pdp-reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.pdp-reviews-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.pdp-reviews-rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pdp-reviews-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 680px) {
  .pdp-reviews-wrap {
    padding: 20px 16px;
    margin-top: 28px;
  }
  .pdp-reviews-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .pdp-reviews-title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .pdp-reviews-title-row {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
  }
  .pdp-reviews-title-row .insta-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .pdp-reviews-title-row h3 {
    text-align: center !important;
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }
  .pdp-reviews-rating-row {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px !important;
  }
  .pdp-reviews-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px !important;
  }
  .pdp-reviews-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.8125rem !important;
    padding: 0 10px !important;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  .pdp-reviews-actions {
    flex-direction: column;
  }
  .pdp-reviews-actions .btn {
    width: 100%;
  }
}

.insta-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.pdp-review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pdp-review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.pdp-card-head {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.pdp-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-card-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.pdp-card-media-box {
  height: 220px;
  background: var(--plate);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pdp-card-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pdp-quote-box {
  padding: 24px;
  text-align: center;
}
.pdp-card-actions {
  padding: 10px 14px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pdp-btn-action {
  background: none;
  border: none;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px;
  font-size: 17px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.pdp-btn-action:hover, .pdp-btn-action.liked {
  color: #dc2743;
  transform: scale(1.15);
}
.pdp-card-body {
  padding: 10px 14px 16px;
  flex: 1;
}

/* Fullscreen Media Theater Modal */
.pdp-theater-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 99999;
  display: none;
  flex-direction: column;
}
.pdp-theater-modal.open {
  display: flex;
}
.pdp-theater-head {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.pdp-theater-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}
.pdp-theater-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
}

/* Product Key Highlights (Short Description) */
.pdp-highlights-wrap {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  margin-top: 4px;
}
.pdp-highlights-title {
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pdp-highlights-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}
.pdp-highlights-body ul,
.pdp-highlights-body ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pdp-highlights-body li {
  margin: 0;
  color: var(--ink-2);
}
.pdp-highlights-body li strong,
.pdp-highlights-body li b {
  color: var(--ink);
  font-weight: 650;
}
.pdp-highlights-body p {
  margin: 0 0 8px 0;
}
.pdp-highlights-body p:last-child {
  margin-bottom: 0;
}

/* ── OPTION 2: DYNAMIC SCROLL TOGGLE (4-TAB BAR <-> STICKY BUY BAR) ── */
.MobileBar-module__tnFBRG__bar {
  transition: transform 0.28s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
.MobileBar-module__tnFBRG__bar.pdp-hidden,
body.pdp-sticky-active .MobileBar-module__tnFBRG__bar {
  transform: translateY(100%) !important;
  pointer-events: none !important;
}

.StickyBuy-module__bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 115; /* Equal or higher than mobile bar so swap is flawless */
  box-shadow: var(--shadow-pop);
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  padding: 10px 16px;
}
.StickyBuy-module__bar.active,
body.pdp-sticky-active .StickyBuy-module__bar {
  transform: translateY(0);
  pointer-events: auto;
}
.StickyBuy-module__bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .StickyBuy-module__bar {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) 12px !important;
  }
  .StickyBuy-module__bar .container {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
  }
  .pdp-sticky-desktop-info {
    display: none !important;
  }
  .pdp-sticky-mobile-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    min-width: max-content !important;
  }
  .pdp-sticky-mobile-info .sticky-price-ref {
    font-size: 0.9375rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }
  .pdp-sticky-btns {
    flex: 1 1 0;
    min-width: 0 !important;
    display: flex !important;
    gap: 6px !important;
    justify-content: flex-end;
  }
  .pdp-sticky-btns button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 40px !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    padding: 0 6px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }
  .pdp-sticky-btns button svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 380px) {
  .StickyBuy-module__bar {
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) 8px !important;
  }
  .pdp-sticky-mobile-info {
    gap: 6px !important;
  }
  .pdp-sticky-btns button {
    font-size: 0.75rem !important;
    padding: 0 4px !important;
  }
  .pdp-sticky-btns button svg {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .pdp-sticky-desktop-info {
    display: flex !important;
  }
  .pdp-sticky-mobile-info {
    display: none !important;
  }
}
