/**
 * Dripex single product page (PDP) — layout, order form skin, tabs.
 * Loaded only on is_product(). Markup: woocommerce/content-single-product.php.
 *
 * All colors come from the design tokens in dripex-variables.css.
 * Body copy is --gray-700 or darker; --gray-600 is the lightest text color used.
 */

/* ==========================================================================
   0. SCOPE, TOKENS & PLUGIN THEMING
   ========================================================================== */
.dxs-pdp {
  --pdp-surface: var(--color-white);
  --pdp-border: var(--gray-200);
  --pdp-border-strong: var(--gray-300);
  --pdp-tint: color-mix(in srgb, var(--color-blue) 9%, var(--pdp-surface));
  --pdp-radius-lg: 22px;
  --pdp-radius-md: 14px;
  /* pinned nav + WP admin bar (when logged in) + breathing room */
  --pdp-sticky-top: calc(var(--dripex-nav-h, 86px) + var(--dripex-adminbar-h, 0px) + 24px);
  /* Icon/check colors: brand green/amber mixed toward --color-navy, which
     darkens them on light surfaces and lightens them in dark mode. */
  --pdp-green-ink: color-mix(in srgb, var(--color-green) 60%, var(--color-navy));
  --pdp-amber-ink: color-mix(in srgb, var(--color-orange) 60%, var(--color-navy));

  /* woo-custom-product-addons reads these from :root; redefining them on
     this ancestor re-themes every addon field without touching its markup. */
  --wcpaLabelColor: var(--color-navy);
  --wcpaLabelSize: 14px;
  --wcpaLabelWeight: 700;
  --wcpaDescColor: var(--gray-700);
  --wcpaBorderWidth: 1.5px;
  --wcpaBorderColor: var(--gray-300);
  --wcpaBorderColorFocus: var(--color-blue);
  --wcpaBorderRadius: 12px;
  --wcpaInputBgColor: var(--pdp-surface);
  --wcpaInputColor: var(--gray-800);
  --wcpaCheckLabelColor: var(--gray-800);
  --wcpaCheckLabelSize: 14px;
  --wcpaCheckWidth: 16px;
  --wcpaCheckHeight: 16px;
  --wcpaCheckBorderWidth: 1.5px;
  --wcpaCheckBorderColor: var(--gray-400);
  --wcpaCheckBgColor: var(--color-blue);
  --wcpaCheckTickColor: #fff;
  --wcpaRadioBgColor: var(--color-blue);
  --wcpaRadioBorderColor: var(--gray-400);
  --wcpaErrorColor: #DC2626;

  background: linear-gradient(180deg, var(--gray-50) 0, var(--pdp-surface) 520px);
  padding: clamp(14px, 2vw, 28px) 0 clamp(48px, 6vw, 88px);
  color: var(--gray-800);
}

.dxs-pdp *,
.dxs-pdp *::before,
.dxs-pdp *::after {
  box-sizing: border-box;
}

/* Storefront: `.single-product div.product { overflow: hidden }` (a clearfix).
   wc_product_class() puts the `product` class on this wrapper, and overflow
   other than `visible` would stop the sticky media column from ever sticking. */
.single-product div.product.dxs-pdp {
  overflow: visible;
}

