/* =====================================================================================================
   v3-c-pdp.css — the full product / pack detail page (accepted DG-FULL-PRODUCT-PACK-PDP-DESIGN-09A §6).
   DG-PRODUCT-PACK-EXPERIENCE-RUNTIME-10.

   One page system for both first-class routes: a white hero panel [gallery | identity + buy box + trust],
   a pinned section navigation, then full-width calm content bands (heading column + max 72ch content) and
   the completion strip. The superseded right-column `.d-pdp-*` layout was deleted with its markup.
   Single-class selectors; JS hooks stay data-* / ids and are never used for styling.
   ===================================================================================================== */

.c-pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(16px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--d-c-shadow-card);
}

.c-pdp-gallery {
  position: sticky;
  top: calc(var(--v2-anchor-offset, calc(var(--chrome-top, 0px) + 12px)) + 4px);
  display: grid;
  gap: 10px;
  min-width: 0;
}

.c-pdp-gallery__main {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.c-pdp-gallery__main img {
  /* CORRECTION-11: the whole asset always fits (no crop on any browser or geometry). The image fills the frame
     absolutely — no percentage height inside a grid cell, which Safari resolves to the intrinsic height — and
     `contain` keeps tall canisters, wide packs and the fallback art complete; the padding keeps the calm margin. */
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 7%;
  object-fit: contain;
  object-position: center;
}

.c-pdp-jump,
.c-pill-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--d-c-line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.c-pdp-jump:hover,
.c-pill-link:hover {
  border-color: var(--green);
}

.c-pdp-jump .ico,
.c-pill-link .ico {
  width: 15px;
  height: 15px;
}

.c-pdp-id {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.c-pdp-id > * {
  margin: 0;
}

.c-pdp-eyebrow,
.c-band__eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.c-pdp-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.c-pdp-variant {
  margin-top: -6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.c-pdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.c-pdp-meta li {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 700;
}

.c-pdp-intro {
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.5;
  color: #25302a;
}

.c-pdp-buy {
  display: grid;
  gap: 16px;
  margin-top: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--d-c-quiet);
  scroll-margin-top: calc(var(--v2-anchor-offset, 0px) + var(--d-c-secnav-h) + 8px);
}

.c-pdp-buy > * {
  margin: 0;
}

.c-pdp-price {
  display: grid;
  gap: 2px;
}

.c-pdp-price__label {
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.c-pdp-price__meta {
  font-size: 13px;
  color: var(--muted);
}

.c-pdp-form {
  display: grid;
  gap: 16px;
  margin: 0;
}

.c-pdp-buyrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.c-pdp-buyrow .qstep {
  flex: none;
}

.c-pdp-add {
  flex: 1 1 200px;
  justify-content: center;
  min-height: 48px;
}

.c-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--d-c-ink-2);
}

.c-trust li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.c-trust .ico {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--green-dark);
}

/* ---------- pinned section navigation ---------- */
.c-secnav {
  position: sticky;
  top: calc(var(--v2-anchor-offset, calc(var(--chrome-top, 0px) + 12px)) - 14px);
  z-index: 20;
  margin-top: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 244, 240, 0.96);
  box-shadow: 0 0 0 100vmax rgba(243, 244, 240, 0.96);
  clip-path: inset(0 -100vmax);
}

.c-secnav__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--d-c-secnav-h);
}

.c-secnav__list {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.c-secnav__list::-webkit-scrollbar {
  display: none;
}

.c-secnav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--d-c-ink-2);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.c-secnav__link:hover {
  background: #fff;
}

.c-secnav__link[aria-current="true"] {
  background: var(--ink);
  color: #fff;
}

.c-secnav__link:focus-visible {
  outline: none;
  box-shadow: var(--d-c-focus);
}

/* ---------- content bands ---------- */
.c-band {
  padding: var(--d-c-band-space) 0;
  scroll-margin-top: calc(var(--d-c-secnav-h) + 8px);
}

/* alternate calm white bands, full-bleed behind the page container */
.c-band:nth-of-type(odd) {
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
}

.c-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 8.8fr);
  gap: clamp(18px, 3vw, 48px);
}

