/* =============================================================================
 * DesignDusk — Single Product page restyle (v3 FINAL, shipped 2026-07-20 after
 * 10 owner-feedback rounds on staging; see SAFE_FIXES_IMPLEMENTED.md for the
 * per-round history and every root cause)
 * -----------------------------------------------------------------------------
 * v1 (base): page-scoped restyle of the existing markup, every plugin selector
 *   verified against the REAL staging DOM (post 21007, 2026-07-20):
 *   - grid lives on `.content-single-wrapper` (theme wraps gallery+summary in it
 *     INSIDE div.product; gridding div.product would pull tabs/related into columns)
 *   - add-ons are YITH WAPO (`.yith-wapo-*`), NOT WAPF checkboxes
 *   - WAPF totals = `.wapf-product-totals` (WAPF keeps it display:none here)
 *   - variations = Woo Variation Swatches buttons (`.variable-item`)
 *   - wishlist = WPC Smart Wishlist (`.woosw-btn`), not YITH WCWL
 *   - trust strip = `.dd-trust-block` (inline-styled → !important overrides)
 *   - hero price scoped to `.summary > p.price` (generic `.summary .price` would
 *     also hit WAPF totals + prev/next pagination prices)
 * v3 (enhancement, >=1280px + body.dd-card-on set by dd-product-page.js):
 *   three columns — sticky gallery | steps | sticky order-summary card. Without
 *   the JS (sold covers, custom packages, script failure) or below 1200px the
 *   page stays in the v1 two-column layout with the real in-form controls.
 * Scope: everything under body.dd-product-single (added by product-page.php on
 * is_product() only). No template overrides, no new font.
 * ============================================================================= */

body.dd-product-single {
  --dd-green: var(--dd-brand-green, #067A15);
  --dd-green-dark: var(--dd-brand-green-dark, #067713);
  --dd-navy: #18244a;
  --dd-text: #53617b;
  --dd-muted: #6b7486;
  --dd-border: #e4e9e5;
  --dd-line: rgba(24, 36, 74, .12);
  --dd-soft: #f8faf8;
  --dd-card: #ffffff;
  --dd-radius: 14px;
}

/* STICKY-RAIL FIX (root cause found 2026-07-20): the Customizer "Additional
 * CSS" ships `body { height:100%; overflow:hidden !important }` (and the theme
 * sets body{overflow:hidden auto}) — that makes BODY a scroll container, and
 * position:sticky attaches to the nearest scroll container, so the rails never
 * stuck in ANY browser. Must be !important to outrank the Customizer rule
 * (higher specificity wins between two !importants). Scoped to >=901px so
 * mobile keeps the site-wide behavior (mobile-menu scroll locks etc.).
 * `clip` keeps the horizontal-overflow guard WITHOUT creating a scroll
 * container; #page.site{overflow-x:clip} still guards horizontally anyway. */
@media (min-width: 901px) {
  body.dd-product-single {
    overflow-x: clip !important;
    overflow-y: visible !important;
    height: auto !important;
  }
  /* Cover Preview's scroll-lock is unaffected: it sets
   * html.ddcp-noscroll{overflow:hidden} on the ROOT element (verified while
   * the modal was open), which this body-scoped rule never touches. */
}

/* The parked newsletter experiment (staging-only module, not on live) injects
 * its action pills + two email mini-forms into the buy column. Hidden on
 * product pages pending the approved-decision-14 consolidated design. */
body.dd-product-single .dd-nl-actions,
body.dd-product-single .dd-nl-miniform {
  display: none !important;
}

/* ------------------------------------------------------------------ layout -- */
body.dd-product-single .content-single-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
body.dd-product-single .content-single-wrapper > * { min-width: 0; }
/* Anything unexpected inside the wrapper spans full width (safety), except the
 * two rails + summary which have their own columns. */
body.dd-product-single .content-single-wrapper
  > :not(.woocommerce-product-gallery):not(.summary):not(.dd-buy-card) {
  grid-column: 1 / -1;
}

body.dd-product-single .woocommerce-product-gallery {
  position: sticky !important;   /* woocommerce.css sets relative at higher specificity */
  top: 24px;
  width: 100% !important;
  margin: 0;
  /* LCP fix (PSI 2026-07-20: LCP 12.4s mobile): Woo inlines opacity:0 until its
   * gallery JS initializes — the cover (the page's largest element) painted
   * ~12s late. Premade covers are single-image galleries (columns-1), so the
   * stacked-thumbs flicker this guards against cannot occur. */
  opacity: 1 !important;
  /* theme lays the gallery out as a flex ROW (image + thumbs column) — that
   * squashed the image beside the moved prev/next block. Stack vertically. */
  display: flex;
  flex-direction: column;
}
body.dd-product-single .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
  width: 100% !important;
  flex: 1 1 auto;
}
body.dd-product-single .dd-gallery-extras { width: 100%; }
body.dd-product-single .woocommerce-product-gallery__image img {
  border-radius: var(--dd-radius);
  border: 1px solid var(--dd-line);
}

body.dd-product-single .summary.entry-summary {
  width: 100% !important;
  float: none !important;
  margin: 0;
}

/* ------------------------------------------------------------- title/price -- */
/* display:block is a deliberate FIX, not styling: the Elementor "Header 2"
 * template (post 235, elementor-hf) ships `:root{--page-title-display:none}`
 * site-wide, which hides h1.entry-title — every product page's H1 is invisible
 * on live (verified 2026-07-20, pre-existing). Restored for product pages only. */
body.dd-product-single .product_title {
  display: block;
  color: var(--dd-navy);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

body.dd-product-single .summary > p.price,
body.dd-product-single .summary > p.price .amount {
  color: var(--dd-green);
  font-weight: 800;
}
body.dd-product-single .summary > p.price {
  font-size: 30px;
  margin: 0 0 4px;
}
body.dd-product-single .summary > p.price .dd-price-from {
  font-size: 16px;
  font-weight: 600;
  color: var(--dd-muted);
}
body.dd-product-single .woocommerce-variation-price .price {
  color: var(--dd-green);
  font-weight: 800;
  font-size: 22px;
}

/* Chips — owner 2026-07-20: chips sit together at left; IN STOCK removed on
 * buyable pages (redundant — everything shown is in stock; sold pages keep
 * their own state because the JS never enhances them). */
body.dd-product-single .entry-summary-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
body.dd-product-single.dd-steps-on .entry-summary-top .inventory_status { display: none; }
body.dd-product-single .entry-summary-top .inventory_status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dd-green-dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.dd-product-single .dd-cm-chip { float: none !important; margin: 0 !important; }
body.dd-product-single .dd-cm-chip.dd-cm-badge--designer { background: var(--dd-green); }

/* --------------------------------------------------------- cover selector -- */
body.dd-product-single form.cart .variations {
  border: 0;
  margin: 0 0 14px;
  width: 100%;
}
body.dd-product-single form.cart .variations td,
body.dd-product-single form.cart .variations th {
  display: block;
  padding: 0;
  border: 0;
  text-align: left;
}
body.dd-product-single form.cart .variations th.label label {
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dd-muted);
  font-weight: 600;
}
/* With the step headers active (dd-steps-on, any width) these are redundant:
 * the "Select Cover" table label, Woo's "Clear" link (default variation is
 * preselected; the mockup has no clear state), and WAPF's own "Your Book
 * Details:" intro field (replaced by step 2's header). */
body.dd-product-single.dd-steps-on form.cart .variations th.label,
body.dd-product-single.dd-steps-on form.cart a.reset_variations,
body.dd-product-single.dd-steps-on .dd-field-groupintro { display: none !important; } /* swatches plugin !importants the Clear link */

body.dd-product-single .variable-items-wrapper {
  display: grid !important;
  /* first card carries the longer "Ebook + Paperback" label */
  grid-template-columns: 1.16fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 8px 0 0;
  padding: 4px;               /* room for the selected ✓ badge (it hangs -8px) */
  list-style: none;
  overflow: visible !important;  /* wvs clips the wrapper — hides the badge */
}
body.dd-product-single .variable-items-wrapper .variable-item.button-variable-item {
  overflow: visible !important;
}
body.dd-product-single .variable-items-wrapper .variable-item.button-variable-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: auto !important;
  min-height: 56px;
  width: auto !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--dd-line);
  border-radius: 12px !important;
  background: var(--dd-card);
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
body.dd-product-single .variable-items-wrapper .variable-item .variable-item-contents {
  display: block;
  text-align: left;
}
body.dd-product-single .variable-items-wrapper .variable-item .variable-item-span-button {
  display: block;
  font-weight: 700;
  /* wvs forces 12px — clamp keeps one line at 1280 and grows on wide screens */
  font-size: clamp(12.5px, 0.95vw, 14px) !important;
  text-transform: none;    /* round 4: title-case, one line like the mockup */
  letter-spacing: 0;
  color: var(--dd-navy);
  white-space: normal;
  word-break: normal;      /* theme/wvs break-all splits "PAPERBACK" mid-word */
  overflow-wrap: normal;
  line-height: 1.3;
  text-align: left;
}
/* wvs hover tooltip (dark grey box) fades in over the selected-card badge —
 * the cards already carry full labels + subtitles, so it goes entirely */