.dxs-pdp__container {
  width: 100%;
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

/* ==========================================================================
   1. BREADCRUMBS
   ========================================================================== */
.dxs-pdp-crumbs {
  margin-bottom: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.dxs-pdp-crumbs::-webkit-scrollbar { display: none; }

/* Storefront wraps its breadcrumb in .storefront-breadcrumb > .col-full,
   adding ~59px bottom margin, 22px padding and a side inset. */
.dxs-pdp-crumbs .storefront-breadcrumb { margin: 0; padding: 0; }
.dxs-pdp-crumbs .col-full { width: auto; max-width: none; margin: 0; padding: 0; }

.dxs-pdp .woocommerce-breadcrumb {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  background: none;
}

.dxs-pdp .woocommerce-breadcrumb a {
  color: var(--gray-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dxs-pdp .woocommerce-breadcrumb a:hover { color: var(--color-blue); }

/* ==========================================================================
   2. GRID + MEDIA COLUMN
   ========================================================================== */
.dxs-pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
}

.dxs-pdp__media,
.dxs-pdp__info {
  min-width: 0;
}

.dxs-pdp-gallery {
  position: relative;
}

.dxs-pdp-gallery__frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--pdp-radius-lg);
  border: 1.5px solid var(--pdp-border);
  background: color-mix(in srgb, var(--platform-color, var(--color-blue)) 8%, var(--pdp-surface));
  box-shadow: var(--shadow-md);
}

/* Product images aren't a fixed shape (square illustrations, wide banners…).
   Show the whole image (contain) over a blurred, enlarged copy of itself so
   the leftover space looks intentional rather than letterboxed or cropped. */
.dxs-pdp-gallery__frame::before {
  content: '';
  position: absolute;
  inset: -32px;
  z-index: -1;
  background: var(--pdp-img) center / cover no-repeat;
  filter: blur(28px) saturate(1.15);
  opacity: .75;
}

.dxs-pdp-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dxs-pdp-gallery__chip {
  position: absolute;
  top: -15px; /* straddles the frame edge so it never covers the image */
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pdp-surface) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pdp-border);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
}

.dxs-pdp-gallery__chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--platform-color, var(--color-blue));
  color: #fff;
}

.dxs-pdp-gallery__chip-icon svg { width: 13px; height: 13px; }

/* Trust points */
.dxs-pdp-trust {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dxs-pdp-trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--pdp-border);
  border-radius: var(--pdp-radius-md);
  background: var(--pdp-surface);
}

.dxs-pdp-trust__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.dxs-pdp-trust__icon svg { width: 18px; height: 18px; }

.dxs-pdp-trust__icon--amber { background: color-mix(in srgb, var(--color-orange) 16%, var(--pdp-surface)); color: var(--pdp-amber-ink); }
.dxs-pdp-trust__icon--blue  { background: var(--pdp-tint); color: var(--color-blue); }
.dxs-pdp-trust__icon--green { background: color-mix(in srgb, var(--color-green) 16%, var(--pdp-surface)); color: var(--pdp-green-ink); }
.dxs-pdp-trust__icon--navy  { background: var(--gray-100); color: var(--color-navy); }

.dxs-pdp-trust__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.dxs-pdp-trust__text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-navy);
}

.dxs-pdp-trust__text span {
  font-size: 12.5px;
  color: var(--gray-700);
}

/* ==========================================================================
   3. INFO COLUMN — HEAD, PRICE, INCLUDED
   ========================================================================== */
.dxs-pdp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-700);
}

.dxs-pdp-kicker::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--platform-color, var(--color-blue));
}

.dxs-pdp .dxs-pdp-title {
  margin: 0;
  font-size: clamp(26px, 1.4vw + 20px, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--color-navy);
}

.dxs-pdp-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
}

.dxs-pdp-price {
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 1.5px solid var(--pdp-border);
  border-radius: var(--pdp-radius-md);
  background: linear-gradient(135deg, var(--pdp-tint), var(--pdp-surface) 70%);
}

.dxs-pdp-price__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-700);
}

.dxs-pdp-price__value,
.dxs-pdp-price__value .price {
  margin: 0;
  font-size: clamp(28px, 1.6vw + 20px, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--color-navy);
}

.dxs-pdp-price__value .amount,
.dxs-pdp-price__value bdi { color: inherit; }

.dxs-pdp-price__value del { font-size: .55em; font-weight: 600; color: var(--gray-700); opacity: .8; }
.dxs-pdp-price__value ins { text-decoration: none; }

/* What's included — owner's short description, restyled as a checklist */
.dxs-pdp-included { margin-top: 22px; }

.dxs-pdp .dxs-pdp-included__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-700);
}

.dxs-pdp-included .woocommerce-product-details__short-description { color: var(--gray-800); font-size: 15px; line-height: 1.6; }
.dxs-pdp-included p { margin: 0 0 10px; color: var(--gray-800); }

.dxs-pdp-included ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.dxs-pdp-included ul:last-child { margin-bottom: 0; }