.c-band__stack {
  display: grid;
  gap: 18px;
}

.c-band__head {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 6px;
  position: sticky;
  top: calc(var(--v2-anchor-offset, calc(var(--chrome-top, 0px) + 12px)) + var(--d-c-secnav-h) + 8px);
}

.c-band__stack > .c-band__head {
  position: static;
}

.c-band__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.c-band__lede {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* DG-FLAVOUR-ERROR-HERO-MICRO-POLISH-31A (Mark): body copy 15px (was 16px); headings, line-height and links unchanged. */
.c-prose {
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.65;
  color: #25302a;
}

.c-prose > :first-child {
  margin-top: 0;
}

.c-prose p {
  margin: 0 0 12px;
}

.c-prose h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.c-prose ul,
.c-prose ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.c-prose li {
  margin: 4px 0;
}

.c-ticks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-ticks li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.c-ticks li::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 14px;
}

.c-pdp-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.c-pdp-labels__item[hidden],
.c-pdp-labels__none[hidden] {
  display: none;
}

.c-pdp-labels__none {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.c-pdp-back {
  margin: 24px 0 0;
}

.c-pdp-back__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.c-pdp-back__link:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .c-trust {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .c-pdp-hero {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 22px;
  }

  .c-pdp-gallery {
    position: static;
  }

  .c-pdp-gallery__main {
    width: 100%;
    max-height: 46vh;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
  }

  .c-band__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .c-band__head {
    position: static;
  }

  .c-ticks {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ≤560px #main renders at zoom .9 (v3-mobile-compact.css, CORRECTION-11A): targets use 48px CSS (≈43px on screen),
   and the sticky offsets are divided by the zoom so the navigation sits exactly under the sticky header stack. */
@media (max-width: 560px) {
  .c-pdp-hero {
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
  }

  .c-pdp-gallery__main {
    max-height: 38vh;
    aspect-ratio: 5 / 4;
    border-radius: 16px;
  }

  /* the clamped 4th line would otherwise show through the 10px bottom padding (overflow clips at the padding box) */
  .c-pdp-intro {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    clip-path: inset(10px 0);
  }

  .c-pdp-buy {
    padding: 14px;
    border-radius: 16px;
  }

  .c-secnav {
    top: calc((var(--v2-anchor-offset, calc(var(--chrome-top, 0px) + 12px)) - 14px) / 0.95);
  }

  .c-secnav__link,
  .c-pdp-jump,
  .c-pill-link,
  .c-pdp-back__link {
    min-height: 48px;
  }

  .c-pdp-add {
    min-height: 52px;
  }

  .c-pdp-buyrow .qs-btn {
    min-width: 48px;
    min-height: 48px;
  }
}

/* phones: long rich pack copy folds every H3 after the first (v3-pdp-sections.js; content stays in the DOM) */
.c-prose-fold {
  border-top: 1px solid var(--line);
}

.c-prose-fold > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  list-style: none;
  cursor: pointer;
}

.c-prose-fold > summary::-webkit-details-marker {
  display: none;
}

.c-prose-fold > summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--green-dark);
}

.c-prose-fold[open] > summary::after {
  content: "\2212";
}

.c-prose-fold > summary h3 {
  margin: 0;
  font-size: 16px;
}

.c-prose-fold > div {
  padding: 0 0 14px;
}

/* DG-MOBILE-STOREFRONT-POLISH-20 (Mark) — product & programme pages. The trust strip and the band eyebrows are
   hidden at every width; on phones the section navigation is hidden and the hero keeps a 20px gap below it. */
.c-trust,
.c-band__eyebrow {
  display: none;
}

@media (max-width: 720px) {
  .c-secnav {
    display: none;
  }

  .c-pdp-hero {
    margin-bottom: 20px;
  }
}

/* DG-MOBILE-STOREFRONT-POLISH-20B (Mark) — phones: the main gallery image fills its frame without inner padding and
   the in-page jump links are hidden. */
@media (max-width: 720px) {
  .c-pdp-gallery__main img {
    padding: 0;
  }

  .c-pdp-jump {
    display: none;
  }
}