body.dd-product-single .variable-items-wrapper .variable-item::before { display: none !important; }
body.dd-product-single .dd-vi-sub {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--dd-text);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  word-break: normal;       /* wvs break-all split subtitle words mid-word */
  overflow-wrap: normal;
}
body.dd-product-single .variable-items-wrapper .variable-item:hover {
  border-color: rgba(10, 169, 31, .55);
}
body.dd-product-single .variable-items-wrapper .variable-item.selected {
  border-color: var(--dd-green);
  box-shadow: 0 0 0 1px var(--dd-green) !important;
  background: #f5fbf5;
}
body.dd-product-single .variable-items-wrapper .variable-item.selected::after {
  content: "\2713";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dd-green);
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  font-weight: 700;
  display: block;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;      /* wvs's own hidden ::after tooltip sets 0/hidden */
  visibility: visible !important;
}

/* ---------------------------------------------------- WAPF: book details ---- */
body.dd-product-single .wapf-field-container { margin-bottom: 16px; }

body.dd-product-single .wapf-field-label label {
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dd-muted);
  font-weight: 600;
}

body.dd-product-single .wapf-field-container input.wapf-input,
body.dd-product-single .wapf-field-container textarea.wapf-input,
body.dd-product-single .wapf-field-container select.wapf-input {
  width: 100%;
  background: var(--dd-card);
  border: 1px solid rgba(24, 36, 74, .16);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--dd-navy);
  font-size: 15px;
}
body.dd-product-single .wapf-field-container input.wapf-input:focus,
body.dd-product-single .wapf-field-container textarea.wapf-input:focus,
body.dd-product-single .wapf-field-container select.wapf-input:focus {
  outline: none;
  border-color: var(--dd-green);
}

/* --------------------------------------------------- YITH WAPO: add-ons ----- */
body.dd-product-single .yith-wapo-addon {
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 14px 16px;
  margin: 0 0 18px;
}
body.dd-product-single .yith-wapo-addon h4.wapo-addon-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dd-navy);
  letter-spacing: .01em;
}
/* JS opened the collapsed block and the step-3 header replaces its title */
body.dd-product-single.dd-addons-open .yith-wapo-addon .addon-header { display: none; }
body.dd-product-single.dd-addons-open .yith-wapo-addon { border: 0; padding: 0; }

