/*
 * Storefront product-description typography.
 *
 * Wrap rendered product description HTML in a `.product-description`
 * container; the description body itself is plain semantic HTML with no
 * classes (h1/h2/h3, p, ul/ol/li, figure/figcaption, img, strong, em, a,
 * blockquote, table). All visual rules live here so a single edit
 * restyles every product page.
 */

.product-description {
  color: #334155;          /* slate-700 */
  font-size: 1rem;
  line-height: 1.7;
  word-wrap: break-word;
}

.product-description > *:first-child { margin-top: 0; }
.product-description > *:last-child  { margin-bottom: 0; }

/* ── Headings ─────────────────────────────────────────────────────────── */
.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4 {
  color: #0f172a;          /* slate-900 */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.product-description h1 {
  font-size: 1.875rem;     /* 30px */
  margin: 2rem 0 1rem;
}

.product-description h2 {
  font-size: 1.375rem;     /* 22px */
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;  /* slate-200 */
}

.product-description h3 {
  font-size: 1.125rem;     /* 18px */
  margin: 1.5rem 0 0.5rem;
}

.product-description h4 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

/* ── Paragraphs ───────────────────────────────────────────────────────── */
.product-description p {
  margin: 0 0 1rem;
}

/* ── Lists ────────────────────────────────────────────────────────────── */
.product-description ul,
.product-description ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.product-description ul { list-style: disc; }
.product-description ol { list-style: decimal; }

.product-description li {
  margin-bottom: 0.4rem;
}

.product-description li > p { margin-bottom: 0.4rem; }

.product-description li::marker {
  color: #64748b;          /* slate-500 */
}

/* ── Inline ───────────────────────────────────────────────────────────── */
.product-description strong { color: #0f172a; font-weight: 600; }
.product-description em     { font-style: italic; }

.product-description a {
  color: #0284c7;          /* sky-600 */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product-description a:hover { color: #0369a1; }   /* sky-700 */

.product-description code {
  background: #f1f5f9;      /* slate-100 */
  color: #0f172a;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

/* ── Images & figures ─────────────────────────────────────────────────── */
/*
 * Images are constrained to a single fixed max-width so every figure on the
 * page looks consistent regardless of source-image dimensions. The image
 * itself is never cropped — `width: auto; height: auto; object-fit: contain`
 * means the natural image is shown in full, just scaled down to fit the cap.
 * On narrow screens the cap drops to 100% so phones still see a clean
 * full-bleed image.
 */
.product-description img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(400px, 100%);
  object-fit: contain;
  border-radius: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

.product-description figure {
  margin: 1.5rem 0;
  text-align: center;
}

.product-description figure img {
  border: 1px solid #e2e8f0; /* slate-200 */
}

.product-description figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #475569;            /* slate-600 */
}

.product-description figcaption strong {
  display: inline-block;
  color: #0f172a;
  font-weight: 600;
}

/* ── Quotes ───────────────────────────────────────────────────────────── */
.product-description blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid #0ea5e9;  /* sky-500 */
  background: #f8fafc;             /* slate-50 */
  color: #475569;                  /* slate-600 */
  font-style: italic;
}

.product-description hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1.75rem 0;
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.product-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.product-description th,
.product-description td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.product-description thead th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
}

/* Row-label cells — used in spec tables: <th scope="row">. */
.product-description tbody th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  width: 38%;
}

/* Zebra stripes only when there are no row-headers. */
.product-description tbody tr:not(:has(th)):nth-child(even) {
  background: #f8fafc;
}