/* Extra copy after the list (example links, notes): keep long URLs inside the column. */
.dxs-pdp-included p { overflow-wrap: anywhere; }
.dxs-pdp-included u { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.dxs-pdp-included li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-800);
}

/* Owner's markup mixes <i class="sui sui-check"> icons (icon font not
   loaded here) with plain items — replace with one consistent check. */
.dxs-pdp-included li > i { display: none; }

.dxs-pdp-included li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-green) 18%, var(--pdp-surface));
}

.dxs-pdp-included li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--pdp-green-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dxs-pdp-included li b,
.dxs-pdp-included li strong { color: var(--color-navy); }

/* ==========================================================================
   4. ORDER CARD + FORM SKIN
   ========================================================================== */
.dxs-pdp-order {
  margin-top: 26px;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1.5px solid var(--pdp-border);
  border-radius: var(--pdp-radius-lg);
  background: var(--pdp-surface);
  box-shadow: var(--shadow-lg);
  /* html already has scroll-padding-top for the sticky header (dripex-header.css); adding the
     header height again left the card ~110px too low when jumped to. */
  scroll-margin-top: 8px;
}

.dxs-pdp-order:focus { outline: none; }

.dxs-pdp-order__head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--pdp-border);
}

.dxs-pdp .dxs-pdp-order__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--color-navy);
}

.dxs-pdp .dxs-pdp-order__sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--gray-700);
}

/* ---- Step numbering (shared by variation rows and the details heading) ---- */
.dxs-pdp form.cart { counter-reset: dxs-step; margin: 0; }

.dxs-pdp form.cart table.variations th.label label::before,
.dxs-pdp .dxs-step-heading::before {
  counter-increment: dxs-step;
  content: counter(dxs-step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-blue);
  background: var(--pdp-tint);
  border: 1.5px solid color-mix(in srgb, var(--color-blue) 30%, var(--pdp-surface));
}

/* ---- Variations table -> stacked steps ---- */
.dxs-pdp form.cart table.variations,
.dxs-pdp form.cart table.variations tbody,
.dxs-pdp form.cart table.variations tr,
.dxs-pdp form.cart table.variations th,
.dxs-pdp form.cart table.variations td {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.dxs-pdp form.cart table.variations tr { margin-bottom: 26px; }

.dxs-pdp form.cart table.variations th.label { margin-bottom: 12px; }

.dxs-pdp form.cart table.variations th.label label,
.dxs-pdp .dxs-step-heading {
  position: relative;
  display: block;
  padding-left: 38px;
  min-height: 26px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-navy);
}

.dxs-pdp form.cart table.variations th.label label::first-letter { text-transform: uppercase; }

.dxs-pdp .dxs-step-heading { margin: 4px 0 0; }

/* "Clear" link is redundant once a pill is always selected */
.dxs-pdp form.cart .reset_variations { display: none !important; }

/* Hide the raw <select> once pills replace it (kept in DOM: WooCommerce drives it) */
.dxs-pdp select.dxs-select-hidden { display: none !important; }

/* ---- Variation pills (native radios) ---- */
/* Equal-width tiles that fill the row: ~3 across in the desktop order card,
   2 across on phones, 1 on very narrow screens. */
.dxs-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 10px;
}

.dxs-pill {
  position: relative;
  display: flex; /* lets the visible box stretch to the tallest pill in its row */
  margin: 0;
  cursor: pointer;
}

.dxs-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.dxs-pill__label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

/* Number leads, shared unit ("Facebook Comments") sits beneath it */
.dxs-pill.has-unit .dxs-pill__main {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--color-navy);
}

.dxs-pill.has-unit .dxs-pill__unit {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
}

.dxs-pill__text {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--pdp-border-strong);
  border-radius: 12px;
  background: var(--pdp-surface);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-800);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dxs-pill__text::before {
  content: '';
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-400);
  background: var(--pdp-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.dxs-pill:hover input:not(:disabled) + .dxs-pill__text {
  border-color: var(--color-blue);
  transform: translateY(-1px);
}

.dxs-pill input:checked + .dxs-pill__text {
  border-color: var(--color-blue);
  background: var(--pdp-tint);
  color: var(--color-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-blue) 16%, transparent);
}