body.dd-product-single .yith-wapo-option {
  display: flex;
  align-items: flex-start;
  padding: 12px 15px;
  margin: 8px 0 0;
  border: 1px solid var(--dd-line);
  border-radius: 12px;
  background: var(--dd-card);
  transition: border-color .15s;
}
body.dd-product-single .yith-wapo-option:hover { border-color: rgba(10, 169, 31, .55); }
body.dd-product-single .yith-wapo-option label.yith-wapo-addon-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  color: var(--dd-navy);
  font-weight: 600;
  cursor: pointer;
}
body.dd-product-single .yith-wapo-option .option-price {
  color: var(--dd-green);
  font-weight: 700;
  white-space: nowrap;
}
body.dd-product-single .yith-wapo-option .option-price .brackets { display: none; }

/* ------------------------------------------------- WAPF totals (if shown) --- */
body.dd-product-single .wapf-product-totals {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  background: var(--dd-soft);
}
body.dd-product-single .wapf-product-totals .wapf--inner > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 3px 0;
  color: var(--dd-text);
}
body.dd-product-single .wapf-product-totals .wapf--inner > div:last-child {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--dd-line);
}
body.dd-product-single .wapf-product-totals span.wapf-grand-total {
  color: var(--dd-green);
  font-weight: 800;
  font-size: 26px;
}

/* ----------------------------------------------------- DnD file upload ------ */
/* (sizing/layout lives in the canonical rebuild block further down) */
body.dd-product-single .codedropz-upload-handler,
body.dd-product-single .wc-dnd-file-upload .dnd-upload-form {
  border: 2px dashed rgba(24, 36, 74, .22) !important; /* plugin ships green dashed */
  border-radius: var(--dd-radius);
  background: var(--dd-card);
  transition: border-color .15s;
}
body.dd-product-single .codedropz-upload-handler:hover { border-color: var(--dd-green) !important; }
body.dd-product-single .codedropz-btn-wrap .cd-upload-btn {
  background: var(--dd-green);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 18px;
}
body.dd-product-single .codedropz-btn-wrap .cd-upload-btn:hover { background: var(--dd-green-dark); }

/* ------------------------------------------------------------- add to cart -- */
body.dd-product-single .single_add_to_cart_button {
  background: var(--dd-green) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 16px 22px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  box-shadow: 0 10px 26px rgba(10, 169, 31, .28);
  transition: background .15s;
}
body.dd-product-single .single_add_to_cart_button:hover {
  background: var(--dd-green-dark) !important;
}

body.dd-product-single .quantity_wrap .quantity_label {
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dd-muted);
  font-weight: 600;
}
body.dd-product-single .quantity input.qty {
  border: 1px solid rgba(24, 36, 74, .18);
  border-radius: 10px;
  padding: 10px;
  color: var(--dd-navy);
}

body.dd-product-single .woosw-btn { color: var(--dd-text); }

/* ------------------------------------------------------------------- tabs -- */
body.dd-product-single .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0 0 28px;
  padding: 0;
  border-bottom: 1px solid var(--dd-line);
}
body.dd-product-single .woocommerce-tabs ul.tabs::before { display: none; }
body.dd-product-single .woocommerce-tabs ul.tabs li {
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
body.dd-product-single .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 0 2px 16px;
  color: var(--dd-muted);
  font-weight: 600;
  font-size: 16px;
}
body.dd-product-single .woocommerce-tabs ul.tabs li.active a { color: var(--dd-navy); }
body.dd-product-single .woocommerce-tabs ul.tabs li.active {
  box-shadow: inset 0 -3px 0 0 var(--dd-green);
}
/* Owner 2026-07-20: description full width, smaller, not italic */
body.dd-product-single .woocommerce-Tabs-panel {
  max-width: none;
  color: var(--dd-text);
  line-height: 1.7;
  font-size: 15px;
}
body.dd-product-single .woocommerce-Tabs-panel p,
body.dd-product-single .woocommerce-Tabs-panel em,
body.dd-product-single .woocommerce-Tabs-panel i {
  font-style: normal;
  font-size: 15px;
  text-align: left;
}
body.dd-product-single .woocommerce-Tabs-panel h2 {
  color: var(--dd-navy);
  font-weight: 700;
  letter-spacing: -.01em;
}
/* Categories/tags relocated here from the buy column (JS) */
body.dd-product-single .woocommerce-Tabs-panel .product_meta {
  display: block;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--dd-line);
  font-size: 13.5px;
  line-height: 2;
}
body.dd-product-single .woocommerce-Tabs-panel .product_meta > span { display: block; }

/* ---------------------------------------------------------- trust block ---- */
body.dd-product-single .dd-trust-block {
  margin: 28px 0 !important;
  padding: 24px 22px !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #fff, #f4f8f4) !important;
}
body.dd-product-single .dd-trust-block ul {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
}
body.dd-product-single .dd-trust-block li strong { color: var(--dd-navy); }

