/* EC Match Slugs — single-product refinements, v1.0.24 */

/*
 * Keep the WooCommerce sale flash fully inside the product gallery card and
 * visually consistent with the EC Match Slugs storefront. WooCommerce's
 * default sale badge uses absolute positioning that can sit outside the card.
 */
.single-product .ecms-product-gallery-card .onsale {
  position: absolute !important;
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  left: 14px !important;
  z-index: 15 !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: .48rem .72rem !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ecms-final-red, #e31825) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(13, 14, 16, .16) !important;
  font-size: .74rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  transform: none !important;
}

/* Separate the zoom control from the sale badge. */
.single-product .ecms-product-gallery-card .woocommerce-product-gallery__trigger {
  inset: 12px 12px auto auto !important;
}

/*
 * Trusted storefront managers get a contextual shortcut back to the
 * simplified PIPR product editor. The control is intentionally prominent for
 * fast corrective edits, but is never rendered for ordinary customers.
 */
.single-product .ecms-product-admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .9rem;
}

.single-product .ecms-product-admin-heading .ecms-product-brandline {
  margin: 0 !important;
}

.single-product .ecms-product-edit-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .5rem .72rem;
  border: 1px solid var(--ecms-final-red, #e31825);
  border-radius: 999px;
  background: var(--ecms-final-red, #e31825);
  color: #fff;
  box-shadow: 0 8px 18px rgba(227, 24, 37, .2);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.single-product .ecms-product-edit-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.single-product .ecms-product-edit-link:hover,
.single-product .ecms-product-edit-link:focus-visible {
  border-color: #b90f19;
  background: #b90f19;
  color: #fff;
  box-shadow: 0 11px 24px rgba(185, 15, 25, .28);
  transform: translateY(-2px);
}

.single-product .ecms-product-edit-link:focus-visible {
  outline: 3px solid rgba(227, 24, 37, .24);
  outline-offset: 3px;
}

/*
 * Keep long product names visually balanced inside the summary card. The
 * smaller desktop scale prevents short fragments such as “pcs” from being
 * stranded on their own line while preserving the strong headline hierarchy.
 */
.single-product .ecms-product-summary-card .product_title {
  font-size: clamp(2.55rem, 3.15vw, 3.35rem) !important;
  line-height: .98 !important;
  letter-spacing: -.05em !important;
  text-wrap: balance;
}

/*
 * Keep the active sale price at exactly the same scale as a regular product
 * price. The crossed-out amount remains larger than before, but clearly
 * secondary in gray. WooCommerce's default <ins> underline stays removed.
 */
.single-product .ecms-product-summary-card p.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55rem;
  line-height: 1.1;
}

.single-product .ecms-product-summary-card p.price del,
.single-product .ecms-product-summary-card p.price del .woocommerce-Price-amount {
  color: #737980 !important;
  font-size: clamp(1.15rem, 1.45vw, 1.35rem) !important;
  font-weight: 750 !important;
  opacity: 1 !important;
}

.single-product .ecms-product-summary-card p.price ins,
.single-product .ecms-product-summary-card p.price ins .woocommerce-Price-amount {
  color: var(--ecms-final-red, #e31825) !important;
  font-size: inherit !important;
  font-weight: 950 !important;
  text-decoration: none !important;
}

.single-product .ecms-product-summary-card p.price ins * {
  text-decoration: none !important;
}

/*
 * Give the product tags a visibly clearer break from the purchase controls
 * without creating an exaggerated empty band in the summary card.
 */
.single-product .ecms-product-summary-card .ecms-product-confidence {
  margin-top: 1.8rem;
}

@media (max-width: 720px) {
  .single-product .ecms-product-gallery-card .onsale {
    top: 12px !important;
    left: 12px !important;
    padding: .42rem .62rem !important;
    font-size: .68rem !important;
  }

  .single-product .ecms-product-gallery-card .woocommerce-product-gallery__trigger {
    inset: 10px 10px auto auto !important;
  }

  .single-product .ecms-product-admin-heading {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    text-align: center;
  }

  .single-product .ecms-product-edit-link {
    min-height: 40px;
    padding: .54rem .78rem;
    font-size: .74rem;
  }

  .single-product .ecms-product-summary-card .product_title {
    font-size: clamp(2.15rem, 10vw, 2.75rem) !important;
    line-height: 1 !important;
  }

  .single-product .ecms-product-summary-card p.price {
    justify-content: center;
  }

  .single-product .ecms-product-summary-card p.price del,
  .single-product .ecms-product-summary-card p.price del .woocommerce-Price-amount {
    font-size: 1.1rem !important;
  }

  .single-product .ecms-product-summary-card p.price ins,
  .single-product .ecms-product-summary-card p.price ins .woocommerce-Price-amount {
    font-size: inherit !important;
  }

  /*
   * Mobile description: preserve every word the client entered while reducing
   * the long vertical scroll that was called out during client review.
   */
  .single-product .ecms-product-description-card {
    padding: 1.05rem !important;
    border-radius: 20px !important;
  }

  .single-product .ecms-product-description-card .ecms-section-heading {
    margin-bottom: .65rem !important;
  }

  .single-product .ecms-product-description-card .ecms-section-kicker {
    font-size: .64rem !important;
    letter-spacing: .14em !important;
  }

  .single-product .ecms-product-description-card .ecms-section-heading h2 {
    margin-top: .16rem !important;
    font-size: 1.65rem !important;
    line-height: 1.05 !important;
  }

  .single-product .ecms-product-description-content {
    font-size: .9rem !important;
    line-height: 1.45 !important;
  }

  .single-product .ecms-product-description-content > * {
    margin-top: .42rem !important;
    margin-bottom: .42rem !important;
  }

  .single-product .ecms-product-description-content h2,
  .single-product .ecms-product-description-content h3,
  .single-product .ecms-product-description-content h4 {
    margin-top: .8rem !important;
    margin-bottom: .3rem !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .single-product .ecms-product-description-content ul,
  .single-product .ecms-product-description-content ol {
    display: grid;
    gap: .18rem;
    margin: .35rem 0 !important;
    padding-left: 1.15rem !important;
  }

  .single-product .ecms-product-description-content li {
    margin: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-product .ecms-product-edit-link {
    transition: none !important;
  }
}
