/**
 * Rescape — Product (PDP / configurator) page styles.
 *
 * Loaded only on single-product pages via Theme::wp_enqueue_scripts().
 * References the same CSS custom properties as theme.css.
 */

/* -------------------------------------------------------------------------
   Slim header (product variant)
   ---------------------------------------------------------------------- */

.rescape-header--product {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.rescape-header--product > .wp-block-group {
  min-height: 64px;
}
/* Hide nav and CTA button that come from the main header template part */
.rescape-header--product .rescape-header__nav,
.rescape-header--product .wp-block-buttons {
  display: none !important;
}

.rescape-header-product__phone {
  font-size: 0.8125rem;
  color: var(--wp--preset--color--ink-mute);
}
.rescape-header-product__phone a {
  color: var(--wp--preset--color--ink);
  font-weight: 500;
}
.rescape-header-product__phone a:hover {
  color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------------------------
   Slim footer (product variant)
   ---------------------------------------------------------------------- */

.rescape-footer-product {
  border-top: 1px solid var(--wp--preset--color--line-soft);
  padding-top: var(--wp--preset--spacing--md) !important;
  padding-bottom: var(--wp--preset--spacing--md) !important;
  font-size: 0.8125rem;
  color: var(--wp--preset--color--ink-mute);
}
.rescape-footer-product > .wp-block-group {
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--md);
}
.rescape-footer-product__nav .wp-block-navigation-item__content {
  font-size: 0.8125rem;
  color: var(--wp--preset--color--ink-soft);
}
.rescape-footer-product__nav .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--ink);
}

/* -------------------------------------------------------------------------
   Intro section
   ---------------------------------------------------------------------- */

.rescape-pdp-intro {
  padding-top: 3.5rem;
}
/* Section-header carries the bottom breathing room; .rescape-pdp-layout
   provides the separator via border-top (see below). */
.rescape-pdp-intro .rescape-sec-head--left {
  margin-bottom: 0 !important;
  padding-bottom: 2rem;
  align-items: center;
}
/* H1 in the half-width intro column: use x-large instead of huge */
.rescape-pdp-intro .rescape-sec-head--left h1,
.rescape-pdp-intro .rescape-sec-head--left h2 {
  font-size: clamp(2rem, 1.2rem + 3.5vw, 3.25rem);
}
/* Right column of intro aligns with the sidebar (360px) on desktop */
.rescape-pdp-intro .rescape-sec-head__col--lead {
  max-width: none;
  margin-left: 0;
}

/* Checkmark list used in the intro right column */
.rescape-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.rescape-check-list li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.0625rem;
  color: var(--wp--preset--color--ink);
}
.rescape-check-list li::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  background: var(--wp--preset--color--primary);
  border-radius: 50%;
  /* SVG checkmark via mask */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-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='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Main two-column layout
   ---------------------------------------------------------------------- */

.rescape-pdp-layout {
  border-top: 1px solid var(--wp--preset--color--line-soft);
  padding-top: 3.5rem;
  padding-bottom: 5rem;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 4rem;
  align-items: start;
}
/* Prevent grid-item blow-out on the form column */
.rescape-pdp-form { min-width: 0; }
/* .is-layout-flow injects margin-block-start on siblings; our grid gap handles
   spacing, so suppress it for all direct children. */
.rescape-pdp-layout > * { margin-block-start: 0; }

/* -------------------------------------------------------------------------
   Sidebar
   ---------------------------------------------------------------------- */