/* ------------------------------------------------------- related products -- */
body.dd-product-single .related.products {
  margin-top: 28px !important;    /* round 4: heading needs air above */
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.dd-product-single .related.products h2 { margin: 0 0 18px; }
body.dd-product-single .related.products ul.products { margin-bottom: 0 !important; }

/* Column-end cleanup (round 4: stray hairlines + dead space after the last
 * add-on came from hidden controls' containers and the empty WAPF totals box) */
body.dd-product-single .wapf-product-totals { display: none !important; } /* the order card is the totals UI */
body.dd-product-single form.cart .woocommerce-variation-add-to-cart {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}
body.dd-product-single .summary hr,
body.dd-product-single form.cart hr { display: none !important; }
body.dd-product-single .yith-wapo-container { margin-bottom: 0 !important; }

/* Chosen add-ons listed inside the order card */
body.dd-product-single .dd-bc-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
body.dd-product-single .dd-bc-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 2px 10px;
  font-size: 12.5px;
  color: var(--dd-muted);
}
body.dd-product-single .dd-bc-list li span:last-child { white-space: nowrap; }
body.dd-product-single .related.products h2 {
  color: var(--dd-navy);
  font-weight: 700;
  letter-spacing: -.02em;
}
body.dd-product-single .related.products li.product img {
  border-radius: 12px;
  border: 1px solid var(--dd-line);
}

/* =============================================================================
 * v2 — three-section enhancement (dd-product-page.js sets body.dd-card-on)
 * ============================================================================= */

/* Step headers (JS-inserted) */
/* .dd-step margins: canonical values in the refinements section below */
body.dd-product-single .dd-step__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
body.dd-product-single .dd-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--dd-green);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}
body.dd-product-single .dd-step__title {
  margin: 0;
  font-size: 15px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--dd-navy);
  font-weight: 600;
}
body.dd-product-single .dd-step__extra {
  color: var(--dd-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
body.dd-product-single .dd-step__help {
  margin: 3px 0 0;
  padding-left: 42px;
  font-size: 14px;
  color: var(--dd-text);
}

/* Gallery extras — round 4: prev/next AND share icons on ONE line */
body.dd-product-single .dd-gallery-extras {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
body.dd-product-single .dd-gallery-extras .bookory-product-pagination-wrap { margin: 0; }
body.dd-product-single .dd-gallery-extras .bookory-social-share { margin: 0; display: flex; align-items: center; gap: 8px; }
/* Owner round 3: share icons small + uniform (theme mixes brand-coloured
 * circles with Pinterest's big red Save pill) */
body.dd-product-single .dd-gallery-extras .bookory-social-share .social-share-header {
  font-size: 12px;
  color: var(--dd-muted);
  margin-right: 2px;
}
body.dd-product-single .dd-gallery-extras .bookory-social-share a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #eef1f5 !important;
  color: #47526b !important;
  font-size: 12px !important;
  padding: 0 !important;
  line-height: 1 !important;
}
body.dd-product-single .dd-gallery-extras .bookory-social-share a i { font-size: 12px; }
body.dd-product-single .dd-gallery-extras .bookory-social-share a img,
body.dd-product-single .dd-gallery-extras .bookory-social-share a span { display: none !important; }
/* Pinterest injects its own red "Save" widget — unstylable image pill; hidden
 * for consistency (FB/Twitter/LinkedIn circles remain) */
body.dd-product-single .dd-gallery-extras [data-pin-log],
body.dd-product-single .dd-gallery-extras span[class*="_button_pin"] { display: none !important; }

/* Order-summary card — hidden unless the >=1200px enhanced layout is active */
body.dd-product-single .dd-buy-card { display: none; }

@media (min-width: 1280px) {
  body.dd-product-single.dd-card-on .content-single-wrapper {
    grid-template-columns: minmax(0, 410px) minmax(420px, 1fr) minmax(0, 290px);
    gap: clamp(20px, 2.1vw, 30px);
  }
  body.dd-product-single.dd-card-on .dd-buy-card {
    display: block;
    position: sticky;
    top: 24px;
  }
  /* The card is the single buy control + price display at this width:
   * hide the in-form originals it proxies (they stay functional for the JS). */
  body.dd-product-single.dd-card-on form.cart .quantity_wrap,
  body.dd-product-single.dd-card-on form.cart .single_add_to_cart_button,
  body.dd-product-single.dd-card-on form.cart .woosw-btn,
  body.dd-product-single.dd-card-on form.cart .woocommerce-variation-price {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0 !important;
    pointer-events: none !important;  /* JS .click() still works */
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
}

body.dd-product-single .dd-buy-card__inner {
  background: var(--dd-card);
  border: 1px solid rgba(24, 36, 74, .14);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 44px rgba(24, 36, 74, .11);
}
body.dd-product-single .dd-buy-card__title {
  font-weight: 700;
  font-size: 21px;
  color: var(--dd-navy);
  line-height: 1.15;
}
body.dd-product-single .dd-buy-card__variant {
  font-size: 13px;
  color: var(--dd-muted);
  margin: 2px 0 18px;
  min-height: 1em;
}
body.dd-product-single .dd-buy-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--dd-text);
  margin-bottom: 9px;
}
body.dd-product-single .dd-buy-card__hr {
  height: 1px;
  background: var(--dd-line);
  margin: 15px 0;
}
body.dd-product-single .dd-buy-card__grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
body.dd-product-single .dd-buy-card__grand span {
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dd-text);
}
body.dd-product-single .dd-buy-card__grand strong {
  font-weight: 800;
  font-size: 30px;
  color: var(--dd-green);
  line-height: 1;
}
/* No quantity control by design: sold-once covers, quantity hidden store-wide */
body.dd-product-single .dd-buy-card__cta {
  width: 100%;
  background: var(--dd-green);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(10, 169, 31, .28);
  transition: background .15s;
}
body.dd-product-single .dd-buy-card__cta:hover { background: var(--dd-green-dark); }
body.dd-product-single .dd-buy-card__cta.dd-is-disabled { opacity: .55; }
body.dd-product-single .dd-buy-card__wish {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: var(--dd-text);
  border: 1px solid rgba(24, 36, 74, .2);
  border-radius: 12px;
  padding: 13px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
body.dd-product-single .dd-buy-card__wish:hover {
  border-color: var(--dd-green);
  color: var(--dd-green);
}
body.dd-product-single .dd-buy-card__note {
  font-size: 12.5px;
  color: var(--dd-muted);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.55;
}
body.dd-product-single .dd-buy-card__pay {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}
body.dd-product-single .dd-pay-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #2a3550;
  border: 1px solid rgba(24, 36, 74, .18);
  border-radius: 4px;
  padding: 2px 5px;
  background: #fff;
  white-space: nowrap;
}

