/* ==========================================================================
   Product detail pages — premium QR-first redesign
   ========================================================================== */

body.product-page {
  --header-height: 82px;
  --product-accent: #0B3D91;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body.product-page .site-header.product-detail-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11, 61, 145, 0.07);
  box-shadow: none;
}

body.product-page .site-header.product-detail-header.is-scrolled {
  box-shadow: 0 8px 28px rgba(11, 61, 145, 0.08);
}

body.product-page .site-header__inner {
  height: var(--header-height);
}

body.product-page .site-header .logo__img,
body.product-page .site-header .site-logo img {
  height: 56px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}

body.product-page .product-detail-container {
  width: min(calc(100% - 48px), 1180px);
  margin-inline: auto;
}

body.product-page .product-detail {
  padding: 56px 0 0;
}

body.product-page .product-detail__top {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  grid-template-areas:
    "media breadcrumb"
    "media summary";
  gap: 20px 64px;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 8px;
}

body.product-page .product-detail__breadcrumb {
  grid-area: breadcrumb;
  margin: 0;
  font-size: 14px;
  color: #777;
  align-self: end;
}

body.product-page .product-detail__breadcrumb a {
  color: #777;
  text-decoration: none;
}

body.product-page .product-detail__breadcrumb a:hover {
  color: #0B3D91;
}

body.product-page .breadcrumb__sep {
  margin: 0 8px;
  color: #B0B7C3;
}

body.product-page .product-detail__media {
  grid-area: media;
}

body.product-page .product-detail__summary {
  grid-area: summary;
  align-self: center;
}

body.product-page .product-detail__image-wrap {
  position: relative;
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F8 100%);
  border: 1px solid rgba(11, 61, 145, 0.08);
  border-radius: 22px;
  min-height: 510px;
  max-height: none;
  aspect-ratio: auto;
  max-width: none;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}

body.product-page .product-detail__image-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--product-accent);
}

body.product-page .product-detail__image-wrap img {
  max-height: 455px;
  max-width: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.15));
}

body.product-page .product-detail__accent-line {
  display: block;
  width: 42px;
  height: 3px;
  background: var(--product-accent);
  border-radius: 2px;
  margin-bottom: 16px;
}

body.product-page .product-detail__name {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: #0B3D91;
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

body.product-page .product-detail__short {
  font-family: "Roboto", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: #555;
  max-width: 580px;
  margin: 0 0 24px;
}

body.product-page .package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 24px;
  padding: 0;
  background: #F7F9FA;
  border: 1px solid rgba(11, 61, 145, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

body.product-page .package-grid__item {
  padding: 18px 20px;
  border-right: 1px solid rgba(11, 61, 145, 0.07);
  border-bottom: 1px solid rgba(11, 61, 145, 0.07);
  gap: 6px;
}

body.product-page .package-grid__item:nth-child(3n) {
  border-right: none;
}

body.product-page .package-grid__item:nth-last-child(-n + 3) {
  border-bottom: none;
}

body.product-page .package-grid__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #777;
}

body.product-page .package-grid__value {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.4;
  user-select: text;
}

body.product-page .product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-direction: row;
}

body.product-page .product-actions .button {
  height: 48px;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 22px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  flex: 0 1 auto;
}

body.product-page .product-actions .button-secondary {
  background: transparent;
  color: #0B3D91;
  border: 1.5px solid rgba(11, 61, 145, 0.28);
}

body.product-page .product-actions .button-secondary:hover {
  background: #F7FAFD;
  border-color: #0B3D91;
}

body.product-page .product-caution-stack {
  display: grid;
  gap: 14px;
  margin: 8px 0 24px;
}

body.product-page .product-caution-box {
  background: #FFF8E6;
  border: 1px solid rgba(212, 160, 23, 0.35);
  border-left: 4px solid #D4A017;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 0;
}

body.product-page .product-caution-box h2 {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8A6410;
  margin: 0 0 10px;
}

body.product-page .product-caution-box p,
body.product-page .product-caution-box ul,
body.product-page .product-caution-box li {
  font-size: 15px;
  line-height: 1.75;
  color: #5A4A20;
}

body.product-page .product-caution-box ul {
  margin: 0;
  padding-left: 18px;
}

body.product-page .product-caution-box--global {
  background: #F4F7FA;
  border: none;
  border-left: none;
  border-radius: 10px;
  padding: 18px 22px;
}

body.product-page .product-caution-box--global h2 {
  font-size: 13px;
  color: #6B7280;
  letter-spacing: 0.04em;
}

body.product-page .product-caution-box--global p {
  font-size: 14px;
  line-height: 1.7;
  color: #6B7280;
}

