/* Product detail pages — PortionIQ-inspired PDP layout */

.pdp {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.pdp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}

.pdp-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t);
}

.pdp-breadcrumb a:hover { color: var(--purple); }
.pdp-breadcrumb [aria-current="page"] { color: var(--deep); font-weight: 600; }

/* ── BUY LAYOUT ── */
.pdp-buy {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  margin-bottom: 80px;
}

.pdp-gallery { min-width: 0; }

.pdp-gallery-main {
  margin: 0;
  background: var(--lavender);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s var(--ease);
}

.pdp-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.pdp-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}

.pdp-thumb:hover { border-color: rgba(143,79,239,0.35); }
.pdp-thumb.is-active {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

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

/* ── BUY PANEL ── */
.pdp-panel {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
}

.pdp-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 400;
  color: var(--deep);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.pdp-pack {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

.pdp-lead {
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted);
  margin-bottom: 22px;
}

.pdp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.pdp-stat {
  background: var(--lavender);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.pdp-stat-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.pdp-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pdp-price { margin-bottom: 22px; }

.pdp-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.pdp-price-compare {
  font-size: 16px;
  color: var(--muted-light);
  text-decoration: line-through;
}

.pdp-price-current {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -0.04em;
  line-height: 1;
}

.pdp-price-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--lavender);
  color: var(--purple);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.pdp-price-badge--soon {
  background: rgba(30,13,56,0.08);
  color: var(--deep);
}

.pdp-price-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pdp-purchase { margin-bottom: 20px; }

.pdp-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pdp-qty label {
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
}

.pdp-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: white;
}

.pdp-qty-control button {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--deep);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}

.pdp-qty-control button:hover { background: var(--lavender); color: var(--purple); }
.pdp-qty-control button:disabled { opacity: 0.35; cursor: not-allowed; }

.pdp-qty-control input {
  width: 44px;
  height: 44px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
  font-family: var(--font);
  background: white;
  -moz-appearance: textfield;
}

.pdp-qty-control input::-webkit-outer-spin-button,
.pdp-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pdp-panel-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.pdp-panel-trust li {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--lavender);
  border-radius: var(--radius-full);
  padding: 7px 12px;
}

.pdp-soon-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* ── STORY / BENEFITS ── */
.pdp-story {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 48px);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.pdp-story h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  color: var(--deep);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.pdp-story > p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 24px;
}

.pdp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.pdp-bullets li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.pdp-bullets li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  margin-top: 8px;
}

.pdp-bullets strong { color: var(--deep); font-weight: 600; }

/* ── ACCORDIONS ── */
.pdp-accordions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 72px;
}

.pdp-accordion {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pdp-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
  transition: background var(--t);
}

.pdp-accordion summary::-webkit-details-marker { display: none; }

.pdp-accordion summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--purple);
  line-height: 1;
  flex-shrink: 0;
}

.pdp-accordion[open] summary::after { content: '−'; }

.pdp-accordion summary:hover { background: var(--lavender); }

.pdp-accordion-body {
  padding: 0 22px 22px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.pdp-accordion-body p + p { margin-top: 12px; }

.pdp-accordion-body a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}

.pdp-accordion-body a:hover { text-decoration: underline; }

.pdp-dose-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

.pdp-dose-table th,
.pdp-dose-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pdp-dose-table th {
  font-weight: 700;
  color: var(--deep);
  background: var(--lavender);
}

.pdp-dose-table td:last-child { font-weight: 600; color: var(--deep); }

/* ── MEET THE RANGE ── */
.pdp-range h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  color: var(--deep);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.pdp-range-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pdp-range-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  display: flex;
  flex-direction: column;
}

.pdp-range-card:hover {
  border-color: rgba(143,79,239,0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pdp-range-card-media {
  aspect-ratio: 4 / 5;
  background: #fafafa;
  overflow: hidden;
}

.pdp-range-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.pdp-range-card-body { padding: 18px 18px 20px; flex: 1; }

.pdp-range-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pdp-range-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--deep);
  line-height: 1.25;
}

.pdp-range-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 12px;
}

.pdp-range-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
}

/* Homepage flavour grid (legacy) */
.product-flavors { margin-bottom: 16px; }

.product-flavors h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  color: var(--deep);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.flavor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.flavor-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  display: block;
}

.flavor-card:hover {
  border-color: rgba(143,79,239,0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.flavor-card.is-current { border-color: var(--purple); box-shadow: var(--shadow-sm); }
.flavor-card.is-soon { opacity: 0.92; }

.flavor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.flavor-card h3 { font-size: 16px; font-weight: 700; color: var(--deep); }
.flavor-card p { font-size: 13px; line-height: 1.6; color: var(--muted); }

.flavor-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.flavor-status--live { background: rgba(46,125,90,0.12); color: var(--green); }
.flavor-status--soon { background: rgba(30,13,56,0.08); color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .pdp-buy { grid-template-columns: 1fr; gap: 28px; }
  .pdp-panel { position: static; }
  .pdp-range-grid { grid-template-columns: 1fr; }
  .flavor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pdp { padding: 24px 14px 72px; }
  .pdp-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pdp-stat { padding: 12px 8px; }
  .pdp-stat-val { font-size: 15px; }
  .pdp-story { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-gallery-main img,
  .pdp-range-card,
  .flavor-card { transition: none; }
}
