/*
 * Single product page redesign.
 * Loaded on is_product() pages after itm-base.css and scoped by body.itm-product -
 * see inc/itm-product.php.
 */

/* Top section grid:
     row 1: title (columns 1-2)        | buy box (column 3, rows 1-2)
     row 2: gallery | short description |
   Martfury's .summary wrapper is flattened so its two columns join the grid.
   Selectors start with body.itm-product.woocommerce div.product to outrank
   Martfury's ".woocommerce .mf-single-product.mf-product-layout-3 ..." widths. */
body.itm-product.woocommerce div.product .mf-product-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 3fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 28px 48px;
  margin: 0;
  padding: 24px 0 72px;
}

body.itm-product.woocommerce div.product .mf-product-detail::before,
body.itm-product.woocommerce div.product .mf-product-detail::after {
  content: none;
  display: none;
}

body.itm-product.woocommerce div.product .mf-product-detail > .summary {
  display: contents;
}

body.itm-product.woocommerce div.product .mf-product-detail > .itm-product-title {
  grid-column: 1 / 3;
  grid-row: 1;
}

body.itm-product.woocommerce div.product .mf-product-detail > .images {
  grid-column: 1;
  grid-row: 2;
}

body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-content {
  grid-column: 2;
  grid-row: 2;
}

body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
  grid-column: 3;
  grid-row: 1 / 3;
}

body.itm-product.woocommerce div.product .mf-product-detail > .images,
body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-content,
body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
  float: none;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Gallery: software icons, not photos - the icon fills the card. */
body.itm-product.woocommerce div.product .mf-product-detail > .images {
  opacity: 1 !important; /* Martfury fades the gallery in with an inline style. */
}

body.itm-product.woocommerce div.product .woocommerce-product-gallery__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 28px;
  aspect-ratio: 1;
  border: 1px solid var(--itm-line);
  border-radius: var(--itm-radius-box);
  background: var(--itm-white);
  overflow: hidden;
}

body.itm-product.woocommerce div.product .woocommerce-product-gallery__image,
body.itm-product.woocommerce div.product .woocommerce-product-gallery__image a {
  display: block;
  width: 100%;
  height: 100%;
}

body.itm-product.woocommerce div.product .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.itm-product.woocommerce div.product .flex-control-thumbs {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

body.itm-product.woocommerce div.product .flex-control-thumbs li {
  width: 72px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--itm-line);
  border-radius: 14px;
  background: var(--itm-white);
}

/* Summary */
body.itm-product.woocommerce div.product .entry-summary-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Title (template-parts/itm/product-title.php), first grid item */
.itm-product-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.itm-product .itm-product-title .itm-eyebrow {
  font-size: 12px;
}

body.itm-product .itm-product-title h1.itm-product-head__title {
  margin: 0;
  padding: 0;
  font-family: var(--itm-font);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-transform: none;
  color: var(--itm-ink);
  text-wrap: balance;
}

body.itm-product.woocommerce div.product .woocommerce-product-details__short-description {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--itm-ink-2);
}

body.itm-product.woocommerce div.product .woocommerce-product-details__short-description > p:first-child {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.55;
}

body.itm-product.woocommerce div.product .woocommerce-product-details__short-description ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.itm-product.woocommerce div.product .woocommerce-product-details__short-description li {
  position: relative;
  margin: 0;
  padding-left: 20px;
  color: var(--itm-ink-2);
}

body.itm-product.woocommerce div.product .woocommerce-product-details__short-description li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--itm-ink);
}

/* Licence type: links to sibling products (ACF upsells_title / upsells_label) */
body.itm-product.woocommerce div.product .entry-summary-content .upsells-title {
  display: block;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--itm-line);
  font-size: 15px;
  font-weight: 600;
  color: var(--itm-ink);
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 0;
  padding: 0;
  list-style: none;
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells:empty {
  display: none;
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells li {
  margin: 0;
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--itm-input-border);
  border-radius: var(--itm-radius-pill);
  background: var(--itm-white);
  color: var(--itm-ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells a:hover {
  border-color: var(--itm-ink);
  color: var(--itm-ink);
}

body.itm-product.woocommerce div.product .entry-summary-content ul.upsells a.active {
  border-color: var(--itm-ink);
  background: var(--itm-ink);
  color: var(--itm-white);
}

/* Buy box (Martfury's summary sidebar) */
body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px !important; /* custom-style.css forces 15px side padding with !important. */
  border: 1px solid var(--itm-line);
  border-radius: var(--itm-radius-box);
  background: var(--itm-white);
}

.itm-buybox__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.itm-buybox__price p {
  margin: 0;
}

body.itm-product.woocommerce div.product .itm-buybox__price .price,
body.itm-product.woocommerce div.product .itm-buybox__price .price .amount {
  text-align: right !important;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--itm-ink) !important;
}