.dxs-pill input:checked + .dxs-pill__text::before {
  border-color: var(--color-blue);
  background: radial-gradient(circle, var(--color-blue) 0 4.5px, var(--pdp-surface) 5px);
}

.dxs-pill input:focus-visible + .dxs-pill__text {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.dxs-pill input:disabled { cursor: not-allowed; }

.dxs-pill input:disabled + .dxs-pill__text {
  opacity: .5;
  border-style: dashed;
  background: var(--gray-100);
}

/* Long option text (e.g. bundle descriptions) reads better as a stacked list */
.dxs-pills.is-list { display: flex; flex-direction: column; gap: 8px; }
.dxs-pills.is-list .dxs-pill { width: 100%; }
.dxs-pills.is-list .dxs-pill__text { width: 100%; }

/* Once the top price follows the selected variation, WooCommerce's own
   duplicate price line is redundant. */
.dxs-pdp.is-enhanced .woocommerce-variation-price,
.dxs-pdp .woocommerce-variation-availability { display: none; }

.dxs-pdp .woocommerce-variation-description p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--gray-700);
}

/* ---- Addon plugin fields (woo-custom-product-addons) ---- */
.dxs-pdp .wcpa_form_outer { margin: 0 0 10px; }
.dxs-pdp .wcpa_wrap .wcpa_row { margin: 0; }

/* the row's flex gap already spaces the button — no trailing field margin */
.dxs-pdp .wcpa_wrap .wcpa_row:last-child .wcpa_field_wrap { margin-bottom: 0; }

.dxs-pdp .wcpa_wrap .wcpa_field_wrap,
.dxs-pdp .wcpa_wrap [class*="wcpa-col-"] {
  padding: 0;
  margin: 0 0 20px;
}

.dxs-pdp .wcpa_wrap .wcpa_field_label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-navy);
}

.dxs-pdp .wcpa_wrap .wcpa_required_ast { margin-left: 3px; color: #DC2626; }

.dxs-pdp .wcpa_wrap .wcpa_field_wrap textarea,
.dxs-pdp .wcpa_wrap .wcpa_field_wrap select,
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="text"],
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="url"],
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="email"],
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="number"],
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="tel"],
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input[type="date"] {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--pdp-border-strong);
  border-radius: 12px;
  background: var(--pdp-surface);
  box-shadow: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-800);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dxs-pdp .wcpa_wrap .wcpa_field_wrap textarea { min-height: 108px; resize: vertical; }

.dxs-pdp .wcpa_wrap .wcpa_field_wrap textarea::placeholder,
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input::placeholder { color: var(--gray-600); opacity: 1; }

.dxs-pdp .wcpa_wrap .wcpa_field_wrap textarea:focus,
.dxs-pdp .wcpa_wrap .wcpa_field_wrap select:focus,
.dxs-pdp .wcpa_wrap .wcpa_field_wrap input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-blue) 16%, transparent);
}

.dxs-pdp .wcpa_wrap .wcpa_description,
.dxs-pdp .wcpa_wrap .wcpa_field_desc { font-size: 13px; color: var(--gray-700); margin-top: 6px; }

