/* ==========================================================================
   Single Product Details Page — Edge Pharma
   The nav, footer, Contact CTA strip, and Product Card are all shared
   components (see css/layout/footer.css, css/components/contact-strip.css,
   css/components/product-card.css). This file covers what's unique to
   this page: the static Product Hero banner, the Gallery + Info layout,
   Specifications, Overview, and the Related Products shell.
   ========================================================================== */

/* ==========================================================================
   Product Hero — static banner (no carousel)
   Reuses .hero__label / .hero__title / .hero__subtitle / .hero__actions
   from css/components/hero.css for identical typography — only the
   banner shell (media, overlay, min-height) is new.
   ========================================================================== */

.product-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.product-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.product-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 8, 40, 0.82) 0%, rgba(2, 8, 40, 0.55) 55%, rgba(2, 8, 40, 0.4) 100%);
}

.product-hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-10);
}

/* The reused .hero__label/__title/__subtitle/__actions (css/components/
   hero.css) start hidden and only fade in once a Swiper ancestor gets
   `.swiper-slide-active` — this banner has no carousel, so reveal them
   unconditionally. */
.product-hero .hero__label,
.product-hero .hero__title,
.product-hero .hero__subtitle,
.product-hero .hero__actions {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Product Details — Gallery + Information
   ========================================================================== */

.product-details {
  background-color: var(--color-white);
  padding-block: var(--space-12); /* 80px mobile base */
}

.product-details__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* ---------------------------------------------------------------------
   Product Gallery
   --------------------------------------------------------------------- */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.product-gallery__main {
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sharp);
  overflow: hidden;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.product-gallery__main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.product-gallery__thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sharp);
  overflow: hidden;
  background-color: var(--color-surface);
  cursor: pointer;
  transition: border-color 200ms var(--ease-default), box-shadow 200ms var(--ease-default);
}

.product-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumb:hover {
  border-color: var(--color-primary);
}

.product-gallery__thumb.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 94, 168, 0.15);
}

.product-gallery__thumb:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Product Information
   --------------------------------------------------------------------- */

.product-info {
  display: flex;
  flex-direction: column;
}

.product-info__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 14px;
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.product-info__title {
  margin-top: var(--space-4);
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); /* 28px → 40px */
  line-height: 1.15;
  color: var(--color-text-primary);
}

.product-info__desc {
  margin-top: var(--space-4);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------------
   Product Specifications — two-column rows
   --------------------------------------------------------------------- */

.product-specs {
  margin-top: var(--space-7);
  border-top: 1px solid var(--color-border);
}

.product-specs__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.product-specs__row dt {
  margin: 0;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
}

.product-specs__row dd {
  margin: 0;
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  text-align: right;
}

/* ---------------------------------------------------------------------
   Product Overview
   --------------------------------------------------------------------- */

.product-overview {
  margin-top: var(--space-8);
}

.product-overview__heading {
  font-size: var(--fs-h4);
}

.product-overview p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}

.product-overview p + p {
  margin-top: var(--space-4);
}

.product-overview__heading + p {
  margin-top: var(--space-4);
}

/* ---------------------------------------------------------------------
   Primary Actions
   --------------------------------------------------------------------- */

.product-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* ---------------------------------------------------------------------
   Scroll animation — fade up
   --------------------------------------------------------------------- */

.product-details__grid {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-default), transform 600ms var(--ease-default);
}

.product-details.is-visible .product-details__grid {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .product-details__grid {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Tablet (≥768px)
   --------------------------------------------------------------------- */

@media (min-width: 768px) {
  .product-gallery__thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
  }
}

/* ---------------------------------------------------------------------
   Desktop (≥992px) — two-column 50/50 layout, 80px gap
   --------------------------------------------------------------------- */

@media (min-width: 992px) {
  .product-details {
    padding-block: var(--space-14); /* 120px */
  }

  .product-details__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12); /* 80px */
    align-items: start;
  }

  .product-gallery__thumbs {
    overflow-x: visible;
  }

  .product-gallery__thumb {
    flex: 1 1 0;
    width: auto;
    height: auto;
  }
}

/* ==========================================================================
   Related Products
   ========================================================================== */

.related-products {
  background-color: var(--color-surface);
  padding-block: var(--space-12); /* 80px mobile base */
}

.related-products__heading {
  text-align: center;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); /* 28px → 40px */
}

.related-products__list {
  margin-top: var(--space-10);
  gap: var(--space-7); /* 32px */
}

.related-products__heading,
.related-products__list {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-default), transform 600ms var(--ease-default);
}

.related-products.is-visible .related-products__heading { transition-delay: 0ms; }
.related-products.is-visible .related-products__list { transition-delay: 120ms; }

.related-products.is-visible .related-products__heading,
.related-products.is-visible .related-products__list {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .related-products__heading,
  .related-products__list {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 992px) {
  .related-products {
    padding-block: var(--space-14); /* 120px */
  }
}