body.itm-product.woocommerce div.product .itm-buybox__price .price del,
body.itm-product.woocommerce div.product .itm-buybox__price .price del .amount {
  margin-right: 8px;
  font-size: 20px;
  font-weight: 500;
  color: var(--itm-muted-3) !important;
}

body.itm-product.woocommerce div.product .itm-buybox__price .price ins {
  text-decoration: none;
}

/* Flex drops the whitespace left before the hidden "netto" suffix, so the
   amount sits flush with the right edge. */
body.itm-product.woocommerce div.product .itm-buybox__price .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0 8px;
  padding: 0 !important; /* Martfury pads the sidebar price on the right. */
}

/* Net amount only; the plugins' "netto" suffix is explained in the cart. */
body.itm-product.woocommerce div.product .itm-buybox__price .price br,
body.itm-product.woocommerce div.product .itm-buybox__price .price .woocommerce-price-suffix,
body.itm-product.woocommerce div.product .woocommerce-variation-price .price br,
body.itm-product.woocommerce div.product .woocommerce-variation-price .woocommerce-price-suffix {
  display: none !important;
}

.itm-buybox__period {
  margin-top: 4px !important;
  font-size: 14px;
  color: var(--itm-muted-3);
}

/* Add-to-cart form: quantity stepper + button in one row */
body.itm-product.woocommerce div.product .entry-summary-sidebar form.cart {
  margin: 0;
  padding: 0;
  border: 0;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .cart-wrapper,
body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-add-to-cart {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 0;
}

/* custom-style.css makes .qt-add a grid and Martfury stretches .quantity to 100%. */
body.itm-product.woocommerce div.product .entry-summary-sidebar .qt-add {
  display: block;
  flex: none;
  width: auto;
  margin: 0;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .quantity {
  float: none;
  width: auto;
  margin: 0;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box {
  display: inline-flex;
  justify-content: space-between;
  width: 104px !important; /* Fixed width: the buy box is a 30% column now. */
  align-items: center;
  height: 52px;
  padding: 0 4px !important;
  border: 1px solid var(--itm-input-border);
  border-radius: var(--itm-radius-pill);
  background: var(--itm-white);
}

/* Martfury positions the buttons absolutely (left: 0 !important); put them back in the row. */
body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box .decrease,
body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box .increase {
  position: static !important;
  flex: none;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--itm-ink);
  font-size: 12px;
  cursor: pointer;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box .decrease:hover,
body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box .increase:hover {
  background: var(--itm-soft);
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box input.qty {
  width: 32px !important;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--itm-ink);
  font-family: var(--itm-font);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  box-shadow: none;
  -moz-appearance: textfield;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box input.qty::-webkit-outer-spin-button,
body.itm-product.woocommerce div.product .entry-summary-sidebar .qty-box input.qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .itm-product-btn {
  flex: 1;
  min-width: 0;
  margin: 0;
}

/* !important is needed against the orange gradient in custom-style.css. */
body.itm-product.woocommerce div.product .entry-summary-sidebar .single_add_to_cart_button,
body.itm-product.woocommerce div.product .entry-summary-sidebar .itm-product-btn .button {
  width: 100%;
  height: 52px !important; /* custom-style.css forces 40px on .itm-product-btn > button. */
  margin: 0;
  padding: 0 14px !important;
  border: 0;
  border-radius: var(--itm-radius-pill) !important;
  white-space: nowrap;
  background: var(--itm-ink) !important;
  color: var(--itm-white) !important;
  font-family: var(--itm-font);
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 52px !important;
  text-transform: none;
  box-shadow: none;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .single_add_to_cart_button:hover,
body.itm-product.woocommerce div.product .entry-summary-sidebar .itm-product-btn .button:hover {
  background: var(--itm-ink-2) !important;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .single_add_to_cart_button.disabled {
  opacity: 0.45;
}

/* Variations (rendered by woo-variation-swatches).
   The child theme's add-to-cart/variable.php prints the add-to-cart block before
   the variations table, and variation-add-to-cart-button.php keeps the button
   inside .qt-add: reorder both with flexbox instead of overriding the templates. */
body.itm-product.woocommerce div.product .entry-summary-sidebar form.variations_form > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar form.variations_form table.variations {
  order: -1;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-add-to-cart .qt-add {
  display: flex;
  flex: 1;
  gap: 12px;
  min-width: 0;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-add-to-cart .qt-add .quantity {
  flex: none;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations {
  display: block !important; /* custom-style.css makes it a centred flex row. */
  width: 100%;
  margin: 0;
  padding-top: 18px;
  border: 0;
  border-top: 1px solid var(--itm-line);
}

body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations tbody {
  display: block;
  width: 100%;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations tr:not([style*="none"]) {
  display: block;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations th,
body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations td {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center !important;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .variable-items-wrapper {
  flex-wrap: wrap;
  justify-content: center !important;
  gap: 8px;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar table.variations th label {
  display: block;
  margin-bottom: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--itm-ink);
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .variable-items-wrapper .variable-item.button-variable-item {
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--itm-radius-pill);
  background: var(--itm-white);
  box-shadow: 0 0 0 1px var(--itm-input-border);
  color: var(--itm-ink-2);
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .variable-items-wrapper .variable-item.button-variable-item.selected {
  background: var(--itm-ink);
  box-shadow: 0 0 0 1px var(--itm-ink);
  color: var(--itm-white);
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .reset_variations {
  font-size: 13px;
  color: var(--itm-muted-2);
}

/* The selected variation's price replaces the buy box price (itm-product.js). */
body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-price {
  display: none;
}

body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-price .price,
body.itm-product.woocommerce div.product .entry-summary-sidebar .woocommerce-variation-price .amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--itm-ink) !important;
}

/* Coterm notice from the Adobe integration */
body.itm-product.woocommerce div.product .entry-summary-sidebar .cotterm-date-info,
body.itm-product.woocommerce div.product .entry-summary-sidebar .cotterm-date-variantion-info {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--itm-soft);
  font-size: 14px;
  color: var(--itm-ink-2);
}

/* Buy box footer */
.itm-buybox__total {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--itm-muted);
}

.itm-buybox__trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--itm-line);
  list-style: none;
}

.itm-buybox__trust li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--itm-ink-2);
}

.itm-buybox__trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--itm-ink);
}

.itm-buybox__badge {
  padding-top: 20px;
  border-top: 1px solid var(--itm-line);
}

body.itm-product.woocommerce div.product .itm-buybox__badge img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #f1ece5;
  border-radius: 12px;
}

body.itm-product.woocommerce div.product a.itm-buybox__quote {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--itm-ink);
}

body.itm-product.woocommerce div.product a.itm-buybox__quote:hover {
  text-decoration: underline;
}

/* Responsive */
/* Below 1200px Martfury's container drops to 970px, too narrow for three columns. */
@media (max-width: 1199px) {
  body.itm-product.woocommerce div.product .mf-product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    grid-template-rows: auto;
    gap: 28px 40px;
  }

  body.itm-product.woocommerce div.product .mf-product-detail > .itm-product-title {
    grid-column: 1 / -1;
  }

  body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  body.itm-product.woocommerce div.product .itm-buybox__badge img {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  body.itm-product.woocommerce div.product .mf-product-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px 0 56px;
  }

  body.itm-product.woocommerce div.product .mf-product-detail > .itm-product-title,
  body.itm-product.woocommerce div.product .mf-product-detail > .images,
  body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-content,
  body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  body.itm-product .itm-product-title h1.itm-product-head__title {
    font-size: 34px;
  }

  body.itm-product.woocommerce div.product .mf-product-detail > .images {
    width: 100%;
    max-width: 240px;
  }

  body.itm-product.woocommerce div.product .mf-product-detail .entry-summary-sidebar {
    padding: 22px !important;
  }
}

/* Sticky bar (template-parts/itm/product-sticky.php, shown by itm-product.js) */
.itm-sticky {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 98;
  padding: 14px 0;
  border-top: 1px solid var(--itm-line);
  border-bottom: 1px solid var(--itm-line);
  background: var(--itm-white);
  font-family: var(--itm-font);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
}

.itm-sticky.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.18s, transform 0.18s;
}

