/* ==========================================================================
   UNDERGROUND COFFEE — Product Detail Page · monochrome editorial
   Plain CSS (no build step). Loaded only on templates/product.jinja.

   Palette (strict): #FFFFFF · #000000 · #111111 · #F5F5F5 · #8A8A8A · #E5E5E5
   plus #6B6B6B for small text (AA on white) and #333 for long-form body.
   One label voice (small caps, wide tracking). One grid: label | content (3 / 9).
   RTL: logical properties only, so Arabic mirrors without a second stylesheet.
   ========================================================================== */

.pdp {
  --pad: var(--uc-pad, clamp(16px, 3.2vw, 56px));
  --stick: 72px; /* sticky offset — measured from the real header by pdp.js */
  --ink: #111111;
  --line: #e5e5e5;
  --mute: #6b6b6b;
  --soft: #8a8a8a;
  --plate: #f5f5f5;
  --body: #333333;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color: var(--ink);
  background: #fff;
  font-feature-settings:
    "tnum" 1,
    "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.pdp *,
.pdp *::before,
.pdp *::after {
  box-sizing: border-box;
}

.pdp-wrap {
  width: 100%;
  max-width: var(--uc-container, 1728px);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.pdp [hidden],
.pdp .hidden {
  display: none !important;
}

.pdp :focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.pdp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- The one label voice -------------------------------------------- */

.pdp-label,
.pdp-notes__label,
.pdp-ledger dt,
.pdp-fact dt,
.pdp-options .product-options__label,
.pdp-share > span {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pdp-label {
  color: var(--ink);
}
.pdp-notes__label,
.pdp-ledger dt,
.pdp-fact dt,
.pdp-options .product-options__label,
.pdp-share > span {
  color: var(--mute);
}
[lang="ar"] .pdp-label,
[lang="ar"] .pdp-notes__label,
[lang="ar"] .pdp-ledger dt,
[lang="ar"] .pdp-fact dt,
[lang="ar"] .pdp-options .product-options__label,
[lang="ar"] .pdp-share > span,
[lang="ar"] .pdp-meta,
[lang="ar"] .pdp-tags,
[lang="ar"] .pdp-price__off,
[lang="ar"] .pdp-cta,
[lang="ar"] .pdp-btn,
[lang="ar"] .pdp-brand {
  letter-spacing: 0;
  text-transform: none;
}
[lang="ar"] .pdp-label,
[lang="ar"] .pdp-notes__label,
[lang="ar"] .pdp-ledger dt,
[lang="ar"] .pdp-fact dt,
[lang="ar"] .pdp-options .product-options__label,
[lang="ar"] .pdp-share > span {
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Meta row -------------------------------------------------------- */

.pdp-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px 22px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.pdp-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pdp-crumbs li {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.pdp-crumbs li:not(:last-child)::after {
  content: "/";
  color: var(--soft);
}
.pdp-crumbs li[aria-current] span {
  color: var(--ink);
  display: inline-block;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.pdp-crumbs a,
.pdp-share a,
.pdp-share button {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition:
    background-size 0.4s var(--ease),
    color 0.2s;
}
[dir="rtl"] .pdp-crumbs a,
[dir="rtl"] .pdp-share a,
[dir="rtl"] .pdp-share button {
  background-position: 100% 100%;
}
.pdp-crumbs a:hover,
.pdp-share a:hover,
.pdp-share button:hover {
  color: var(--ink);
  background-size: 100% 1px;
}
.pdp-sku {
  white-space: nowrap;
}
.pdp-sku span {
  color: var(--ink);
}

/* ---------- Hero ------------------------------------------------------------ */

.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 32px;
  padding-bottom: clamp(80px, 9vw, 160px);
}

@media (min-width: 1024px) {
  .pdp-hero {
    grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr);
    column-gap: clamp(40px, 5.4vw, 112px);
    align-items: start;
  }
  .pdp-hero__panel {
    position: sticky;
    top: calc(var(--stick) + 24px);
    max-height: calc(100dvh - var(--stick) - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding-inline-end: 4px;
  }
}

/* ---------- Gallery ---------------------------------------------------------
   Desktop (>=1024px): a true two-column grid — 1 | 2, 3 | 4, 5 | 6 — of equal 4:5 plates with one consistent
   gap. Photographs are contained (never cropped, never distorted); white packshot grounds melt into the plate.
   A frame left alone in its row (odd last image / the image before a video) and every video spans both columns;
   a single image fills the column. Mobile: full-bleed swipe track of 4:5 plates with counter + progress.  */

.pdp-gallery {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  row-gap: 14px;
}
.pdp-track {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  margin-inline: calc(var(--pad) * -1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.pdp-track::-webkit-scrollbar {
  display: none;
}

.pdp-frame {
  position: relative;
  flex: 0 0 90%;
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--plate);
  overflow: hidden;
  scroll-snap-align: start;
}
.pdp-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply; /* white packshot grounds melt into the plate; dark photos are untouched */
  cursor: zoom-in;
}
.pdp-frame.is-video img {
  mix-blend-mode: normal;
  object-fit: cover;
  cursor: default;
}

.pdp-count {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.pdp-count b {
  font-weight: 500;
  color: var(--ink);
}
.pdp-progress {
  position: relative;
  height: 1px;
  background: var(--line);
}
.pdp-progress i {
  position: absolute;
  inset-block: -0.5px;
  inset-inline-start: 0;
  height: 2px;
  width: calc(var(--p, 0.2) * 100%);
  background: var(--ink);
  transition: width 0.5s var(--ease);
}

.pdp-frame__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  border: 0;
  cursor: pointer;
}
.pdp-frame__play span {
  width: 68px;
  height: 68px;
  background: #fff;
  clip-path: circle(50%);
  display: grid;
  place-items: center;
}
.pdp-frame__play span::after {
  content: "";
  border-block: 9px solid transparent;
  border-inline-start: 15px solid #111;
  margin-inline-start: 4px;
}
[dir="rtl"] .pdp-frame__play span::after {
  border-inline-start: 0;
  border-inline-end: 15px solid #111;
  margin-inline-start: 0;
  margin-inline-end: 4px;
}
.pdp-frame__video {
  position: absolute;
  inset: 0;
  background: #000;
}
.pdp-frame__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.pdp-frame__close {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .pdp-frame {
    flex-basis: 62%;
  }
}

@media (min-width: 1024px) {
  .pdp-gallery {
    display: block;
    --gal-gap: clamp(12px, 1.25vw, 20px);
  }
  .pdp-count,
  .pdp-progress {
    display: none;
  }
  .pdp-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gal-gap);
    margin-inline: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .pdp-frame {
    flex: none;
    width: auto;
    min-width: 0;
    aspect-ratio: 4 / 5;
    scroll-margin-top: calc(var(--stick) + 12px);
  }
  /* alone in its row, or a video: take the whole row at the same row height (8:5 ≈ two 4:5 plates + the gap) */
  .pdp-frame.is-wide {
    grid-column: 1 / -1;
    aspect-ratio: 8 / 5;
  }
  .pdp-frame.is-video {
    aspect-ratio: 16 / 10;
  }
  /* merchant option (Theme settings > Product page): one image per row instead of the two-column grid */
  .pdp[data-gallery="stacked"] .pdp-track {
    grid-template-columns: minmax(0, 1fr);
  }
  .pdp[data-gallery="stacked"] .pdp-frame,
  .pdp[data-gallery="stacked"] .pdp-frame.is-wide {
    aspect-ratio: 4 / 5;
  }
  .pdp[data-gallery="stacked"] .pdp-frame.is-video {
    aspect-ratio: 16 / 10;
  }
  /* a single photograph: one plate, never taller than the visible area beside the panel */
  .pdp-frame.is-wide:only-child {
    aspect-ratio: 1 / 1;
    max-height: calc(100dvh - var(--stick) - 48px);
    width: 100%;
  }
}

/* ---------- Panel ------------------------------------------------------------ */

.pdp-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.pdp-brand {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.pdp-title {
  margin: 0;
  font-size: clamp(1.9rem, 2.9vw, 3.2rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: manual;
}
.pdp-title--l {
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  line-height: 1.06;
}
.pdp-title--xl {
  font-size: clamp(1.45rem, 1.9vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
[lang="ar"] .pdp-title {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.25;
  font-size: clamp(1.9rem, 2.8vw, 3rem);
}
[lang="ar"] .pdp-title--l {
  font-size: clamp(1.7rem, 2.3vw, 2.4rem);
}
[lang="ar"] .pdp-title--xl {
  font-size: clamp(1.4rem, 1.8vw, 1.9rem);
}
.pdp-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--mute);
  text-decoration: none;
}
.pdp-rating b {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pdp-rating em {
  font-style: normal;
  border-bottom: 1px solid var(--line);
}
.pdp-rating:hover em {
  border-color: currentColor;
}

.pdp-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: clamp(22px, 2.4vw, 32px);
}
.pdp-price__now {
  margin: 0;
  font-size: clamp(1.6rem, 2.1vw, 2.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pdp-price__now.is-updated {
  animation: pdp-fade 0.5s var(--ease);
}
.pdp-price__old {
  color: var(--mute);
  font-size: 1rem;
  text-decoration-thickness: 1px;
}
.pdp-price__off {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 5px 8px 4px;
}

@keyframes pdp-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* status line: quiet text, slash-separated */
.pdp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-top: 14px;
  font-size: 12px;
  color: var(--mute);
}
.pdp-tags:empty {
  display: none;
}
.pdp-tag {
  display: inline-flex;
  align-items: center;
}
.pdp-tags > .pdp-tag:not(.hidden) ~ .pdp-tag:not(.hidden)::before {
  content: "/";
  margin-inline: 10px;
  color: var(--soft);
}
.pdp-tag--low {
  color: var(--ink);
  font-weight: 500;
}
.pdp-tags .badge,
.pdp-tags .preorder-badge {
  margin: 0 10px 0 0;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant: normal;
}

.pdp-lede {
  margin: 22px 0 0;
  max-width: 46ch;
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
}
.pdp-lede > :first-child {
  margin-top: 0;
}
.pdp-lede > :last-child {
  margin-bottom: 0;
}

/* coffee ledger — the product's own origin · process · roast */
.pdp-ledger {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}
.pdp-ledger > div {
  min-width: 0;
  padding: 14px 14px 0 0;
}
.pdp-ledger > div + div {
  padding-inline-start: 14px;
  border-inline-start: 1px solid var(--line);
}
.pdp-ledger dt,
.pdp-ledger dd {
  margin: 0;
}
.pdp-ledger dd {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pdp-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 32px;
}

/* ---------- Options (Zid kit: .product-options BEM) --------------------------- */

.pdp-options .product-options {
  gap: 22px;
}
.pdp-options .product-options__group {
  gap: 12px;
}
.pdp-options .product-options__label [data-selected-option-value] {
  color: var(--ink);
}
.pdp-options .product-options__list {
  gap: 8px;
}
.pdp-options .product-options__item {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition:
    border-color 0.2s,
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.pdp-options .product-options__item:hover {
  border-color: var(--ink);
}
.pdp-options .product-options__item.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pdp-options .product-options__item--color,
.pdp-options .product-options__item--icon {
  min-height: 0;
  padding: 3px;
}
.pdp-options .product-options__item--color.active,
.pdp-options .product-options__item--icon.active {
  background: #fff;
  border-color: var(--ink);
  box-shadow: none;
}
.pdp-options .product-options__select {
  border: 1px solid var(--line);
  border-radius: 0;
  background-color: #fff;
  min-height: 52px;
}

/* ---------- Purchase controls: one grid ---------------------------------------
   wide:   [ quantity ][ ------ add to cart ------ ][ ♡ ]
           [ ------------------ buy now ------------------ ]
   narrow: [ quantity ][                          ][ ♡ ]
           [ ------------------ add to cart ------------- ]
           [ ------------------ buy now ----------------- ]                          */

.pdp-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.pdp-qty {
  grid-column: 1;
  grid-row: 1;
}
.pdp-in {
  display: contents;
}
.pdp-in .pdp-cta:not(.pdp-cta--line) {
  grid-column: 2;
  grid-row: 1;
}
.pdp-in .pdp-wish {
  grid-column: 3;
  grid-row: 1;
}
.pdp-in .pdp-cta--line {
  grid-column: 1 / -1;
  grid-row: 2;
}
.pdp-out {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pdp-out__row {
  display: flex;
  gap: 10px;
}

@media (max-width: 519.98px), (min-width: 1024px) and (max-width: 1279.98px) {
  .pdp-in .pdp-cta:not(.pdp-cta--line) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .pdp-in .pdp-cta--line {
    grid-row: 3;
  }
}

.pdp-qty .qty-input {
  height: 56px;
  width: 144px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.pdp-qty .qty-input:hover,
.pdp-qty .qty-input:focus-within {
  box-shadow: none;
  --tw-ring-shadow: 0 0 #0000;
}
.pdp-qty .qty-input-btn {
  flex: 0 0 48px;
  width: 48px;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  transition:
    background-color 0.25s,
    color 0.25s;
}
.pdp-qty .qty-input-btn:hover {
  background: var(--ink);
  color: #fff;
}
.pdp-qty .qty-input-field {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  border: 0;
  -moz-appearance: textfield;
}
.pdp-qty .qty-input-field::-webkit-outer-spin-button,
.pdp-qty .qty-input-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pdp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  height: 56px;
  padding-inline: 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.pdp-cta__label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdp-cta__arrow {
  flex: none;
  transition: transform 0.4s var(--ease);
}
[dir="rtl"] .pdp-cta__arrow {
  transform: scaleX(-1);
}
.pdp-cta:hover {
  background: #fff;
  color: var(--ink);
}
.pdp-cta:hover .pdp-cta__arrow {
  transform: translateX(4px);
}
[dir="rtl"] .pdp-cta:hover .pdp-cta__arrow {
  transform: scaleX(-1) translateX(4px);
}
.pdp-cta[disabled],
.pdp-cta[aria-busy="true"] {
  pointer-events: none;
}
.pdp-cta svg {
  pointer-events: none;
}
/* success state injected by add-to-cart.js (innerHTML swap) */
.pdp-cta > svg:first-child:not(.pdp-cta__arrow) {
  margin-inline-end: 8px;
}

.pdp-cta--line {
  background: #fff;
  color: var(--ink);
  height: 52px;
}
.pdp-cta--line:hover {
  background: var(--ink);
  color: #fff;
}
.pdp-cta--off {
  flex: none;
  width: 100%;
  justify-content: center;
  background: var(--plate);
  border-color: var(--line);
  color: var(--soft);
}
.pdp-out .pdp-cta--line {
  flex: 1 1 0;
  white-space: normal;
  height: auto;
  min-height: 56px;
  padding-block: 10px;
  line-height: 1.25;
  text-align: start;
}
.pdp-out .pdp-cta--line .pdp-cta__label {
  white-space: normal;
  overflow: visible;
}

.pdp-actions .pdp-wish,
.pdp-actions button.pdp-wish {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  backdrop-filter: none;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.pdp-actions .pdp-wish:hover {
  background: var(--ink);
  color: #fff;
}
.pdp-actions .pdp-wish svg {
  width: 22px;
  height: 22px;
}
#product-view-add-to-cart:empty {
  display: none;
}

/* ---------- Shipping · platform widgets · share ------------------------------- */

.pdp-ship {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.pdp-widgets {
  font-size: 13.5px;
}
.pdp-widgets > * + * {
  margin-top: 14px;
}
.pdp-widgets:empty {
  display: none;
}
.pdp-widgets [class*="rounded"],
.pdp-ship [class*="rounded"] {
  border-radius: 0 !important;
}
.pdp-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.pdp-share ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pdp-share button {
  padding: 0;
  border: 0;
  background-color: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
[lang="ar"] .pdp-share {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Sections ----------------------------------------------------------- */

.pdp-sec {
  padding-block: clamp(72px, 9vw, 152px);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--stick);
}

/* label | content — one axis for every section */
.pdp-axis {
  display: block;
}
.pdp-axis > .pdp-label {
  margin-bottom: 36px;
}
@media (min-width: 1024px) {
  .pdp-axis {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    column-gap: clamp(32px, 4vw, 72px);
    align-items: start;
  }
  .pdp-axis > .pdp-label {
    margin: 0;
    position: sticky;
    top: calc(var(--stick) + 28px);
    padding-top: 4px;
  }
}

/* ---------- Profile -------------------------------------------------------------- */

.pdp-notes + .pdp-notes {
  margin-top: 40px;
}
.pdp-notes__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(2.1rem, 5.6vw, 6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}
.pdp-notes__list li {
  overflow-wrap: anywhere;
}
/* the separator trails the word, so a wrapped line never starts with "/" */
.pdp-notes__list li:not(:last-child)::after {
  content: "/";
  margin-inline: 0.2em 0.14em;
  color: var(--soft);
  font-weight: 300;
}
[lang="ar"] .pdp-notes__list {
  letter-spacing: 0;
  line-height: 1.3;
  font-size: clamp(1.9rem, 4.6vw, 4.6rem);
}
[lang="ar"] .pdp-notes__list li:not(:last-child)::after {
  margin-inline: 0.3em;
}

.pdp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 34px 24px;
  margin: clamp(44px, 5vw, 80px) 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pdp-profile__body > .pdp-facts:first-child {
  margin-top: 0;
}
.pdp-fact {
  min-width: 0;
}
.pdp-fact dt,
.pdp-fact dd {
  margin: 0;
}
.pdp-fact dd {
  margin-top: 10px;
  font-size: clamp(1.15rem, 1.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
[lang="ar"] .pdp-fact dd {
  letter-spacing: 0;
  line-height: 1.4;
}
@media (min-width: 640px) {
  .pdp-facts {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  }
  .pdp-fact--roast {
    grid-column: span 2;
  }
}
.pdp-scale {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  max-width: 240px;
}
.pdp-scale i {
  flex: 1;
  height: 6px;
  background: var(--line);
}
.pdp-scale i.on {
  background: var(--ink);
}

.pdp-brew {
  margin-top: clamp(44px, 5vw, 72px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pdp-brew__v {
  margin: 12px 0 0;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.pdp-extras {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 15px;
}
.pdp-extras dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pdp-extras table th,
.pdp-extras table td {
  padding: 14px 12px !important;
}

/* ---------- Story ------------------------------------------------------------------ */

.pdp-prose {
  max-width: none;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.75;
  color: var(--body);
  overflow-wrap: anywhere;
}
.pdp-prose [style],
.pdp-prose font {
  color: inherit !important;
  background: transparent !important;
  font-family: inherit !important;
  text-align: start !important;
}
/* the opening sentence is set as a display line across the full measure */
.pdp-prose > :first-child,
.pdp-prose > p:first-of-type {
  max-width: 26em;
  margin: 0 0 clamp(32px, 4vw, 64px);
  font-size: clamp(1.55rem, 3vw, 3.1rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.032em;
  color: var(--ink);
  text-wrap: balance;
}
[lang="ar"] .pdp-prose > :first-child,
[lang="ar"] .pdp-prose > p:first-of-type {
  letter-spacing: 0;
  line-height: 1.55;
  font-size: clamp(1.4rem, 2.6vw, 2.7rem);
}
.pdp-prose > :not(:first-child) {
  max-width: 60ch;
}
@media (min-width: 1200px) {
  .pdp-prose > :not(:first-child) {
    margin-inline-start: clamp(0px, 12vw, 240px);
  }
}
.pdp-prose p {
  margin: 0 0 1.25em;
}
.pdp-prose strong,
.pdp-prose b {
  color: var(--ink);
  font-weight: 600;
}
.pdp-prose h1,
.pdp-prose h2,
.pdp-prose h3,
.pdp-prose h4 {
  margin: 2.6em 0 1em;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
[lang="ar"] .pdp-prose h1,
[lang="ar"] .pdp-prose h2,
[lang="ar"] .pdp-prose h3,
[lang="ar"] .pdp-prose h4 {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
.pdp-prose a {
  color: var(--ink);
  text-underline-offset: 3px;
}
.pdp-prose ul,
.pdp-prose ol {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pdp-prose li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pdp-prose img,
.pdp-prose video,
.pdp-prose iframe {
  max-width: 100%;
  height: auto;
}
.pdp-prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.pdp-prose td,
.pdp-prose th {
  padding: 10px 14px;
  border: 1px solid var(--line);
}

/* ---------- Extras / FAQ ------------------------------------------------------------ */

.pdp-more {
  padding-block: clamp(48px, 6vw, 104px);
}
.pdp-more__block + .pdp-more__block,
.pdp-more__block + .pdp-faq,
.pdp-faq + .pdp-more__block {
  margin-top: clamp(56px, 7vw, 112px);
}
.pdp-grouped {
  font-size: 15px;
}
.pdp-grouped [class*="rounded"] {
  border-radius: 0 !important;
}
.pdp-sec__sub {
  margin: 0 0 24px;
  max-width: 40ch;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.55;
}

.pdp-faq {
  position: relative;
}
.pdp-faq summary {
  display: contents;
  cursor: pointer;
  list-style: none;
}
.pdp-faq summary::-webkit-details-marker {
  display: none;
}
.pdp-faq > summary > .pdp-label {
  grid-column: 1;
}
.pdp-faq__t {
  grid-column: 2;
  display: block;
  padding-inline-end: 64px;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  cursor: pointer;
}
.pdp-faq > summary > i {
  position: absolute;
  inset-block-start: -8px;
  inset-inline-end: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color 0.3s var(--ease);
}
.pdp-faq > summary > i::before,
.pdp-faq > summary > i::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 1.5px;
  background: var(--ink);
  transition:
    transform 0.4s var(--ease),
    background-color 0.3s;
}
.pdp-faq > summary > i::after {
  transform: rotate(90deg);
}
.pdp-faq[open] > summary > i::after {
  transform: rotate(0);
}
.pdp-faq > summary:hover > i {
  background: var(--ink);
}
.pdp-faq > summary:hover > i::before,
.pdp-faq > summary:hover > i::after {
  background: #fff;
}
.pdp-faq__body {
  grid-column: 2;
  max-width: 760px;
  padding-top: 28px;
  font-size: 15px;
}
.pdp-faq__body h3 {
  font-size: 15px;
}
@media (max-width: 1023.98px) {
  .pdp-faq > summary > .pdp-label {
    display: block;
    margin-bottom: 14px;
  }
  .pdp-faq__body {
    grid-column: auto;
  }
}

/* ---------- Reviews ------------------------------------------------------------------ */

.pdp-rv__sum {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 44px;
}
.pdp-rv__avg {
  margin: 0;
  font-size: clamp(3.6rem, 7.4vw, 7.4rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.pdp-rv__avg span {
  margin-inline-start: 0.16em;
  font-size: 0.22em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mute);
}
.pdp-rv__count {
  margin: 0;
  font-size: 12px;
  color: var(--mute);
}
.pdp-rv__bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  max-width: 260px;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.pdp-rv__bars li {
  display: grid;
  grid-template-columns: 12px 1fr 26px;
  align-items: center;
  gap: 12px;
}
.pdp-rv__bars li span:last-child {
  text-align: end;
}
.pdp-rv__bars i {
  position: relative;
  display: block;
  height: 1px;
  background: var(--line);
}
.pdp-rv__bars i::after {
  content: "";
  position: absolute;
  inset-block: -0.5px;
  inset-inline-start: 0;
  height: 2px;
  width: var(--w, 0);
  background: var(--ink);
}

.pdp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.pdp-btn:hover {
  background: var(--ink);
  color: #fff;
}
[lang="ar"] .pdp-btn {
  font-size: 14px;
}
.pdp-btn--line {
  margin-top: 32px;
}
.pdp-empty {
  margin: 0;
  max-width: 44ch;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.6;
}
.pdp-rv__list {
  min-width: 0;
}
.pdp-rv__shown {
  margin: 0 0 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  color: var(--mute);
}
.pdp-rv__list > div {
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}
.pdp-rv__list p {
  font-size: 15px;
  line-height: 1.65;
}
.pdp-rv__list [class*="rounded"] {
  border-radius: 0 !important;
}

@media (min-width: 1024px) {
  .pdp-rv {
    grid-template-rows: auto 1fr;
  }
  .pdp-rv__sum {
    grid-column: 1;
    grid-row: 2;
    margin-top: 48px;
    margin-bottom: 0;
  }
  .pdp-rv__list {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* ---------- Related -------------------------------------------------------------------- */

.pdp-related__label {
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* ---------- Motion ------------------------------------------------------------------------ */

.uc-js .pdp-panel {
  animation: pdp-fade 0.8s 0.1s var(--ease) both;
}
.uc-js .pdp-frame:first-child {
  animation: pdp-fade 0.9s var(--ease) both;
}
@media (min-width: 1024px) {
  .uc-js .pdp-frame:nth-child(2):not(.is-wide) {
    animation: pdp-fade 0.9s 0.12s var(--ease) both; /* the first row arrives together, second plate a beat later */
  }
  .uc-js .pdp-frame:nth-child(n + 3):not(.is-seen),
  .uc-js .pdp-frame:nth-child(2).is-wide:not(.is-seen) {
    opacity: 0;
    transform: translateY(24px);
  }
  .uc-js .pdp-frame.is-seen {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.8s var(--ease),
      transform 1s var(--ease);
  }
  .uc-js .pdp-frame:nth-child(even).is-seen {
    transition-delay: 0.08s;
  }
}
.uc-js [data-reveal]:not(.is-in) .pdp-wrap {
  opacity: 0;
  transform: translateY(18px);
}
.uc-js [data-reveal] .pdp-wrap {
  transition:
    opacity 0.8s var(--ease),
    transform 0.9s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .pdp *,
  .pdp *::before,
  .pdp *::after {
    animation: none !important;
    transition: none !important;
  }
  .uc-js .pdp-frame:nth-child(n + 3):not(.is-seen),
  .uc-js .pdp-frame:nth-child(2).is-wide:not(.is-seen),
  .uc-js [data-reveal]:not(.is-in) .pdp-wrap {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Phones: independent art direction -------------------------------------------- */

@media (max-width: 767.98px) {
  /* breadcrumb collapses to a single back-link to the parent level; SKU stays on the same row */
  .pdp-meta {
    align-items: center;
    padding-block: 2px;
    min-height: 50px;
  }
  .pdp-crumbs li {
    display: none;
  }
  .pdp-crumbs li:nth-last-child(2) {
    display: inline-flex;
  }
  .pdp-crumbs li:nth-last-child(2)::after {
    content: none;
  }
  .pdp-crumbs li:nth-last-child(2)::before {
    content: "←";
    margin-inline-end: 8px;
    color: var(--ink);
  }
  [dir="rtl"] .pdp-crumbs li:nth-last-child(2)::before {
    content: "→";
  }
  .pdp-crumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
  }
  .pdp-share a,
  .pdp-share button {
    display: inline-block;
    padding-block: 11px;
  }
  .pdp-hero {
    row-gap: 22px;
    padding-bottom: 72px;
  }
  .pdp-frame {
    flex-basis: 92%;
  }
  .pdp-title {
    font-size: clamp(1.75rem, 7.6vw, 2.3rem);
  }
  .pdp-title--l {
    font-size: clamp(1.55rem, 6.6vw, 2rem);
  }
  .pdp-title--xl {
    font-size: clamp(1.35rem, 5.6vw, 1.7rem);
  }
  [lang="ar"] .pdp-title {
    font-size: clamp(1.8rem, 7.4vw, 2.3rem);
  }
  .pdp-price {
    margin-top: 20px;
  }
  .pdp-price__now {
    font-size: 1.75rem;
  }
  .pdp-form {
    margin-top: 28px;
  }
  .pdp-options .product-options__item {
    min-height: 48px;
  }
  .pdp-sec {
    padding-block: 64px;
  }
  .pdp-notes__list {
    font-size: clamp(2rem, 9.6vw, 3rem);
  }
}
@media (max-width: 359px) {
  .pdp {
    --pad: 14px;
  }
  .pdp-cta {
    padding-inline: 16px;
    letter-spacing: 0.12em;
  }
}

/* touch widths: breadcrumb links are real tap targets */
@media (max-width: 1023.98px) {
  .pdp-crumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }
  .pdp-crumbs li {
    align-items: center;
  }
}

/* ---------- Story: the page's one black band ---------------------------------------
   Not an alternating scheme — a single confident statement that ties to the black footer.
   Tokens are redefined locally so every Story rule (prose, label, rules) inverts for free. */
.pdp-story {
  --ink: #fff;
  --line: rgba(255, 255, 255, 0.2);
  --mute: #a3a3a3;
  --soft: #8a8a8a;
  --body: #d4d4d4;
  background: #000;
  color: #fff;
  border-top: 0;
}
.pdp-story :focus-visible {
  outline-color: #fff;
}

/* without the decorative arrow the label is centred in the bar (the split layout only makes sense with the arrow) */
html[data-arrows="off"] .pdp-cta { justify-content: center; }