.rescape-pdp-sidebar {
  position: sticky;
  top: 88px; /* slim header height + small gap */
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

/* ── Shared card base ── */
.rescape-pdp-card {
  background: var(--wp--preset--color--background);
  border: 1px solid var(--wp--preset--color--line-soft);
  border-radius: 18px;
  padding: 1.5rem;
}
.rescape-pdp-card--accent {
  border-color: transparent;
  background: linear-gradient(180deg,
    var(--wp--preset--color--card-soft) 0%,
    var(--wp--preset--color--background) 100%);
}
.rescape-pdp-card__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--ink-mute);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* ── Progress steps ── */
.rescape-pdp-steps {
  list-style: none;
  padding: 0;
  margin: 1.125rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  counter-reset: none;
}
.rescape-pdp-steps li {
  display: grid;
  grid-template-columns: 1.375rem 1fr auto;
  gap: 0.625rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--wp--preset--color--ink);
}
.rescape-pdp-steps__dot {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  border: 1.5px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--background);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rescape-pdp-steps li.is-active {
  font-weight: 600;
}
.rescape-pdp-steps li.is-active .rescape-pdp-steps__dot {
  border-color: var(--wp--preset--color--primary);
  background: var(--wp--preset--color--background);
  box-shadow: 0 0 0 4px rgba(0, 112, 0, 0.10);
}
.rescape-pdp-steps li.is-pending {
  color: var(--wp--preset--color--ink-mute);
}
.rescape-pdp-steps__meta {
  font-size: 0.75rem;
  color: var(--wp--preset--color--ink-mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Help box (desktop only, between progress and legal) ── */
.rescape-pdp-help[hidden] { display: none !important; }
.rescape-pdp-card--help {
  padding: 1.125rem 1.25rem;
}
.rescape-pdp-help__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}
.rescape-pdp-help__title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--wp--preset--color--ink);
  line-height: 1.4;
}
.rescape-pdp-help__body {
  margin: 0;
  font-size: 0.84375rem;
  color: var(--wp--preset--color--ink-soft);
  line-height: 1.55;
}
.rescape-pdp-help__close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--wp--preset--color--ink-mute);
  flex-shrink: 0;
  line-height: 0;
  border-radius: 4px;
  transition: color .15s;
}
.rescape-pdp-help__close:hover { color: var(--wp--preset--color--ink); }

/* ── Legal / norm note ── */
.rescape-pdp-note__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--wp--preset--color--ink);
  margin-bottom: 0.5rem;
}
.rescape-pdp-legal p {
  margin: 0;
  font-size: 0.84375rem;
  color: var(--wp--preset--color--ink-soft);
  line-height: 1.55;
}