.dxs-pdp .wcpa_wrap .wcpa_error,
.dxs-pdp .wcpa_wrap .wcpa_field_error { margin-top: 6px; font-size: 13px; font-weight: 600; color: #DC2626; }

/* Radio / checkbox groups -> selectable chips */
.dxs-pdp .wcpa_wrap fieldset.wcpa_field_wrap { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.dxs-pdp .wcpa_wrap fieldset.wcpa_field_wrap legend.wcpa_field_label { float: none; width: 100%; padding: 0; }

.dxs-pdp .wcpa_wrap .wcpa_field.wcpa_group_field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dxs-pdp .wcpa_wrap .wcpa_radio,
.dxs-pdp .wcpa_wrap .wcpa_checkbox { position: relative; margin: 0; }

.dxs-pdp .wcpa_wrap .wcpa_radio label,
.dxs-pdp .wcpa_wrap .wcpa_checkbox label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 14px 9px 12px;
  border: 1.5px solid var(--pdp-border-strong);
  border-radius: 10px;
  background: var(--pdp-surface);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-800);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.dxs-pdp .wcpa_wrap .wcpa_radio label:hover,
.dxs-pdp .wcpa_wrap .wcpa_checkbox label:hover { border-color: var(--color-blue); }

/* keep the plugin's own indicator (state stays visible without :has()) */
.dxs-pdp .wcpa_wrap .wcpa_radio .wcpa_radio_custom::after { width: 8px; height: 8px; }

.dxs-pdp .wcpa_wrap .wcpa_radio label:has(input:checked),
.dxs-pdp .wcpa_wrap .wcpa_checkbox label:has(input:checked) {
  border-color: var(--color-blue);
  background: var(--pdp-tint);
  color: var(--color-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-blue) 14%, transparent);
}

.dxs-pdp .wcpa_wrap .wcpa_radio label:has(input:focus-visible),
.dxs-pdp .wcpa_wrap .wcpa_checkbox label:has(input:focus-visible) {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ---- Quantity: − / + stepper (JS-built; plain number input without JS) ---- */
.dxs-pdp form.cart .quantity input.qty {
  width: 84px;
  height: 58px;
  padding: 0 10px;
  border: 1.5px solid var(--pdp-border-strong);
  border-radius: 14px;
  background: var(--pdp-surface);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.dxs-pdp form.cart .quantity.dxs-qty {
  display: inline-flex;
  align-items: stretch;
  height: 58px;
  margin: 0;
  border: 1.5px solid var(--pdp-border-strong);
  border-radius: 14px;
  background: var(--pdp-surface);
  overflow: hidden;
}

.dxs-pdp form.cart .quantity.dxs-qty input.qty {
  width: 54px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

.dxs-pdp form.cart .quantity.dxs-qty input.qty::-webkit-outer-spin-button,
.dxs-pdp form.cart .quantity.dxs-qty input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dxs-qty__btn {
  flex: 0 0 auto;
  width: 46px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--color-navy);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dxs-qty__btn:hover { background: var(--gray-100); }
.dxs-qty__btn:focus-visible { outline: 2px solid var(--color-blue); outline-offset: -3px; }

/* ---- Add-to-cart row + button ---- */
.dxs-pdp form.cart .woocommerce-variation-add-to-cart,
.dxs-pdp form.cart:not(.variations_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
  padding-top: 0; /* Storefront adds 16px here */
}

/* WooCommerce/Storefront clearfix pseudo-elements (content:"" display:table)
   become zero-width flex items here, and the gap then insets both ends of
   the row by 14px — drop them, a flex container doesn't need a clearfix. */
.dxs-pdp form.cart .woocommerce-variation-add-to-cart::before,
.dxs-pdp form.cart .woocommerce-variation-add-to-cart::after,
.dxs-pdp form.cart::before,
.dxs-pdp form.cart::after {
  display: none !important; /* outranks Storefront's `.woocommerce div.product form.cart::before` */
}

.dxs-pdp form.cart .single_add_to_cart_button.button.alt,
.dxs-pdp form.cart .single_add_to_cart_button.button {
  flex: 1 1 240px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-red), #C0392B);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--color-red) 32%, transparent);
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.dxs-pdp form.cart .single_add_to_cart_button.button.alt::after {
  content: '\2192';
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.dxs-pdp form.cart .single_add_to_cart_button.button.alt:hover:not(.disabled) {
  background: linear-gradient(135deg, var(--color-red), #C0392B);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--color-red) 40%, transparent);
  filter: brightness(1.04);
}

.dxs-pdp form.cart .single_add_to_cart_button.button.alt:hover:not(.disabled)::after { transform: translateX(4px); }
.dxs-pdp form.cart .single_add_to_cart_button.button.alt:active:not(.disabled) { transform: translateY(0); }

.dxs-pdp form.cart .single_add_to_cart_button.button.alt:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 3px;
}

.dxs-pdp form.cart .single_add_to_cart_button.disabled,
.dxs-pdp form.cart .single_add_to_cart_button:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.dxs-pdp form.cart .single_add_to_cart_button.loading { opacity: .8; pointer-events: none; }
.dxs-pdp form.cart .single_add_to_cart_button.added::after { content: '\2713'; }

/* ---- Assurance list ---- */
.dxs-pdp-assure {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1.5px solid var(--pdp-border);
  display: grid;
  gap: 10px;
}

.dxs-pdp-assure li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-700);
}

.dxs-pdp-assure svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--pdp-green-ink); }

