/**
 * TSC PDP — large frame, overlay panel, thumbs on image (desktop XL)
 */

.page-product {
  background: #fef9eb;
  --pdp-frame-h: min(97vh, 1140px);
  --pdp-thumb-w: 108px;
  --pdp-thumb-h: 82px;
  --pdp-thumb-gap: 14px;
  --pdp-thumb-strip-max: 780px;
  --pdp-zoom-bottom: 0;
  --pdp-panel-w: 410px;
}

.pdp-tsc {
  padding: 0 0 20px;
  background: #fef9eb;
}

.pdp-tsc .container-pdp {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.pdp-breadcrumb--desktop {
  padding: 18px 0 14px;
  font-size: 14px;
  color: #64748b;
}

.pdp-hero-shell {
  position: relative;
  background: transparent;
  margin: 0;
  width: 100%;
  padding: 0 0 8px;
}

.pdp-showcase {
  margin-bottom: 0;
}

/* Hide removed controls */
.page-product .pdp-hero-nav,
.page-product .pdp-float-actions,
.page-product .floating-actions {
  display: none !important;
}

@media (min-width: 992px) {
  .pdp-hero-shell {
    position: relative;
    z-index: 5;
    padding-bottom: 24px;
  }

  .pdp-tsc-main.product-showcase-wrapper {
    display: block;
    max-width: 100%;
  }

  .pdp-gallery-col {
    width: 100%;
  }

  /* Main frame — TSC-scale hero (desktop only) */
  .pdp-main-frame.image-showcase,
  .pdp-gallery-frame.pdp-main-frame {
    position: relative;
    width: 100%;
    min-height: var(--pdp-frame-h);
    height: var(--pdp-frame-h);
    max-height: var(--pdp-frame-h);
    margin: 0;
    padding: 0;
    border-radius: 28px;
    background: transparent !important;
    box-shadow: none;
    overflow: visible;
  }

  .pdp-gallery-stage {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    overflow: hidden;
    background: #fef9eb !important;
    box-shadow: none;
  }

  .pdp-zoom-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px 80px;
    background: #fef9eb !important;
  }

  .pdp-main-img,
  .main-product-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    margin: 0;
    transform: none !important;
    border-radius: 12px;
  }

  /* Thumb strip — larger TSC-style scroller on main image */
  .pdp-thumbs-on-image.pdp-thumbs-grid {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 22px;
    z-index: 12;
    display: block;
    width: auto;
    max-width: min(var(--pdp-thumb-strip-max), calc(100% - var(--pdp-panel-w) - 64px));
    min-width: min(320px, 92%);
    transform: translateX(-50%);
    padding: 14px 18px;
    /* background: rgba(255, 255, 255, 0.97); */
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(74, 63, 26, 0.12);
    pointer-events: auto;
    box-sizing: border-box;
  }

  .pdp-thumb-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--pdp-thumb-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 6px;
  }

  .pdp-thumb-grid::-webkit-scrollbar {
    display: none;
  }

  .pdp-thumb {
    flex: 0 0 var(--pdp-thumb-w);
    width: var(--pdp-thumb-w);
    height: var(--pdp-thumb-h);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    overflow: hidden;
    padding: 0;
    background: #e2e8f0;
    box-shadow: 0 3px 10px rgba(74, 63, 26, 0.14);
    cursor: pointer;
  }

  .pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pdp-thumb.is-active {
    border-color: #5c4f20;
    box-shadow: 0 0 0 3px #5c4f20;
  }

  .pdp-thumb-video {
    font-size: 1.35rem;
  }

  /* Details panel — starts lower, lifts into frame on scroll */
  .pdp-buy-col--overlay {
    position: absolute;
    top: 108px;
    right: 28px;
    width: min(var(--pdp-panel-w), 34vw);
    max-width: var(--pdp-panel-w);
    margin: 0;
    padding: 0;
    z-index: 10;
    pointer-events: none;
    transition: transform 0.12s ease-out;
    will-change: transform;
  }

  .pdp-buy-col--overlay .pdp-buy-scroll {
    pointer-events: auto;
    max-height: calc(var(--pdp-frame-h) - 120px);
    min-height: 420px;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(74, 63, 26, 0.18);
    background: linear-gradient(165deg, #fffef8 0%, #ffffff 42%, #fff9ee 100%);
    overflow-x: hidden;
    overflow-y: auto;
    display: block;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .pdp-buy-col--overlay .pdp-buy-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .pdp-highlights-bar--in-scroll {
    border-radius: 22px 22px 0 0;
    padding: 10px 8px;
    margin: 0 -18px 0;
    position: static !important;
    top: auto !important;
    background: #4a3f1a;
  }

  .pdp-highlights-bar--in-scroll .pdp-highlight-l1 {
    font-size: 0.65rem;
  }

  .pdp-highlights-bar--in-scroll .pdp-highlight-l2 {
    font-size: 0.6rem;
  }

  .pdp-highlights-bar--in-scroll .pdp-highlight-icon .pdp-ico svg {
    stroke: #5c4f20;
    width: 22px;
    height: 22px;
  }

  .pdp-buy-body {
    overflow: visible;
    padding: 0 18px 22px;
  }

  .pdp-highlights-bar--in-scroll + .pdp-title-row {
    padding-top: 14px;
  }

  .pdp-highlights-gold + .pdp-title-row {
    margin-top: 16px;
    padding-top: 2px;
  }

  .pdp-buy-body:has(.pdp-highlights-gold) {
    padding-top: 0;
  }
}

/* Extra-large desktops — match TSC full-bleed hero scale */
@media (min-width: 1400px) {
  .page-product {
    --pdp-frame-h: min(98vh, 1240px);
    --pdp-thumb-w: 118px;
    --pdp-thumb-h: 88px;
    --pdp-thumb-gap: 14px;
    --pdp-thumb-strip-max: 860px;
    --pdp-zoom-bottom: 132px;
    --pdp-panel-w: 420px;
  }

  .pdp-tsc .container-pdp {
    max-width: 1760px;
    padding: 0 40px;
  }
}

/* Panel content polish */
@media (min-width: 992px) {
  .pdp-title {
    font-size: 1.42rem;
  }

  .pdp-rating-pill {
    font-size: 13px;
    padding: 6px 14px;
  }

  .pdp-price-current {
    font-size: 1.85rem;
  }

  .pdp-btn-store--full {
    font-size: 15px;
    padding: 15px 22px;
  }

  .pdp-highlights-bar--in-scroll .pdp-highlight-l1 {
    font-size: 0.72rem;
  }

  .pdp-highlights-bar--in-scroll .pdp-highlight-l2 {
    font-size: 0.66rem;
  }
}

.pdp-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: #5c4f20;
  line-height: 1.3;
  margin: 0 0 8px;
}