/* ── Price card ── */
.rescape-pdp-price {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--background);
  border-radius: 18px;
  padding: 1.5rem;
}
.rescape-pdp-price__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(248, 247, 242, 0.7);
  margin: 0 0 0.25rem;
}
.rescape-pdp-price__amount {
  font-family: var(--wp--preset--font-family--display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.375rem 0 0.5rem;
}
.rescape-pdp-price__amount .wpo-formatted-price {
  /* WPO wraps price in this span — inherit styling */
  font: inherit;
  color: inherit;
}
.rescape-pdp-price__note {
  font-size: 0.8125rem;
  color: rgba(248, 247, 242, 0.7);
  margin: 0;
}
/* Hide file format price note once actual plan quality is known. */
.rescape-pdp-has-file-upload .rescape-pdp-price__note-vector {
  display: none;
}
/* Mobile price element (injected by PHP before add-to-cart button) */
.rescape-pdp-price--mobile {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}

/* -------------------------------------------------------------------------
   WPO form styling overrides
   ---------------------------------------------------------------------- */

/* Hide WC quantity input (always 1 for this product) */
.rescape-pdp-form .quantity { display: none !important; }

/* Hide WPO totals container from the main form area — shown in sidebar */
.rescape-pdp-form .wpo-totals-container { display: none !important; }

/* WPO option container: CSS grid for field layout */
.rescape-pdp-form .wpo-options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  row-gap: 2.25rem;
  margin: 0;
}
/* All fields span both columns by default */
.rescape-pdp-form .wpo-options-container > .wpo-field {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
/* Admin sets 'grid' CSS class in WPO backend for 2-col layout */
.rescape-pdp-form .wpo-options-container > .wpo-field.grid {
  grid-column: auto;
}

/* Section heading from WPO display field (admin types <h2>…</h4> in Visual Editor) */
.wpo-options-container > .wpo-field-display:has(h2, h3, h4) {
  padding-top: 1.125rem;
  border-top: 1px solid var(--wp--preset--color--line-soft);
  margin-top: 1.75rem;
}
/* First section heading: no divider or extra gap */
.wpo-options-container > .wpo-field-display:has(h2, h3, h4):first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

/* WPO field wrapper */
.wpo-field { margin-bottom: 2.25rem; }
.wpo-field:last-child { margin-bottom: 0; }

/* Admin-only inline edit widget inside .wpo-option-name — hides from flex row */
.wpo-field-edit { display: none !important; }

/* WPO option name (label) */
.wpo-option-name {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em;
  color: var(--wp--preset--color--ink) !important;
}

/* WPO description: hidden — used as help text source by JS */
.wpo-field-description { display: none !important; }

/* All fields are required — hide redundant asterisk markers */
.wpo-field-required-symbol { display: none !important; }

/* Number fields render a <label> that duplicates the .wpo-option-name above it */
.wpo-field-number > label { display: none !important; }

/* Help button injected by JS next to labels */
.rescape-help-btn {
  width: 1.25rem !important;
  height: 1.25rem !important;
  border-radius: 50% !important;
  border: 1px solid var(--wp--preset--color--line) !important;
  background: var(--wp--preset--color--background) !important;
  color: var(--wp--preset--color--ink-mute) !important;
  display: inline-grid !important;
  place-items: center;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  padding: 0 !important;
  flex-shrink: 0;
  font-size: 0.6875rem !important;
  font-weight: 700;
  line-height: 1;
}
.rescape-help-btn:hover {
  color: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
}
.rescape-help-btn.is-active {
  color: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
  background: rgba(0, 112, 0, 0.06);
}

/* Section heading typography — WPO display field with heading element */
.wpo-field-display h2,
.wpo-field-display h3,
.wpo-field-display h4 {
  font-size: clamp(1.375rem, 1.3vw, 1.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em;
  text-transform: none !important;
  color: var(--wp--preset--color--ink) !important;
  line-height: 1.2;
  margin: 0 !important;
}
.wpo-field-display p {
  font-size: 0.84375rem;
}

/* WPO radio option cards */
.wpo-field-radio .wpo-radios {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.875rem;
  width: 100% !important;
}
.wpo-field-radio .wpo-choice-item {
  display: block !important;
  width: 100% !important;
}
.wpo-field-radio label.wpo-radio {
  position: relative;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 14px;
  background: var(--wp--preset--color--background);
  padding: 1rem 2.5rem 1.125rem 1.25rem; /* right: clear the 20px indicator + 16px inset */
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--wp--preset--color--ink);
  width: 100%;
  box-sizing: border-box;
  min-height: 6rem;
}
.wpo-field-radio label.wpo-radio:hover {
  border-color: var(--wp--preset--color--ink-soft);
}
/* WPO hides the native radio — don't interfere */
.wpo-field-radio input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}
/* Custom radio indicator at top-right */
.wpo-field-radio .wpo-radio-inner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--wp--preset--color--line);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
}
.wpo-field-radio .wpo-radio-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity .15s;
}
.wpo-field-radio label.wpo-radio:has(input:checked) {
  border-color: var(--wp--preset--color--primary);
  box-shadow: 0 0 0 1px var(--wp--preset--color--primary) inset;
}
.wpo-field-radio label.wpo-radio:has(input:checked) .wpo-radio-inner {
  background: var(--wp--preset--color--primary) !important;
  border-color: var(--wp--preset--color--primary) !important;
}
.wpo-field-radio label.wpo-radio:has(input:checked) .wpo-radio-dot {
  opacity: 1 !important;
}
/* Description text injected by JS below a radio choice label */
.rescape-choice-desc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--wp--preset--color--ink-mute);
  line-height: 1.4;
  margin-top: 0.125rem;
}