/* ==========================================================================
   5. HOW ORDERING WORKS
   ========================================================================== */
.dxs-pdp-steps { margin-top: clamp(40px, 6vw, 72px); }

.dxs-pdp .dxs-pdp-section-title {
  margin: 0 0 20px;
  font-size: clamp(22px, .8vw + 18px, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--color-navy);
}

.dxs-pdp-steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dxs-pdp-steps__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 22px;
  border: 1.5px solid var(--pdp-border);
  border-radius: var(--pdp-radius-md);
  background: var(--pdp-surface);
}

.dxs-pdp-steps__item strong { font-size: 16px; font-weight: 700; color: var(--color-navy); }
.dxs-pdp-steps__item > span:last-child { font-size: 14px; line-height: 1.5; color: var(--gray-700); }

.dxs-pdp-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 800;
}

/* ==========================================================================
   6. TABS + RELATED
   ========================================================================== */
.dxs-pdp-lower { margin-top: clamp(36px, 5vw, 64px); }

/* Storefront lays tabs out as a floated side column (tab list ~29% wide on
   the left, panel ~65% on the right). Reset that to a horizontal tab row
   above a full-width panel. */
.dxs-pdp .woocommerce-tabs { margin: 0; padding: 0; overflow: visible; }
.dxs-pdp .woocommerce-tabs::before,
.dxs-pdp .woocommerce-tabs::after { display: none; }

.dxs-pdp .woocommerce-tabs ul.tabs {
  float: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
  margin: 0 0 -1.5px;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  border: 0;
  background: none;
}

.dxs-pdp .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
.dxs-pdp .woocommerce-tabs ul.tabs::before,
.dxs-pdp .woocommerce-tabs ul.tabs::after,
.dxs-pdp .woocommerce-tabs ul.tabs li::before,
.dxs-pdp .woocommerce-tabs ul.tabs li::after { display: none; }

.dxs-pdp .woocommerce-tabs ul.tabs li {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.dxs-pdp .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 14px 20px;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.dxs-pdp .woocommerce-tabs ul.tabs li a:hover { color: var(--color-navy); }

.dxs-pdp .woocommerce-tabs ul.tabs li.active a {
  color: var(--color-navy);
  border-bottom-color: var(--color-blue);
}

.dxs-pdp .woocommerce-tabs ul.tabs li a:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: -2px;
  border-radius: 6px;
}

.dxs-pdp .woocommerce-tabs .panel.woocommerce-Tabs-panel {
  float: none;
  width: 100%;
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1.5px solid var(--pdp-border);
  border-radius: 0 var(--pdp-radius-md) var(--pdp-radius-md) var(--pdp-radius-md);
  background: var(--pdp-surface);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--gray-800);
}

/* Tab title already labels the panel */
.dxs-pdp .woocommerce-Tabs-panel > h2:first-child { display: none; }

.dxs-pdp .woocommerce-Tabs-panel p { color: var(--gray-800); max-width: 75ch; }
.dxs-pdp .woocommerce-Tabs-panel blockquote {
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--color-blue);
  color: var(--gray-800);
  font-style: normal;
}

.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}

.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes th,
.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes td {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--pdp-border);
  text-align: left;
  font-size: 14.5px;
  color: var(--gray-800);
  background: transparent;
}

.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes th { width: 34%; font-weight: 700; color: var(--color-navy); }
.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes tr:last-child th,
.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes tr:last-child td { border-bottom: 0; }
.dxs-pdp .woocommerce-Tabs-panel table.shop_attributes td p { margin: 0; }

