/* ==========================================================================
   FairTech Product Detail Page — premium two-column layout.
   Page-scoped (only product-details.php loads this via $extra_head).
   All classes below are new wrapper/utility classes added around the
   existing markup — no Splide id (#main-carousel etc.), form field, or
   button id/name was renamed, so gallery sync, the fullscreen modal, and
   the add-to-cart POST all keep working unchanged.
   ========================================================================== */

/* ---- Two-column base: lightly refresh the existing #prod-detail-up-con split ---- */

#prod-detail-up-con {
  align-items: flex-start;
}

#prod-detail-up-con .con-left {
  position: sticky;
  top: 24px;
}

@media only screen and (max-width: 835px) {
  #prod-detail-up-con .con-left {
    position: static;
  }
}

/* ---- Gallery: floating 3D presentation ---- */

.ds-gallery-stage {
  position: relative;
  perspective: 1400px;
  margin-bottom: 4px;
}

.ds-gallery-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -14px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.22);
  filter: blur(22px);
  z-index: 0;
  transition: opacity 380ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
              transform 380ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.ds-gallery-main {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg, 20px);
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: var(--shadow-md, 0 10px 28px rgba(15, 23, 42, 0.12));
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition: transform 420ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
              box-shadow 420ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.ds-gallery-main .splide__slide img {
  /* object-fit already set globally by the page's own inline <style> block;
     only add breathing room — never touch object-fit/scale of the image itself */
  padding: 28px;
  box-sizing: border-box;
  background: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .ds-gallery-stage:hover .ds-gallery-main {
    transform: translateY(-4px) scale(1.012);
    box-shadow: var(--shadow-lg, 0 20px 48px rgba(15, 23, 42, 0.16));
  }
  .ds-gallery-stage:hover .ds-gallery-shadow {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-gallery-main,
  .ds-gallery-shadow {
    transition-duration: 1ms;
  }
}

/* ---- Modern thumbnail navigation ---- */

.ds-gallery-thumbs .splide__slide {
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 220ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
              opacity 220ms var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.ds-gallery-thumbs .splide__slide.is-active {
  border-color: var(--mainblue, #0066ff);
}

/* ---- Brand/category eyebrow ---- */

.ds-product-eyebrow {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mainblue, #0066ff);
  margin-bottom: 6px;
}

/* ---- Purchase panel: dark glass matching the sitewide background, CTA
   highly visible via a bright gradient + glow ---- */

.ds-purchase-panel {
  position: relative;
  margin-top: 14px;
  padding: 20px;
  border-radius: var(--radius-lg, 20px);
  background: var(--ds-surface-glass-strong, rgba(18, 27, 48, 0.85));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--ds-border-subtle, rgba(255, 255, 255, 0.08));
  box-shadow: var(--ds-shadow-md, 0 12px 32px rgba(2, 6, 16, 0.45));
}

.ds-purchase-panel .price .current-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--ds-text-primary, #f3f6fc);
}

.ds-purchase-panel .price .old-price {
  color: var(--ds-text-muted, #7c869c);
  border-left-color: var(--ds-border-subtle, rgba(255, 255, 255, 0.12)) !important;
}

.ds-purchase-panel .border-bottom {
  border-color: var(--ds-border-subtle, rgba(255, 255, 255, 0.1)) !important;
}

.ds-purchase-panel .availability {
  font-size: 14px;
  color: var(--ds-text-secondary, #aab4c8);
}

.ds-purchase-panel .top-cart-option {
  background: var(--ds-surface-1, #0d1526);
  color: var(--ds-text-primary, #f3f6fc);
  border-color: var(--ds-border-subtle, rgba(255, 255, 255, 0.16));
}

/* Delivery block sits directly on the dark page (outside the panel) — its
   "#737373" inline-styled labels were calibrated for a white page and read
   too dim on navy now. Inline `style` beats an external rule unless that
   rule is !important, so this needs it. */
#prod-detail-up-con .delivery-item span[style*="737373"] {
  color: var(--ds-text-muted, #7c869c) !important;
}

#top-cart-btn.ds-buy-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  margin-left: 14px;
  border-radius: var(--radius-lg, 20px);
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(180deg, #2f7bff 0%, var(--mainblue, #0066ff) 100%);
  box-shadow: var(--shadow-md, 0 10px 28px rgba(15, 23, 42, 0.12)), 0 0 0 1px rgba(0, 102, 255, 0.25);
}

#top-cart-btn.ds-buy-btn:hover {
  background: linear-gradient(180deg, var(--mainblue, #0066ff) 0%, var(--mainblue-dark, #0052cc) 100%);
}

#top-cart-btn.ds-buy-btn:active {
  transform: translateY(0) scale(0.98);
}

#top-cart-btn.ds-buy-btn .material-symbols-outlined {
  font-size: 20px;
}

.ds-purchase-panel .my-2 form {
  display: flex;
  align-items: center;
}

@media only screen and (max-width: 480px) {
  .ds-purchase-panel .my-2 form {
    flex-wrap: wrap;
    gap: 10px;
  }
  #top-cart-btn.ds-buy-btn {
    margin-left: 0;
    width: 100%;
  }
  .top-cart-option {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #top-cart-btn.ds-buy-btn {
    transition-duration: 1ms;
  }
}
