/*
 * Product description: one stylesheet for both places it appears, so the admin
 * editor shows exactly what the website will show.
 *
 *   Website:  product page, inside <div class="pdp-desc__content">
 *   Admin:    CKEditor's editing area (contentsCss + bodyClass "pdp-desc__content")
 *
 * Colours and fonts come from the theme variables in style.css; the fallback
 * values are the same theme values, used inside the editor where style.css isn't loaded.
 */

.pdp-desc__content {
  font-family: var(--font-sans, "Nunito Sans", Arial, sans-serif);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--color-text-secondary, #555555);
  overflow-wrap: anywhere;
}

/* Reset browser margins first; the spacing rules below are stronger, so they win */
.pdp-desc__content p,
.pdp-desc__content ul,
.pdp-desc__content ol,
.pdp-desc__content blockquote,
.pdp-desc__content table,
.pdp-desc__content h1,
.pdp-desc__content h2,
.pdp-desc__content h3,
.pdp-desc__content h4 {
  margin: 0;
}

/* Space between blocks (also inside a wrapping <div>), a little more above headings */
.pdp-desc__content :is(p, ul, ol, blockquote, table, div, h1, h2, h3, h4):not(:first-child) {
  margin-top: 14px;
}

.pdp-desc__content :is(h1, h2, h3, h4):not(:first-child) {
  margin-top: 26px;
}

.pdp-desc__content h1,
.pdp-desc__content h2,
.pdp-desc__content h3,
.pdp-desc__content h4 {
  font-family: var(--font-heading, "Marcellus", "Playfair Display", Georgia, serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text, #111111);
}

.pdp-desc__content h1,
.pdp-desc__content h2 {
  font-size: clamp(26px, 2.4vw, 34px);
}

.pdp-desc__content h3 {
  font-size: 22px;
}

.pdp-desc__content h4 {
  font-size: 18px;
}

.pdp-desc__content ul,
.pdp-desc__content ol {
  padding-left: 20px;
}

.pdp-desc__content ul {
  list-style: disc;
}

.pdp-desc__content ol {
  list-style: decimal;
}

.pdp-desc__content li + li {
  margin-top: 6px;
}

.pdp-desc__content strong,
.pdp-desc__content b {
  font-weight: 600;
  color: var(--color-text, #111111);
}

.pdp-desc__content a {
  color: var(--color-brand, #915913);
  text-decoration: underline;
}

.pdp-desc__content blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--color-brand, #915913);
  font-style: italic;
}

.pdp-desc__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.pdp-desc__content th,
.pdp-desc__content td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-line, #EEEEEE);
  text-align: left;
}

.pdp-desc__content img {
  max-width: 100%;
  height: auto;
}

/* Highlights row (<ul class="pdp-desc__benefits"> with <li class="benefit benefit--row">):
   short facts side by side instead of a bullet list */
.pdp-desc__content .pdp-desc__benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 0;
  padding: 18px 0;
  border-top: 1px solid var(--color-line, #EEEEEE);
  border-bottom: 1px solid var(--color-line, #EEEEEE);
  list-style: none;
}

.pdp-desc__content .pdp-desc__benefits:not(:first-child) {
  margin-top: 24px;
}

.pdp-desc__content .pdp-desc__benefits li + li {
  margin-top: 0;
}

.pdp-desc__content .benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text, #111111);
}

.pdp-desc__content .benefit:first-child {
  padding-left: 0;
}

.pdp-desc__content .benefit + .benefit {
  border-left: 1px solid var(--color-line, #EEEEEE);
}

/* Gold check in a soft circle before each highlight */
.pdp-desc__content .benefit::before {
  content: "";
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23AF7324%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 12.5l4.2 4.2L19 7%27/%3E%3C/svg%3E") center / 16px no-repeat,
    #F6EEDF;
}

/* Admin editor only: the editing area is the whole page there */
body.pdp-desc__content {
  max-width: 900px;
  margin: 0;
  padding: 18px 22px;
  background: var(--color-bg, #FCFCFC);
}

/* Phones: one highlight per line */
@media (max-width: 575px) {
  .pdp-desc__content .pdp-desc__benefits {
    flex-direction: column;
    gap: 12px;
  }

  .pdp-desc__content .benefit {
    padding: 0;
  }

  .pdp-desc__content .benefit + .benefit {
    border-left: 0;
  }
}

/* Font Awesome icons pasted into the description (<i class="fa-solid fa-gem">): gold, sized to the text */
.pdp-desc__content [class*="fa-"] {
  color: var(--color-gold, #AF7324);
  line-height: 1;
}

.pdp-desc__content [class*="fa-"] + * {
  margin-left: 0.35em;
}

/* A highlight with its own icon: the icon takes the place of the automatic tick, in the same circle */
.pdp-desc__content .benefit:has([class*="fa-"])::before {
  display: none;
}

.pdp-desc__content .benefit > [class*="fa-"] {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F6EEDF;
  font-size: 15px;
}

.pdp-desc__content .benefit > [class*="fa-"] + * {
  margin-left: 0;
}