.dxs-pdp .related.products,
.dxs-pdp .upsells.products { margin-top: clamp(40px, 6vw, 72px); }

/* :first-child matches the specificity of Storefront's
   `.storefront-full-width-content .related.products > h2:first-child`
   (which centers it); ours loads later, so it wins the tie. */
.dxs-pdp .related.products > h2:first-child,
.dxs-pdp .upsells.products > h2:first-child,
.dxs-pdp .up-sells > h2:first-child {
  margin: 0 0 22px;
  text-align: left;
  font-size: clamp(22px, .8vw + 18px, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--color-navy);
}

/* ==========================================================================
   7. MOBILE STICKY ORDER BAR
   ========================================================================== */
.dxs-pdp-bar { display: none; }

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (min-width: 1024px) {
  .dxs-pdp__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(36px, 4.5vw, 64px);
  }

  /* Media column follows the scroll — the info column (with the long order
     form) is the taller one, so the short column is the one that's sticky. */
  .dxs-pdp__media {
    position: sticky;
    top: var(--pdp-sticky-top);
  }

  .dxs-pdp-gallery__frame { aspect-ratio: 5 / 4; }
}

@media (max-width: 1023px) {
  /* Single column. The media wrapper dissolves (display: contents) so its two
     children can be ordered independently: image first, then the buying
     info, and only THEN the trust points — otherwise four stacked tiles push
     the title, price and order form below the fold on phones. */
  .dxs-pdp__media { display: contents; }

  .dxs-pdp-gallery { order: 1; width: 100%; max-width: 640px; margin-inline: auto; }
  .dxs-pdp__info   { order: 2; }
  .dxs-pdp-trust   { order: 3; width: 100%; max-width: none; margin: 0; }

  .dxs-pdp-steps__list { grid-template-columns: 1fr; }

  .dxs-pdp-steps__item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 14px;
  }

  .dxs-pdp-steps__item > span:last-child { flex-basis: 100%; padding-left: 48px; margin-top: -10px; }
  .dxs-pdp-steps__num { margin-bottom: 0; }
}

@media (max-width: 767px) {
  .dxs-pdp { padding-bottom: 96px; }

  /* Breadcrumb scrolls sideways when long — fade the edge so a cut-off word
     reads as "more this way" rather than a rendering glitch. */
  .dxs-pdp-crumbs {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  .dxs-pdp-gallery__frame { border-radius: 18px; }

  .dxs-pdp-trust { grid-template-columns: 1fr; gap: 10px; }

  .dxs-pdp-price { padding: 16px; }

  .dxs-pdp-order { padding: 18px; border-radius: 18px; }

  .dxs-pdp form.cart .single_add_to_cart_button.button.alt,
  .dxs-pdp form.cart .single_add_to_cart_button.button { flex-basis: 100%; }

  .dxs-pdp .woocommerce-tabs .panel.woocommerce-Tabs-panel { border-radius: 0 0 var(--pdp-radius-md) var(--pdp-radius-md); padding: 18px; }

  /* Sticky bar */
  .dxs-pdp-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1.5px solid var(--pdp-border);
    background: color-mix(in srgb, var(--pdp-surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 -8px 24px rgba(13, 27, 62, .10);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform var(--transition-base), visibility var(--transition-base);
  }

  .dxs-pdp-bar.is-visible { transform: translateY(0); visibility: visible; }

  .dxs-pdp-bar__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

  .dxs-pdp-bar__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-700);
  }

  .dxs-pdp-bar__price,
  .dxs-pdp-bar__price .price {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--color-navy);
  }

  .dxs-pdp-bar__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-red), #C0392B);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--color-red) 30%, transparent);
  }

  .dxs-pdp-bar__btn:hover,
  .dxs-pdp-bar__btn:focus { color: #fff; }
}

@media (max-width: 380px) {
  .dxs-pdp-price__value { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .dxs-pdp *,
  .dxs-pdp *::before,
  .dxs-pdp *::after,
  .dxs-pdp-bar { transition: none !important; animation: none !important; }
}