/* WPO number input */
.wpo-field-number .wpo-field-input {
  width: 100%;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 10px;
  background: var(--wp--preset--color--background);
  font: inherit;
  font-size: 1.0625rem;
  color: var(--wp--preset--color--ink);
  padding: 0.875rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  -moz-appearance: textfield;
}
.wpo-field-number .wpo-field-input:focus {
  outline: none;
  border-color: var(--wp--preset--color--primary);
  box-shadow: 0 0 0 3px rgba(0, 112, 0, 0.08);
}
.wpo-field-number .wpo-field-input::-webkit-outer-spin-button,
.wpo-field-number .wpo-field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ── Stepper component (wraps the number input via JS) ── */
/* Prefix with .wpo-options-container for specificity > WPO's .wpo-field button rule */
.wpo-options-container .wpo-field-number .rescape-stepper {
  display: inline-flex;
  align-items: center;
}
.wpo-options-container .wpo-field-number .rescape-stepper__btn {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  border: 1px solid var(--wp--preset--color--ink);
  background: var(--wp--preset--color--background);
  color: var(--wp--preset--color--ink);
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background .2s, color .2s, border-color .2s;
  user-select: none;
}
.wpo-options-container .wpo-field-number .rescape-stepper__btn:hover:not(:disabled) {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--background);
}
.wpo-options-container .wpo-field-number .rescape-stepper__btn:disabled {
  color: var(--wp--preset--color--ink-mute);
  border-color: var(--wp--preset--color--line);
  opacity: 0.5;
  cursor: not-allowed;
}
.wpo-options-container .wpo-field-number .rescape-stepper input[type="number"] {
  width: 3.75rem;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0.5rem;
  background: transparent;
  color: var(--wp--preset--color--ink);
  -moz-appearance: textfield;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  height: auto;
}
.wpo-options-container .wpo-field-number .rescape-stepper input[type="number"]::-webkit-outer-spin-button,
.wpo-options-container .wpo-field-number .rescape-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wpo-options-container .wpo-field-number .rescape-stepper input[type="number"]:focus {
  outline: none;
  box-shadow: none;
  /* Re-assert all stepper values that WPO's :focus rule (lower specificity 0-4-1)
     would otherwise override. Full WPO focus property list: background-color,
     border, border-radius, box-shadow, box-sizing, font-size, font-weight,
     height, line-height, margin, outline, padding, transition, width. */
  width: 3.75rem;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0.5rem;
}

/* WPO dropdown (nice-select library replaces native <select>) */
.wpo-field-dropdown .nice-select {
  border: 1px solid var(--wp--preset--color--line) !important;
  border-radius: 10px !important;
  background: var(--wp--preset--color--background) !important;
  font-family: var(--wp--preset--font-family--sans) !important;
  font-size: 1.0625rem !important;
  color: var(--wp--preset--color--ink) !important;
  padding: 0.875rem 3rem 0.875rem 1rem !important;
  height: auto !important;
  line-height: 1.4 !important;
  width: 100% !important;
  float: none !important;
}
.wpo-field-dropdown .nice-select::after {
  border-bottom-color: var(--wp--preset--color--ink-mute) !important;
  border-right-color: var(--wp--preset--color--ink-mute) !important;
  right: 1.125rem !important;
  margin-top: -4px !important;
}
.wpo-field-dropdown .nice-select.open {
  border-color: var(--wp--preset--color--primary) !important;
}
.wpo-field-dropdown .nice-select .list {
  border: 1px solid var(--wp--preset--color--line) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  background: var(--wp--preset--color--background) !important;
  margin-top: 4px !important;
  padding: 0.375rem !important;
  width: 100% !important;
  overflow: hidden;
}
.wpo-field-dropdown .nice-select .option {
  font-size: 1.0625rem !important;
  color: var(--wp--preset--color--ink) !important;
  padding: 0.625rem 0.875rem !important;
  border-radius: 6px !important;
  min-height: auto !important;
  line-height: 1.4 !important;
}
.wpo-field-dropdown .nice-select .option:hover,
.wpo-field-dropdown .nice-select .option.focus,
.wpo-field-dropdown .nice-select .option.selected.focus {
  background: var(--wp--preset--color--card-soft) !important;
}
.wpo-field-dropdown .nice-select .option.selected {
  font-weight: 600 !important;
}