/* ------------------------------------------- wishlist page (woosw) polish -- */
/* Round 6 "keep it simple": a plain list — thumbnail, name, price, button.
 * Share-link row and dates hidden. Scoped to body.dd-wishlist-page (module
 * adds it on the [woosw_list] page). Literal colors: tokens are product-scoped. */
body.dd-wishlist-page .woosw-list img,
body.dd-wishlist-page .woosw-items img {
  max-width: 72px !important;
  width: 72px;
  height: auto;
  border-radius: 6px;
  display: block;
}
body.dd-wishlist-page .woosw-list table,
body.dd-wishlist-page .woosw-items { border: 0 !important; }
body.dd-wishlist-page .woosw-items .woosw-item td,
body.dd-wishlist-page .woosw-list table td {
  padding: 12px 10px;
  vertical-align: middle;
  border: 0 !important;
  border-bottom: 1px solid #edf0f4 !important;
}
body.dd-wishlist-page .woosw-item--remove { width: 30px; }
body.dd-wishlist-page .woosw-item--remove span { cursor: pointer; color: #9aa3b5; }
body.dd-wishlist-page .woosw-item--image { width: 84px; }
body.dd-wishlist-page .woosw-item--name,
body.dd-wishlist-page .woosw-item--name a {
  color: #18244a;
  font-weight: 600;
  font-size: 15.5px;
}
body.dd-wishlist-page .woosw-item--price { color: var(--dd-brand-green-dark, #067713); font-weight: 700; }
body.dd-wishlist-page .woosw-item--time { display: none !important; }   /* dates = clutter */
body.dd-wishlist-page .woosw-copy { display: none !important; }         /* share-link row */

/* Logged-in: keep the sticky rails clear of the WP admin bar */
body.admin-bar.dd-product-single .woocommerce-product-gallery,
body.admin-bar.dd-product-single .dd-buy-card { top: 56px; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 900px) {
  body.dd-product-single .content-single-wrapper {
    grid-template-columns: 1fr;
  }
  body.dd-product-single .woocommerce-product-gallery {
    position: static !important;  /* must outrank the desktop sticky !important */
    max-width: 460px;
  }
}
@media (max-width: 560px) {
  body.dd-product-single .variable-items-wrapper {
    grid-template-columns: 1fr;
  }
  body.dd-product-single .single_add_to_cart_button {
    width: 100% !important;
  }
}


/* =============================================================================
 * v3 approved refinements
 * - Keeps the real Bookory/Woo/WAPF/YITH form.
 * - Adds a compact title/price row, semantic field grid, optional disclosure,
 *   grouped add-ons, gallery preview action and a narrower order-summary rail.
 * ============================================================================= */

body.dd-product-single .content-single-wrapper {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

body.dd-product-single .summary.entry-summary {
  font-size: 15px;
}

/* Product title + live Woo price (owner: tighter overall spacing) */
body.dd-product-single .dd-product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin: 2px 0 10px;
}
body.dd-product-single .dd-product-title-row .product_title {
  margin: 0;
  font-size: clamp(26px, 2.5vw, 38px); /* fits beside the price in the 3-rail middle column */
}
body.dd-product-single .dd-title-price {
  min-width: 145px;
  text-align: right;
}
body.dd-product-single .dd-title-price > span {
  display: block;
  color: var(--dd-muted);
  font-size: 12px;
  line-height: 1.2;
}
body.dd-product-single .dd-title-price > p.price,
body.dd-product-single .dd-title-price > p.price .amount {
  margin: 0;
  color: var(--dd-green);
  font-size: 31px;
  font-weight: 800;
  line-height: 1.05;
}
body.dd-product-single .dd-title-price small {
  display: block;
  margin-top: 4px;
  color: var(--dd-muted);
  font-size: 11px;
}

/* Preview editor action directly beneath the real gallery */
body.dd-product-single .dd-cover-preview-action {
  margin-top: 12px;
}
body.dd-product-single .dd-cover-preview-action__button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid #121b35;
  border-radius: 7px;
  background: #121b35;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
body.dd-product-single .dd-cover-preview-action__button:hover,
body.dd-product-single .dd-cover-preview-action__button:focus-visible {
  border-color: #223154;
  background: #223154;
  color: #fff;
}
body.dd-product-single .dd-cover-preview-action__button:focus-visible {
  outline: 3px solid rgba(10, 169, 31, .25);
  outline-offset: 3px;
}
body.dd-product-single .dd-cover-preview-action__button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* Purchase steps (tightened) */
body.dd-product-single .dd-step {
  margin: 16px 0 10px;
}
/* empty theme container between title and form carried a 23px margin */
body.dd-product-single .product_after_title { margin: 0 !important; }
body.dd-product-single .dd-step__title {
  font-size: 16px;
  font-weight: 650;
}
body.dd-product-single .dd-step__help {
  font-size: 14px;
}

/* Real WAPF fields, arranged without changing field keys or validation.
 * AS-BUILT FIX vs package src: WAPF nests containers inside
 * `.wapf-field-group > .wapf-field-row` (verified staging DOM), so the
 * package's wrapper-level grid never matched. Lay out each field ROW as a
 * wrapping flex line instead, overriding WAPF's inline width:% on containers.
 * Gated on .dd-fields-ready (JS) so the no-JS fallback keeps WAPF defaults. */
body.dd-product-single .wapf-wrapper.dd-fields-ready .wapf-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
body.dd-product-single .wapf-wrapper.dd-fields-ready .wapf-field-container {
  width: auto !important;   /* WAPF prints inline width:% — the flex basis rules below own sizing */
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}
body.dd-product-single .wapf-wrapper.dd-fields-ready .dd-field-title,
body.dd-product-single .wapf-wrapper.dd-fields-ready .dd-field-reference,
body.dd-product-single .wapf-wrapper.dd-fields-ready .dd-field-full,
body.dd-product-single .wapf-wrapper.dd-fields-ready .wapf-field-content,
body.dd-product-single .wapf-wrapper.dd-fields-ready .wapf-field-textarea {
  flex-basis: 100%;
}
body.dd-product-single .wapf-wrapper.dd-fields-ready .dd-optional-details {
  margin-top: 12px;
}

/* The WAPF "Your Book Details:" content field doubles as the section heading
 * until the numbered step headers ship (increment 2 hides it instead). */
body.dd-product-single .wapf-field-content .wapf-field-label label {
  font-size: 16px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--dd-navy);
  font-weight: 700;
}
body.dd-product-single .wapf-field-content div.wapf-input {
  color: var(--dd-text);
  font-size: 14px;
}
body.dd-product-single .wapf-field-label label {
  font-size: 13px;
}
body.dd-product-single .wapf-field-container input.wapf-input,
body.dd-product-single .wapf-field-container textarea.wapf-input,
body.dd-product-single .wapf-field-container select.wapf-input {
  min-height: 50px;
  padding: 12px 14px;
  font-size: 15px;
}
body.dd-product-single .wapf-field-container textarea.wapf-input {
  min-height: 92px;
}

/* Optional details remain inside the real product form */
body.dd-product-single .dd-optional-details {
  margin-top: 2px;
  border: 1px solid var(--dd-line);
  border-radius: 10px;
  background: #fff;
}
body.dd-product-single .dd-optional-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  color: var(--dd-navy);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
body.dd-product-single .dd-optional-details > summary::-webkit-details-marker {
  display: none;
}
body.dd-product-single .dd-optional-details > summary::after {
  content: '+';
  color: var(--dd-green);
  font-size: 20px;
  line-height: 1;
}
body.dd-product-single .dd-optional-details[open] > summary::after {
  content: '−';
}
body.dd-product-single .dd-optional-details__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 15px 15px;
}
body.dd-product-single .dd-optional-details__body > .wapf-field-container {
  margin: 0;
}
body.dd-product-single .dd-optional-details__body .dd-field-full,
body.dd-product-single .dd-optional-details__body .dd-field-notes {
  grid-column: 1 / -1;
}

/* Reference upload, rebuilt as one clean row (round 4 — the plugin was forcing
 * a 503px min width that overflowed the 420px column under the order card,
 * which is why every padding tweak still "looked bad"). Markup (verified):
 * .codedropz-upload-handler > .codedropz-upload-container > -inner > -label
 * [.cd-icon/.text/.cd-separator/.cd-upload-btn] + span.dnd-upload-counter */
body.dd-product-single .wc-dnd-file-upload,
body.dd-product-single .codedropz-upload-handler,
body.dd-product-single .codedropz-upload-container,
body.dd-product-single .codedropz-upload-inner {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
body.dd-product-single .codedropz-upload-handler {
  display: flex !important;   /* plugin CSS re-blocks it */
  align-items: center;
  gap: 8px;
  min-height: 48px;
  height: auto !important;
  padding: 4px 14px !important;
  border-width: 1.5px;
  border-radius: 10px;
}
body.dd-product-single .codedropz-upload-container { flex: 1 1 auto; }
body.dd-product-single .codedropz-upload-inner { font-size: 13px; padding: 0; margin: 0; }
body.dd-product-single .codedropz-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
body.dd-product-single .codedropz-label .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dd-text);
}
body.dd-product-single .codedropz-label .cd-separator { color: var(--dd-muted); font-size: 12px; }
body.dd-product-single .codedropz-btn-wrap .cd-upload-btn,
body.dd-product-single .codedropz-label .cd-upload-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 12.5px;
  background: var(--dd-green);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
}
body.dd-product-single .dnd-upload-counter {
  flex: 0 0 auto;
  position: static !important;  /* plugin pins it absolute bottom-right */
  margin: 0 0 0 auto !important;
  font-size: 11.5px;
  color: var(--dd-muted);
  white-space: nowrap;
}
/* Phones (owner round 8): drag-and-drop is meaningless on touch and the full
 * text can't fit — icon + "Reference files" + Browse + counter instead */