.itm-sticky__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.itm-sticky__product {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.itm-sticky__thumb img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
}

.itm-sticky__name {
  overflow: hidden;
  color: var(--itm-ink);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.itm-sticky__nav {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

body.itm-product a.itm-sticky__pill {
  padding: 8px 14px;
  border-radius: var(--itm-radius-pill);
  color: var(--itm-ink-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

body.itm-product a.itm-sticky__pill:hover,
body.itm-product a.itm-sticky__pill.is-active {
  background: var(--itm-soft);
  color: var(--itm-ink);
}

.itm-sticky__buy {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

body.itm-product .itm-sticky__price,
body.itm-product .itm-sticky__price .amount {
  margin: 0;
  color: var(--itm-ink) !important;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

body.itm-product .itm-sticky__price br,
body.itm-product .itm-sticky__price .woocommerce-price-suffix {
  display: none !important;
}

body.itm-product .itm-sticky__price del {
  display: none;
}

body.itm-product .itm-sticky__price ins {
  text-decoration: none;
}

body.itm-product button.itm-sticky__cart {
  height: 44px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: var(--itm-radius-pill);
  background: var(--itm-ink);
  color: var(--itm-white);
  font-family: var(--itm-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 44px;
  white-space: nowrap;
  cursor: pointer;
}

body.itm-product button.itm-sticky__cart:hover {
  background: var(--itm-ink-2);
}

@media (max-width: 1199px) {
  .itm-sticky__nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .itm-sticky {
    padding: 10px 0;
  }

  .itm-sticky__thumb {
    display: none;
  }

  .itm-sticky__name {
    font-size: 15px;
  }

  .itm-sticky__buy {
    gap: 12px;
  }

  body.itm-product button.itm-sticky__cart {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    line-height: 40px;
  }
}

/* Sections below the top grid (template-parts/itm/product-sections.php) */
body.itm-product .mf-product-summary {
  margin: 0;
  padding: 0;
}

.itm-product-sections {
  display: flex;
  flex-direction: column;
  gap: 112px;
  padding-top: 72px;
  border-top: 1px solid var(--itm-line);
}

/* Martfury's 90px spacer between the summary and the tabs; the sections have their own spacing. */
body.itm-product.woocommerce div.product .summary-sep {
  height: 0;
}

.itm-product-sections > section {
  scroll-margin-top: 96px;
}

/* Licence details */
.itm-specs {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 72px;
}

.itm-specs__intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.itm-product h2.itm-specs__title,
body.itm-product h2.itm-related__title {
  margin: 0;
  font-family: var(--itm-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--itm-ink);
}

body.itm-product h2.itm-specs__title {
  font-size: 44px;
  line-height: 1.06;
  text-wrap: balance;
}

.itm-specs__table {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--itm-line);
  border-radius: var(--itm-radius-box);
  background: var(--itm-white);
}

.itm-specs__row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border-top: 1px solid #f1ece5;
}

.itm-specs__row:first-child {
  border-top: 0;
}

.itm-specs__row dt,
.itm-specs__row dd {
  margin: 0;
  padding: 18px 28px;
  font-size: 16px;
  line-height: 1.45;
}

.itm-specs__row dt {
  font-weight: 400;
  color: var(--itm-muted);
}

.itm-specs__row dd {
  font-weight: 500;
  color: var(--itm-ink);
}

/* Recommended products: the category card component */
.itm-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}

body.itm-product h2.itm-related__title {
  font-size: 32px;
  line-height: 1.15;
}

body.itm-product a.itm-related__all {
  font-size: 15px;
  font-weight: 600;
  color: var(--itm-ink);
}

body.itm-product a.itm-related__all:hover {
  text-decoration: underline;
}

/* The CTA strip sits right after the last section. */
body.itm-product .itm-product-sections .itm-cta {
  margin: -56px 0 96px;
}

@media (max-width: 1199px) {
  .itm-specs {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .itm-product-sections {
    gap: 72px;
    padding-top: 56px;
  }

  body.itm-product h2.itm-specs__title {
    font-size: 32px;
  }

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

  .itm-specs__row dt {
    padding-bottom: 0;
  }

  .itm-specs__row dd {
    padding-top: 4px;
  }

  body.itm-product .itm-product-sections .itm-cta {
    margin: -40px 0 64px;
  }
}

/* Legacy descriptions (classic editor and Elementor) until they move to the
   IT Media patterns: typography, colours, tables and images only - Elementor's
   section and column layout is kept. The #descriere id outranks Elementor's
   per-element rules (.elementor-123 .elementor-element-abc ...) without
   !important; !important is used only against inline styles. */
#descriere.itm-desc--legacy {
  color: var(--itm-muted);
  font-family: var(--itm-font);
}

#descriere.itm-desc--legacy :is(h1, h2) {
  margin: 56px 0 16px;
  padding: 0;
  font-family: var(--itm-font);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--itm-ink);
  text-wrap: balance;
}

/* Headings in half-width Elementor columns. */
#descriere.itm-desc--legacy .elementor-column:not(.elementor-col-100) :is(h1, h2) {
  font-size: 28px;
}

#descriere.itm-desc--legacy h3 {
  margin: 36px 0 10px;
  padding: 0;
  font-family: var(--itm-font);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--itm-ink);
}