/* WPO requires a Choice label for file upload fields — hide the duplicate */
.wpo-field-file_upload .wpo-choice-label { display: none !important; }

/* WPO file upload */
.wpo-field-file_upload .wpo-file-dropzone {
  border: 1.5px dashed var(--wp--preset--color--line) !important;
  border-radius: 18px !important;
  background: var(--wp--preset--color--card-soft) !important;
  padding: 2.5rem 1.75rem !important;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.wpo-field-file_upload .wpo-file-dropzone:hover {
  background: var(--wp--preset--color--background) !important;
  border-color: var(--wp--preset--color--primary) !important;
}
/* First file row: gap above hairline, toggled by JS when files are present. */
.wpo-field-file_upload .wpo-file-dropzone.has-previews .dz-default {
  margin-bottom: 0.625rem;
}
.wpo-field-file_upload .dz-button {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Icon: 44×44 rounded card containing the upload arrow */
.wpo-field-file_upload .dz-button-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--wp--preset--color--card);
  display: inline-grid;
  place-items: center;
  color: var(--wp--preset--color--primary);
  margin-bottom: 0.875rem;
  flex-shrink: 0;
}
/* Hide WPO's default cloud SVG; icon-upload.svg is rendered via the ::after mask. */
.wpo-field-file_upload .dz-button-icon svg { display: none !important; }
/* Render the design upload icon using a CSS mask so it always uses the
   primary colour via background-color, with no dependency on JS timing. */
.wpo-field-file_upload .dz-button-icon::after {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  background-color: var(--wp--preset--color--primary);
  -webkit-mask: url('../images/icon-upload.svg') center / contain no-repeat;
          mask: url('../images/icon-upload.svg') center / contain no-repeat;
}
/* Main title line.
   Selector beats WPO's .wpo-file-dropzone.dropzone .dz-button-label (0,3,0)
   which sets color:#6b6b6b / font-size:16px / font-weight:400. */
.wpo-field-file_upload .wpo-file-dropzone.dropzone .dz-button-label {
  font-size: 0.9375rem; /* 15px — no matching theme.json preset */
  font-weight: 600;
  color: var(--wp--preset--color--ink);
  line-height: 1.4;
}
.wpo-field-file_upload .dz-button-label a {
  color: var(--wp--preset--color--primary);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  text-decoration: none;
}
/* Eyebrow meta: file types and max size, injected by JS */
.rescape-upload-meta {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: var(--wp--preset--color--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* WPO uploaded files */
.wpo-field-file_upload .dz-preview .dz-remove {
  height: 0;
}

/* WPO add-to-cart button */
.rescape-pdp-form .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  border-radius: var(--rescape-radius-pill);
  font-family: var(--wp--preset--font-family--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--on-primary);
  border: none;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), background .25s, box-shadow .25s;
  width: 100%;
  margin-top: 1.75rem;
}
.rescape-pdp-form .single_add_to_cart_button:hover {
  transform: translateY(-1px);
  background: var(--wp--preset--color--primary-deep);
  box-shadow: 0 8px 22px rgba(0, 112, 0, 0.28);
}

/* WPO form bottom actions wrapper */
.rescape-pdp-form .cart {
  margin-top: 0;
}

/* -------------------------------------------------------------------------
   Mobile bottom sheet (help on mobile)
   ---------------------------------------------------------------------- */