@media (max-width: 768px) {
  /* Woo's smallscreen CSS squeezes form.cart to 80% with !important at equal
   * specificity (and loads later) — the extra class wins the tie */
  body.dd-product-single.dd-steps-on form.variations_form.cart,
  body.dd-product-single form.variations_form.cart {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* plugin's mobile CSS makes the Browse button display:block (full width) */
  body.dd-product-single .cd-upload-btn {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0 !important;
  }
  body.dd-product-single .codedropz-label .text,
  body.dd-product-single .codedropz-label .cd-separator { display: none !important; }
  /* no text label at all on phones — icon + Browse Files + counter is
   * self-explanatory and nothing can clip (owner round 9) */
  body.dd-product-single .codedropz-label {
    gap: 10px;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }
  body.dd-product-single .codedropz-label .cd-upload-btn {
    padding: 7px 14px;
    font-size: 12.5px;
  }
  body.dd-product-single .codedropz-upload-handler { min-height: 50px; padding: 4px 12px !important; }
}
body.dd-product-single .codedropz-upload-inner,
body.dd-product-single .codedropz-upload-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* Owner decision 2026-07-20: PayPal/Pay-in-4/GPay express buttons are NOT on
 * the product page (not in the approved design). They remain in cart/checkout.
 * Delete this block to restore them here. */
body.dd-product-single .summary .ppc-button-wrapper,
body.dd-product-single .summary [id^="ppc-button"],
body.dd-product-single .summary .ppcp-messages {
  display: none !important;
}

/* Add-on group labels and cards */
body.dd-product-single .dd-addon-group-label {
  margin: 22px 0 8px;
  color: var(--dd-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
body.dd-product-single .dd-addon-group-label:first-child {
  margin-top: 4px;
}
body.dd-product-single .yith-wapo-option {
  min-height: 44px;
  margin-top: 5px;
  padding: 9px 12px;
  border-radius: 10px;
}
body.dd-product-single .yith-wapo-option label.yith-wapo-addon-label {
  font-size: 14px;
  align-items: center;
}
body.dd-product-single .yith-wapo-option .option-price {
  font-size: 13.5px;
  margin-left: auto;   /* price hard-right on the row, uniformly */
}
body.dd-product-single .dd-addon-group-label { margin: 14px 0 4px; }

/* AS-BUILT FIX: the option row is flex; YITH renders `p.description` as a
 * SIBLING of the .label block, so it was squashed sideways against the price
 * ("+$20.00Title, author name…"). Stack the option vertically: control row on
 * top, description underneath, indented past the checkbox. */
body.dd-product-single .yith-wapo-option {
  flex-direction: column;
  align-items: stretch;
}
/* full-width chain so the price's auto margin has room to push right —
 * .option-container in the middle otherwise shrinks to content */
body.dd-product-single .yith-wapo-option .label,
body.dd-product-single .yith-wapo-option .option-container,
body.dd-product-single .yith-wapo-option .checkbox-button-container,
body.dd-product-single .yith-wapo-option label.yith-wapo-addon-label {
  width: 100% !important;
  min-width: 0;
}
body.dd-product-single .yith-wapo-option .checkbox-button-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
body.dd-product-single .yith-wapo-option p.description {
  margin: 7px 0 0 30px;
  font-size: 13px;
  font-weight: 400;
  color: var(--dd-muted);
  line-height: 1.55;
}

/* Narrower, calmer order summary */
body.dd-product-single .dd-buy-card__inner {
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(24, 36, 74, .09);
}
body.dd-product-single .dd-buy-card__title {
  font-size: 20px;
}
body.dd-product-single .dd-buy-card__grand strong {
  font-size: 29px;
}
body.dd-product-single .dd-buy-card__cta {
  min-height: 50px;
  padding: 13px 14px;
  border-radius: 9px;
  box-shadow: none;
}
body.dd-product-single .dd-buy-card__wish {
  min-height: 44px;
  border-radius: 9px;
}
body.dd-product-single .dd-buy-card__note {
  font-size: 12px;
}
body.dd-product-single .dd-buy-card__pay {
  flex-wrap: nowrap; /* owner: icons on one line, no label */
  gap: 4px;
}

/* Existing trust, tabs and related products: larger readable type, compact width */
body.dd-product-single .dd-trust-block {
  width: min(1280px, calc(100% - 40px));
  margin: 34px auto !important;
}
body.dd-product-single .dd-trust-block li {
  font-size: 15px;
}

/* Trust strip as 5 icon cards (JS rebuilds the module's list; mockup design) */
body.dd-product-single .dd-trust-block--cards {
  padding: 30px 28px !important;
  background: linear-gradient(180deg, #fff, #f7faf7) !important;
}
body.dd-product-single .dd-trust-block--cards ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.dd-product-single .dd-trust-block--cards li { margin: 0 !important; padding: 0 !important; }
body.dd-product-single .dd-tb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 169, 31, .12);
  color: var(--dd-green);
  margin-bottom: 12px;
}
body.dd-product-single .dd-tb-icon svg { width: 20px; height: 20px; }
body.dd-product-single .dd-trust-block--cards li strong {
  display: block;
  font-size: 16px;
  color: var(--dd-navy);
  margin-bottom: 6px;
}
body.dd-product-single .dd-trust-block--cards li p {
  margin: 0;
  font-size: 13.5px;
  color: var(--dd-text);
  line-height: 1.55;
}
@media (max-width: 900px) {
  body.dd-product-single .dd-trust-block--cards ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body.dd-product-single .dd-trust-block--cards ul { grid-template-columns: 1fr; }
}
body.dd-product-single .woocommerce-tabs,
body.dd-product-single .related.products {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
body.dd-product-single .woocommerce-Tabs-panel {
  font-size: 16px;
}

@media (min-width: 901px) and (max-width: 1279px) {
  body.dd-product-single .content-single-wrapper {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 32px;
  }
  body.dd-product-single .dd-buy-card {
    display: none !important;
  }
}

/* Owner round 3: with the card active the card is the ONLY price on the page —
 * "From $49.99" next to a $99.99 card total read as two conflicting prices.
 * The whole title-price box (price + USD note) hides at card widths; below
 * 1280 the title price + price-clarity one-price behavior remain. */
@media (min-width: 1280px) {
  body.dd-product-single.dd-card-on .dd-title-price { display: none; }
}
/* The green "1 in stock" availability banner goes on enhanced pages (owner) */
body.dd-product-single.dd-steps-on .woocommerce-variation-availability { display: none !important; }
/* Round 6: some variations carry a marketing description Woo injects under the
 * swatches on selection — off the buy column (owner: "what is this"); the SKU
 * line likewise (the tabs carry product meta now) */
body.dd-product-single.dd-steps-on .woocommerce-variation-description { display: none !important; }
body.dd-product-single.dd-steps-on .summary .sku_wrapper,
body.dd-product-single.dd-steps-on .summary .product-sku { display: none !important; }
/* Round 6: no wishlist popup on product pages — the card button carries the
 * saved-state feedback instead (header count still updates) */
body.dd-product-single #woosw_wishlist,
body.dd-product-single .woosw-popup { display: none !important; }

/* Round 7: the parked newsletter module's sticky "Claim This Cover" bar is
 * replaced by our functional buy bar below */
body.dd-product-single .dd-nl-sticky { display: none !important; }

/* Mobile/tablet sticky buy bar: live total + real Add to cart, appears while
 * the in-form button is scrolled out of view (JS toggles dd-bb-visible) */
body.dd-product-single .dd-buy-bar { display: none; }
@media (max-width: 1279px) {
  body.dd-product-single.dd-card-on .dd-buy-bar.dd-bb-visible {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--dd-line);
    box-shadow: 0 -6px 20px rgba(24, 36, 74, .08);
  }
  body.dd-product-single .dd-buy-bar__price {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
  }
  body.dd-product-single .dd-bb-label {
    font-size: 11px;
    color: var(--dd-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
  }
  body.dd-product-single .dd-bb-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--dd-green);
  }
  body.dd-product-single .dd-buy-bar__cta {
    flex: 0 0 auto;
    background: var(--dd-green);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
  }
}
/* Round 4: the creation chip is BACK above the title (owner missed it) —
 * the row shows the chip alone (IN STOCK stays hidden); trust-strip card stays */

@media (max-width: 900px) {
  body.dd-product-single .content-single-wrapper,
  body.dd-product-single .dd-trust-block,
  body.dd-product-single .woocommerce-tabs,
  body.dd-product-single .related.products {
    width: min(100% - 28px, 760px);
  }
  body.dd-product-single .dd-product-title-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.dd-product-single .dd-title-price {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 620px) {
  body.dd-product-single .wapf-wrapper.dd-fields-ready,
  body.dd-product-single .dd-optional-details__body {
    grid-template-columns: 1fr;
  }
  body.dd-product-single .wapf-wrapper.dd-fields-ready > .wapf-field-container,
  body.dd-product-single .dd-optional-details__body > .wapf-field-container {
    grid-column: auto;
  }
  body.dd-product-single .product_title,
  body.dd-product-single .dd-product-title-row .product_title {
    font-size: 31px;
  }
}

/* ---------------------------------------------------------------------------
 * Audit 2026-07-25 follow-on (accessibility-part2.md F7, extended).
 * F7 flagged the homepage product-card price at 4.24:1. Verifying that fix on live
 * surfaced the same defect one level worse and in a place the audit did not check:
 * the price in the single-product summary computes #14a801 on white = 3.17:1 at 20px.
 * 20px at normal weight is not WCAG "large text" (that needs 24px, or 18.66px bold),
 * so the 4.5:1 floor applies. This is the money figure on every product page.
 * Repointed at the brand dark-green token (5.01:1) so it matches the rest of the
 * unified palette instead of the theme's own brighter green.
 * ------------------------------------------------------------------------ */
.woocommerce div.product .summary .price,
.woocommerce div.product .summary .price .woocommerce-Price-amount,
.woocommerce div.product .entry-summary .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--dd-brand-green-dark, #067713);
}
/* The variation price (shown once a format is selected — the number the customer
   actually reads before adding to cart) is emitted by WooCommerce's variation form and
   carries higher specificity than the summary rule above, so it needs naming directly. */
.woocommerce div.product .woocommerce-variation-price .price,
.woocommerce div.product .woocommerce-variation-price span.price,
.woocommerce div.product .single_variation_wrap .price,
.woocommerce div.product .single_variation .price {
  color: var(--dd-brand-green-dark, #067713);
}


/* =============================================================================
 * Multi-image gallery thumbnails (repair, 2026-07-28 — owner-reported)
 *
 * The v3 layout rule near the top of this file sets the gallery to
 * `flex-direction: column` on the stated assumption that "premade covers are
 * single-image galleries". That is false for 333 products (cover + 3D mockup;
 * 36 of them sold). For those, Bookory's vertical-gallery CSS
 * (bookory/assets/css/woocommerce/woocommerce.css:2028) gives flexslider's
 * `.flex-control-nav` `order: -1; width: 130px; margin-right: 30px` — designed
 * for a flex ROW — so in our column the thumbs stacked ABOVE the cover in a
 * narrow strip and shoved the main image down and small. Nothing is
 * sold-specific about it: every two-image product page is affected.
 *
 * Repair: put the thumb strip back UNDER the cover as a compact horizontal row
 * sized for the ~420px gallery rail. Single-image products are untouched
 * (flexslider renders no .flex-control-nav for them).
 *
 * Specificity note: the theme's selectors carry 5 classes and ours carry 4, so
 * the properties that must beat them are flagged !important deliberately.
 * Thumb border + active/hover states are LEFT to the theme on purpose.
 * ============================================================================= */
body.dd-product-single .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
  order: 1 !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 0;
  list-style: none;
}
body.dd-product-single .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
  width: 72px;
  margin: 0 !important;
  padding: 0;
  float: none !important;
}
body.dd-product-single .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  opacity: .6;
  cursor: pointer;
}
/* Keep the extras rail (prev/next + share) below the thumb strip. */
body.dd-product-single .dd-gallery-extras { order: 2; }