.pdp-rating-pill {
  background: #fef8ea;
  border: 1px solid #f5e6b8;
  color: #5c4f20;
  font-size: 12px;
  padding: 5px 12px;
  margin-bottom: 12px;
}

.pdp-icon-strip {
  margin: 0 -18px 14px;
  padding: 12px 10px;
  background: #fef8ea;
}

.pdp-price-current {
  font-size: 1.65rem;
  font-weight: 800;
  color: #5c4f20;
}

.pdp-btn-store--full {
  border-radius: 999px;
  background: #d32f2f;
  font-size: 14px;
  padding: 14px 20px;
  margin: 10px 0;
}

.pdp-cta-row--dual {
  gap: 10px;
  margin-bottom: 14px;
}

.pdp-btn-outline--red {
  border-radius: 999px;
  font-size: 13px;
  padding: 12px 14px;
}

.pdp-qty-cart {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}

.pdp-qty {
  grid-row: span 2;
  align-self: center;
}

.pdp-btn-cart,
.pdp-btn-buy {
  border-radius: 999px;
  font-size: 12px;
  padding: 12px 10px;
}

.pdp-btn-buy {
  grid-column: 2;
}

.pdp-panel-banner-wrap {
  margin: 16px 0 4px;
}

.pdp-panel-banner {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 4px 16px rgba(74, 63, 26, 0.08);
}

.pdp-panel-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.pdp-below-hero {
  background: #fff;
  padding: 8px 0 48px;
  position: relative;
  z-index: 1;
}

/* Override legacy product-tsc sticky/split layout */
@media (min-width: 992px) {
  .page-product .image-showcase.pdp-main-frame {
    position: relative !important;
    top: auto !important;
    margin-right: 0 !important;
    background: transparent !important;
    height: var(--pdp-frame-h) !important;
    max-height: var(--pdp-frame-h) !important;
    min-height: var(--pdp-frame-h) !important;
  }

  .page-product .pdp-buy-col,
  .page-product .pdp-buy-col--overlay {
    position: absolute !important;
    top: 108px !important;
    margin-left: 0 !important;
    align-self: auto !important;
    width: min(var(--pdp-panel-w), 34vw) !important;
    max-width: var(--pdp-panel-w) !important;
  }

  .page-product .pdp-buy-scroll,
  .page-product .product-details-panel {
    position: relative !important;
    top: auto !important;
    max-height: calc(var(--pdp-frame-h) - 120px) !important;
    height: auto !important;
  }

  .page-product .pdp-buy-body {
    overflow: visible !important;
    max-height: none !important;
  }

  .page-product .pdp-hero-shell {
    background: transparent !important;
  }

  .page-product .main-product-image,
  .page-product .pdp-main-img {
    transform: none !important;
  }

  .page-product .pdp-zoom-stage {
    bottom: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #fef9eb !important;
    padding: 10px 14px 80px !important;
    cursor: pointer;
  }

  .page-product .pdp-gallery-frame,
  .page-product .pdp-gallery-frame.image-showcase,
  .page-product .pdp-main-frame {
    background: #fef9eb !important;
    box-shadow: none !important;
  }

  .page-product .pdp-gallery-stage {
    background: #fef9eb !important;
  }

  .page-product .pdp-action-buttons .pdp-btn-buy {
    width: auto !important;
    margin-top: 0 !important;
  }

  .page-product .pdp-action-buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
  }
}

/* Mobile gallery layout — see product-tsc-mobile.css */