.rescape-help-sheet-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.rescape-help-sheet-back.is-open {
  opacity: 1;
  pointer-events: all;
}
.rescape-help-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 201;
  background: var(--wp--preset--color--background);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem 1.5rem 2.5rem;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  max-height: 70vh;
  overflow-y: auto;
}
.rescape-help-sheet.is-open {
  transform: translateY(0);
}
.rescape-help-sheet__handle {
  width: 2.5rem;
  height: 0.25rem;
  background: var(--wp--preset--color--line);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.rescape-help-sheet h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--wp--preset--color--ink);
}
.rescape-help-sheet p {
  font-size: 0.9375rem;
  color: var(--wp--preset--color--ink-soft);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.rescape-help-sheet__close {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--rescape-radius-pill);
  border: 1px solid var(--wp--preset--color--line);
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--wp--preset--color--ink);
  transition: background .2s;
}
.rescape-help-sheet__close:hover {
  background: var(--wp--preset--color--background-warm);
}

/* -------------------------------------------------------------------------
   Responsive: ≤ 1023 px (tablet / mobile)
   ---------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .rescape-pdp-layout {
    display: block !important;
    gap: 0;
  }

  /* Make sidebar children flow into the document order via CSS */
  .rescape-pdp-sidebar {
    position: static;
    display: contents; /* children become direct children of parent */
  }

  /* Mobile ordering within the pdp-layout flex context */
  .rescape-pdp-progress { order: 1; }
  .rescape-pdp-help     { order: 2; } /* hidden; keep in flow */
  .rescape-pdp-legal    { order: 3; }
  .rescape-pdp-form     { order: 4; }
  .rescape-pdp-price--desktop { display: none !important; }
  .rescape-pdp-price--mobile  { display: block; }

  /* Restore card appearance on mobile when they're direct children */
  .rescape-pdp-progress,
  .rescape-pdp-legal {
    margin-bottom: 0.75rem;
  }

  /* Form takes full available width */
  .rescape-pdp-form {
    width: 100%;
  }

  .rescape-pdp-layout {
    padding-top: 2rem;
  }

  .rescape-pdp-intro .rescape-sec-head--left {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--md);
  }
  .rescape-pdp-intro .rescape-sec-head__col--lead {
    margin-left: 0;
    max-width: none;
  }

  .rescape-pdp-layout {
    display: flex !important;
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  .wpo-field-radio .wpo-field-choices,
  .wpo-field-radio .wpo-choices {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   Desktop: ≥ 1024 px
   ---------------------------------------------------------------------- */

@media (min-width: 1024px) {
  /* Intro right column matches the 360px sidebar width */
  .rescape-pdp-intro .rescape-sec-head--left {
    grid-template-columns: 1fr 360px;
    gap: 4rem;
  }
}

/* -------------------------------------------------------------------------
   Plan file quality (WPO field + file preview badge)
   ---------------------------------------------------------------------- */

/* The plan-quality value is shown inline in the field label row via a
   JS-injected .rescape-quality-value span. Hide the nice-select widget
   entirely — clear button, arrow, and option list are all gone. The native
   <select> remains in the DOM for form submission and JS value tracking. */
.wpo-field-dropdown.rescape-plan-quality-field .nice-select {
  display: none !important;
}

/* Append a colon after the label text: "Plangrundlage: Vektor [?]" */
.wpo-field-dropdown.rescape-plan-quality-field .wpo-option-name__text::after {
  content: ':';
}

/* Value span: fills remaining space so the [?] help button stays at the right. */
.wpo-field-dropdown.rescape-plan-quality-field .rescape-quality-value {
  flex: 1;
  font-weight: 600;
  color: var(--wp--preset--color--ink);
}

/* Quality badge injected by JS onto each .dz-preview after inspection.
   Neutral pill — no traffic-light colours; format is informational, not
   a quality judgement. inline-flex + align-items centers the text precisely
   regardless of font metrics, without changing the visual height. */
.rescape-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.375rem;
  padding: 0 0.625rem;
  margin-left: 0.8rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  min-width: 6.5rem;
  flex-shrink: 0;
  background: var(--wp--preset--color--line-soft);
  color: var(--wp--preset--color--ink-soft);
}
