/* jdtheme26 - product long description, structured 1688 spec block (.jd-pdoc--spec): features / size guide / material sections.
   Markup is a fixed contract generated by HQ; this sheet only styles it. Loaded on single product pages whose description
   contains .jd-pdoc--spec (inc/jd-product-detail.php). NOTE: mu-plugin jd-product-page-tabs.php re-wraps the sections it routes into
   the description tab as a plain <div class="jd-pdoc"> and drops the --spec class, so every rule here keys on the section / element
   classes (--features, --size, --material, __title, __list, __sizes, __note, __text) which survive. Older .jd-pdoc descriptions keep
   the mu-plugin look untouched (those element classes do not occur there).
   Built from existing tokens only: --jd-card-* (jd-product-card.css), --jd-space-* (jd-layout.css), palette (justdog-colors.css),
   --jd-btn-radius-regular (jd-button.css), the home title spark picture (jd-title-spark.webp) and --jd-spark-mask.
   Design: home-page title vocabulary (spark mark + tilted hand-written eyebrow above the title), white .jd-card surfaces,
   butter size badges, cream note box. Phone first: one column; two columns for the size rows only when 2 x 380px fit.
   No !important, no ID selectors, no new motion. */

.jd-pdoc {
  --jd-pdoc-item-gap: 10px;                         /* between cards / rows (8px touch minimum) */
  --jd-pdoc-title-size: 20px;
  --jd-pdoc-eyebrow-size: 18px;
}

/* The mu-plugin spaces neighbouring sections with margin-top: var(--jd-space-m); the three spec sections lift that token to the large step. */
.jd-pdoc .jd-pdoc__section--features,
.jd-pdoc .jd-pdoc__section--size,
.jd-pdoc .jd-pdoc__section--material {
  --jd-space-m: var(--jd-space-l);
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
  min-width: 0;
}

/* ---- section title: spark mark on the left, hand-written English eyebrow above (as the home titles) ---- */
.jd-pdoc .jd-pdoc__section .jd-pdoc__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 0 0 0 28px;
  border: 0;
  background: url("../img/jd-title-spark.webp") 0 calc(100% - 1px) / 16px 24px no-repeat;
  font-family: var(--jd-font-display);
  font-size: var(--jd-pdoc-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .05em;
  color: var(--jd-ink-900);
}
.jd-pdoc .jd-pdoc__section .jd-pdoc__title::before {
  content: "";
  font-family: "Gaegu", var(--jd-font-display);
  font-size: var(--jd-pdoc-eyebrow-size);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .1em;
  color: var(--jd-blush-400);
  transform: rotate(-3deg);
  transform-origin: left bottom;
}
.jd-pdoc .jd-pdoc__section--features .jd-pdoc__title::before { content: "FEATURES"; content: "FEATURES" / ""; }
.jd-pdoc .jd-pdoc__section--size .jd-pdoc__title::before     { content: "SIZE GUIDE"; content: "SIZE GUIDE" / ""; }
.jd-pdoc .jd-pdoc__section--material .jd-pdoc__title::before { content: "MATERIAL"; content: "MATERIAL" / ""; }

/* ---- features: one white card, rows split by a dashed line, a butter spark as the bullet ---- */
.jd-pdoc .jd-pdoc__list {
  margin: 0;
  padding: 4px 18px;
  list-style: none;
  background: var(--jd-card-bg);
  border: 1px solid var(--jd-card-border);
  border-radius: var(--jd-card-radius);
  box-shadow: var(--jd-card-shadow);
}
.jd-pdoc .jd-pdoc__list li {
  position: relative;
  margin: 0;
  padding: 14px 0 14px 28px;
  color: var(--jd-ink-700);
}
.jd-pdoc .jd-pdoc__list li + li { border-top: 1px dashed var(--jd-cream-200); }
.jd-pdoc .jd-pdoc__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 18px;
  height: 18px;
  background: var(--jd-butter-400);
  -webkit-mask: var(--jd-spark-mask, none) center / contain no-repeat;
          mask: var(--jd-spark-mask, none) center / contain no-repeat;
}

/* ---- sizes: one card per size, butter badge on the left, measurements + fit stacked on the right ---- */
.jd-pdoc .jd-pdoc__sizes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--jd-pdoc-item-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.jd-pdoc .jd-pdoc__sizes li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "size dims" "size fit";
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
  margin: 0;
  padding: 12px 16px;
  background: var(--jd-card-bg);
  border: 1px solid var(--jd-card-border);
  border-radius: var(--jd-card-radius);
  box-shadow: var(--jd-card-shadow);
}
.jd-pdoc .jd-pdoc__size {
  grid-area: size;
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 48px;
  padding: 0 12px;
  background: var(--jd-butter-300);
  border-radius: var(--jd-btn-radius-regular);
  font-family: var(--jd-font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .05em;
  color: var(--jd-ink-900);
}
.jd-pdoc .jd-pdoc__dims {
  grid-area: dims;
  color: var(--jd-ink-900);
  overflow-wrap: anywhere;
  text-wrap: balance;                               /* even lines instead of an orphaned character */
}
.jd-pdoc .jd-pdoc__fit {
  grid-area: fit;
  justify-self: start;
  padding: 3px 12px;
  background: var(--jd-cream-50);
  border: 1px solid var(--jd-cream-200);
  border-radius: var(--jd-btn-radius-regular);
  color: var(--jd-ink-700);
}

/* ---- note under the sizes: mail cream box, spark stays butter yellow ---- */
.jd-pdoc .jd-pdoc__note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: var(--jd-pdoc-item-gap) 0 0;
  padding: 12px 16px;
  background: var(--jd-cream-50);
  border: 1px solid var(--jd-cream-200);
  border-radius: 14px;
  color: var(--jd-ink-700);
}
.jd-pdoc .jd-spark {
  flex: none;
  color: var(--jd-butter-400);
}

/* ---- material: one cream-yellow chip ---- */
.jd-pdoc .jd-pdoc__text {
  display: block;
  margin: 0;
  padding: 14px 18px;
  background: var(--jd-butter-100);
  border-radius: var(--jd-card-radius);
  color: var(--jd-ink-900);
}

@media (min-width: 768px) {
  .jd-pdoc { --jd-pdoc-title-size: 22px; --jd-pdoc-eyebrow-size: 20px; }
  .jd-pdoc .jd-pdoc__list { padding: 6px 24px; }
}