body.product-page .product-accordion.accordion {
  margin-top: 28px;
  margin-bottom: 0;
  border: 1px solid rgba(11, 61, 145, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
}

body.product-page .accordion__item {
  border-bottom: 1px solid rgba(11, 61, 145, 0.08);
}

body.product-page .accordion__item:last-child {
  border-bottom: none;
}

body.product-page .accordion__trigger {
  min-height: 62px;
  padding: 0 22px;
  background: #FFFFFF;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #0B3D91;
  border: none;
  transition: background 0.2s ease;
}

body.product-page .accordion__trigger:hover {
  background: #F8FAFC;
}

body.product-page .accordion__trigger[aria-expanded="true"] {
  background: #F7FAFD;
}

body.product-page .accordion__icon {
  width: 20px;
  height: 20px;
  color: #0B3D91;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body.product-page .accordion__icon::before,
body.product-page .accordion__icon::after {
  display: none;
}

body.product-page .accordion__icon svg {
  display: block;
}

body.product-page .accordion__trigger[aria-expanded="true"] .accordion__icon-v {
  opacity: 0;
}

body.product-page .accordion__panel {
  display: none;
  padding: 0 22px 24px;
  background: #F7FAFD;
}

body.product-page .accordion__panel.is-open {
  display: block;
  animation: product-panel-in 0.22s ease;
}

@keyframes product-panel-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body.product-page .accordion__panel.is-open {
    animation: none;
  }

  body.product-page .related-grid .product-card,
  body.product-page .related-grid .product-card__image img {
    transition: none;
  }
}

body.product-page .accordion__panel p,
body.product-page .accordion__panel li {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #4F5660;
}

body.product-page .related-products {
  margin-top: 72px;
  padding: 72px 0 80px;
}

body.product-page .related-products__title {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #0B3D91;
  text-align: center;
  margin: 0 0 36px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.product-page .related-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  justify-content: center;
}

body.product-page .related-grid .product-card--compact {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(11, 61, 145, 0.08);
  border-top: 3px solid var(--product-accent, #0B3D91);
  box-shadow: 0 10px 28px rgba(11, 61, 145, 0.06);
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.product-page .related-grid .product-card--compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(11, 61, 145, 0.1);
}

body.product-page .related-grid .product-card__image {
  height: 210px;
  background: #F7F9FA;
  border-bottom: 1px solid rgba(11, 61, 145, 0.05);
}

body.product-page .related-grid .product-card__image img {
  max-height: 185px;
  height: auto;
  max-width: 78%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

body.product-page .related-grid .product-card--compact:hover .product-card__image img {
  transform: scale(1.035);
}

body.product-page .related-grid .product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
  gap: 8px;
}

body.product-page .related-grid .product-card__name {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0B3D91;
  margin: 0;
}

body.product-page .related-grid .product-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
  color: #666;
  margin: 0;
}

body.product-page .related-grid .text-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
}

body.product-page .product-card--royal-heat-tonic { --product-accent: #A82020; }
body.product-page .product-card--sport-energy { --product-accent: #E39B15; }
body.product-page .product-card--deep-sleep { --product-accent: #34368D; }
body.product-page .product-card--sugar-balance { --product-accent: #1E6F3D; }
body.product-page .product-card--pure-detox-moringa { --product-accent: #168447; }
body.product-page .product-card--morning-energy { --product-accent: #4A9B3E; }

body.product-page .footer-logo,
body.product-page .footer-logo-wrap,
body.product-page .logo--footer {
  padding: 6px 10px;
  border-radius: 8px;
}

body.product-page .footer-logo img,
body.product-page .logo--footer .logo__img {
  height: 72px;
  max-width: 180px;
}

@media (max-width: 1200px) {
  body.product-page .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 920px;
    margin-inline: auto;
  }
}

@media (max-width: 992px) {
  body.product-page .product-detail__top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "breadcrumb"
      "media"
      "summary";
    gap: 20px;
  }

  body.product-page .product-detail__image-wrap {
    min-height: 420px;
  }

  body.product-page .product-detail__name {
    font-size: 36px;
  }

  body.product-page .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.product-page .package-grid__item:nth-child(3n) {
    border-right: 1px solid rgba(11, 61, 145, 0.07);
  }

  body.product-page .package-grid__item:nth-child(2n) {
    border-right: none;
  }

  body.product-page .package-grid__item:nth-last-child(-n + 3) {
    border-bottom: 1px solid rgba(11, 61, 145, 0.07);
  }

  body.product-page .package-grid__item:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  body.product-page .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  body.product-page {
    --header-height: 70px;
  }

  body.product-page .site-header.product-detail-header,
  body.product-page .site-header__inner {
    height: 70px;
  }

  body.product-page .site-header .logo__img,
  body.product-page .site-header .site-logo img {
    height: 48px;
    max-width: 140px;
  }

  body.product-page .product-detail {
    padding: 24px 0 0;
  }

  body.product-page .product-detail-container {
    width: min(calc(100% - 32px), 1180px);
  }

  body.product-page .product-detail__top {
    gap: 16px;
    margin-bottom: 20px;
  }

  body.product-page .product-detail__image-wrap {
    min-height: 360px;
    padding: 20px;
    border-radius: 18px;
  }

  body.product-page .product-detail__image-wrap img {
    max-height: 330px;
    max-width: 92%;
  }

  body.product-page .product-detail__name {
    font-size: 32px;
  }

  body.product-page .product-detail__short {
    font-size: 16px;
  }

  body.product-page .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.product-page .product-actions {
    flex-direction: column;
  }

  body.product-page .product-actions .button {
    width: 100%;
  }

  body.product-page .accordion__trigger {
    min-height: 56px;
    padding: 0 18px;
  }

  body.product-page .accordion__panel {
    padding: 0 18px 20px;
  }

  body.product-page .related-products {
    margin-top: 48px;
    padding: 48px 0 56px;
  }

  body.product-page .related-products__title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  body.product-page .related-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.product-page .product-caution-box {
    padding: 18px;
  }
}