#descriere.itm-desc--legacy :is(h4, h5, h6) {
  margin: 28px 0 8px;
  font-family: var(--itm-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--itm-ink);
}

#descriere.itm-desc--legacy > :first-child,
#descriere.itm-desc--legacy .elementor-widget-container > :first-child {
  margin-top: 0;
}

#descriere.itm-desc--legacy :is(p, li, .elementor-widget-text-editor) {
  font-family: var(--itm-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--itm-muted);
}

#descriere.itm-desc--legacy p {
  margin: 0 0 16px;
}

#descriere.itm-desc--legacy :is(strong, b) {
  font-weight: 600;
  color: var(--itm-ink);
}

#descriere.itm-desc--legacy a:not(.elementor-button) {
  color: var(--itm-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#descriere.itm-desc--legacy :is(ul, ol) {
  margin: 0 0 20px;
  padding-left: 22px;
}

#descriere.itm-desc--legacy li {
  margin: 0 0 8px;
}

#descriere.itm-desc--legacy li::marker {
  color: var(--itm-ink);
}

/* Readable line length for text written straight in the classic editor. */
#descriere.itm-desc--legacy > :is(p, ul, ol, h2, h3, h4) {
  max-width: 760px;
}

#descriere.itm-desc--legacy img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Tables, styled like the plan comparison pattern; no orange header. */
#descriere.itm-desc--legacy table {
  width: 100%;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--itm-line);
  border-radius: 20px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--itm-white);
}

#descriere.itm-desc--legacy :is(thead, thead tr, tbody, tr) {
  background: transparent !important; /* The comparison tables set an orange head inline. */
}

#descriere.itm-desc--legacy :is(th, td) {
  padding: 14px 20px;
  border: 0;
  border-top: 1px solid #f1ece5;
  background: transparent !important;
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
  color: var(--itm-ink-2) !important;
}

#descriere.itm-desc--legacy tr:first-child > :is(th, td) {
  border-top: 0;
}

#descriere.itm-desc--legacy :is(th, thead td) {
  background: var(--itm-soft) !important;
  font-weight: 700;
  color: var(--itm-ink) !important;
}

#descriere.itm-desc--legacy :is(th, td) img {
  border-radius: 12px;
}

@media (max-width: 760px) {
  #descriere.itm-desc--legacy :is(h1, h2),
  #descriere.itm-desc--legacy .elementor-column:not(.elementor-col-100) :is(h1, h2) {
    margin-top: 40px;
    font-size: 28px;
  }

  #descriere.itm-desc--legacy :is(p, li, .elementor-widget-text-editor) {
    font-size: 16px;
  }

  #descriere.itm-desc--legacy table {
    display: block;
    overflow-x: auto;
  }
}
