/*
 * BP Sourdough Product Page
 * Everything is scoped to body.bp-sdpp, which PHP adds on the target product only.
 * Ported from bp-sourdough-selector's inline styles.
 */

body.bp-sdpp {
  --bp-sdpp-green: var(--BPgreen, #35ad8e);
  --bp-sdpp-green-dark: #215749;
  /* Button green: white text on it is 5.2:1, so small button text passes too
     (--BPgreen #35ad8e is 2.8:1, the old #2f9a7e 3.5:1). */
  --bp-sdpp-btn: #237a61;
  --bp-sdpp-btn-hover: #1c6a54;
  --bp-sdpp-purple: #800080;
  --bp-sdpp-focus: #14213d;
}

/* Off-screen for sighted users, still read by screen readers. */
.bp-sdpp .bp-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap; clip: rect(0 0 0 0); clip-path: inset(50%);
}
/* Theme rules like .descriptionTitle { display:block } must not beat [hidden]. */
.bp-sdpp [hidden] { display: none !important; }

/* ---------- WooCommerce's own controls: driven from our UI, never shown ----------
   These are mirrors. display:none is right HERE (it also takes them out of the tab
   order, so keyboard users do not meet each control twice). It is never right for
   our own .radio-group input or .toggle-checkbox. */
.bp-sdpp form.variations_form table.variations,
.bp-sdpp form.variations_form .reset_variations,
.bp-sdpp form.variations_form .single_variation,
.bp-sdpp form.variations_form .quantity,
.bp-sdpp .first-payment-date,
.bp-sdpp .summary > p.price {
  display: none !important;
}

/* ---------- Layout ----------
   Phones (stacked): .bp-sdpp-image-col (title + loaf) is a pinned header and
   the options/description slide up underneath it. The JS sets
   scroll-padding-top to its height so focus and in-page jumps are not hidden
   behind it.
   Wide (>= 623px): div.product is a 2-column grid and the column is
   display:contents, so its <h1> lands on top of the right column and only the
   image (#product-image-wrapper) is pinned on the left. One <h1>, and the DOM
   (reading) order stays title, image, options at every width.
   Either way the pin lives inside div.product, which ends with the tabs, so it
   releases at the bottom of the description and then it all scrolls together. */
/* The theme's page wrappers (body > div.container, section#content.container,
   both grids) are overflow:hidden, which turns them into scroll containers and
   silently disables position:sticky. overflow:clip clips the same way without
   that side effect; browsers without clip get visible. */
body.bp-sdpp > .container,
body.bp-sdpp #content.container { overflow: visible; overflow: clip; }
.bp-sdpp.woocommerce div.product > .bp-sdpp-image-col {
  position: sticky;
  top: 0;
  z-index: 5;
  box-sizing: border-box;
  padding: 0 5px 8px;
  background: #fff;
  transition: box-shadow .2s;
}
.bp-sdpp.woocommerce div.product > .bp-sdpp-image-col.is-stuck { box-shadow: 0 6px 8px -6px rgba(0,0,0,.25); }
@media (max-width: 622px) {
  /* Pinned header: the loaf runs edge to edge on a phone held upright, but
     never takes more than ~40% of the screen height, so the options keep the
     rest. Capped by narrowing the box, never by squashing its height (which
     is what cropped the bread). */
  .bp-sdpp #product-image-wrapper { width: min(100%, 40vh / 0.68); width: min(100%, 40svh / 0.68); margin: 2px auto 0; }
  .bp-sdpp.woocommerce div.product > .bp-sdpp-image-col { padding: 0 2px 6px; }
  .bp-sdpp.woocommerce div.product > .bp-sdpp-image-col .product_title { margin: 6px 0 0; font-size: 1.4rem; }
}
/* The theme (style.css) makes .summary a 90%/48% !important flex column and
   reorders its children (form.cart is order:4). Undo all of that here, so the
   summary is plain block flow in source order. */
body.bp-sdpp.single-product #content div.product .summary.entry-summary,
body.bp-sdpp.woocommerce div.product div.summary {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0;
  padding: 0 5px;
  box-sizing: border-box;
}
@media (min-width: 623px) {
  .bp-sdpp.woocommerce div.product {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 2rem;
    align-items: start;
  }
  .bp-sdpp.woocommerce div.product > .bp-sdpp-image-col { display: contents; }
  .bp-sdpp.woocommerce div.product > .bp-sdpp-image-col > .product_title {
    grid-column: 2; grid-row: 1; margin-left: 5px; margin-right: 5px;
  }
  .bp-sdpp.woocommerce div.product #product-image-wrapper {
    grid-column: 1; grid-row: 1 / span 2;
    position: sticky; top: 40px;
    /* Keep the loaf inside a short laptop screen: narrow it, don't crop it. */
    max-width: min(700px, (100vh - 60px) / 0.68);
    justify-self: center;
  }
  body.bp-sdpp.admin-bar.woocommerce div.product #product-image-wrapper { top: 72px; }
  body.bp-sdpp.single-product #content div.product .summary.entry-summary,
  body.bp-sdpp.woocommerce div.product div.summary { grid-column: 2; grid-row: 2; width: auto !important; min-width: 0; }
  /* The JS moved the title to the top of the summary (so it can pin there):
     the summary takes the whole right column. */
  body.bp-sdpp.single-product #content div.product.bp-sdpp-title-in-summary .summary.entry-summary,
  body.bp-sdpp.woocommerce div.product.bp-sdpp-title-in-summary div.summary { grid-row: 1 / span 2; }

  /* Pinned at the top of the right column: the title, then (once scrolled
     to) the price + Add to Cart row right under it. Both release with the
     summary, at the end of the description. The price row only pins on
     screens tall enough to leave room for reading. */
  body.bp-sdpp { --bp-sdpp-pin-top: 0px; }
  body.bp-sdpp.admin-bar { --bp-sdpp-pin-top: 32px; }
  .bp-sdpp.woocommerce div.product .summary > .product_title {
    position: sticky; top: var(--bp-sdpp-pin-top); z-index: 7;
    margin: 0; padding: 10px 0 8px; background: #fff;
    font-size: clamp(1.5rem, 2.6vw, 2.3rem);
    transition: box-shadow .2s;
  }
  .bp-sdpp.woocommerce div.product .summary > .product_title.is-stuck,
  .bp-sdpp.woocommerce div.product .summary > form.cart.is-stuck { box-shadow: 0 6px 8px -6px rgba(0,0,0,.25); }
  .bp-sdpp.woocommerce div.product .summary > form.cart.is-stuck-bottom { box-shadow: 0 -6px 8px -6px rgba(0,0,0,.25); }
}
@media (min-width: 623px) {
  /* Anything else WC prints inside div.product goes full width below. */
  .bp-sdpp.woocommerce div.product > :not(.bp-sdpp-image-col):not(.summary) { grid-column: 1 / -1; }
}
/* bottom: 0 as well: while its spot is still below the fold (a short laptop
   screen, the subscribe card open), the row sits on the bottom edge of the
   screen instead, so price + Add to Cart are always in view. */
@media (min-width: 623px) and (min-height: 600px) {
  .bp-sdpp.woocommerce div.product.bp-sdpp-title-in-summary .summary > form.cart {
    position: sticky; z-index: 6;
    top: calc(var(--bp-sdpp-pin-top) + var(--bp-sdpp-title-h, 0px));
    bottom: 0;
    padding: 6px 0 0; background: #fff;
    transition: box-shadow .2s;
  }
}

#product-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  /* The loaf photos are 600x600 with the bread in the middle band (about rows
     120-500, measured across all four). This shape crops the empty white
     above and below and keeps the whole loaf (rows ~105-513 show). The box is sized from its width only, so it rescales live
     with the window and the crop never changes. New photos framed
     differently may need this ratio or object-position adjusted. */
  aspect-ratio: 1 / 0.68;
  overflow: hidden;
  margin-top: 10px;
}
#product-image,
#product-image-wrapper img[data-clone] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

/* ---------- Title + rating ---------- */
.bp-sdpp div.product .product_title {
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 10px 0 6px;
}
@media (min-width: 599px) { .bp-sdpp div.product .product_title { font-size: 2.3rem; } }

.bp-sdpp #starRatingWrapper { display: inline-block; }
.bp-sdpp #starRatingWrapper .woocommerce-product-rating {
  margin: 0 0 15px; display: flex; flex-flow: row wrap; align-items: center; gap: 4px; font-size: 1rem;
}
.bp-sdpp #starRatingWrapper .woocommerce-product-rating .star-rating { margin: 0; font-size: 1.5rem !important; float: none; }
@media (min-width: 599px) { .bp-sdpp #starRatingWrapper .woocommerce-product-rating .star-rating { font-size: 1.75rem !important; } }

/* ---------- Options block ---------- */
.bp-sdpp .bp-sdpp-options { display: flex; flex-direction: column; gap: 12px; padding: 10px 0; }
.bp-sdpp .bp-sdpp-options[aria-busy="true"],
.bp-sdpp form.variations_form[aria-busy="true"] { opacity: 0.5; pointer-events: none; }
.bp-sdpp .formInputContainer { margin: 3px 0; }

/* Purchase type (option B): two cards, one-time or subscribe. Each card is a
   native radio + label; the subscribe card also holds the "Deliver" select,
   shown only once subscribe is picked. */
.bp-sdpp fieldset.bp-sdpp-purchase {
  display: flex;
  flex-flow: row wrap;
  gap: 12px;
  max-width: 640px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
/* Hide the native radio visually but keep it focusable and in the accessibility
   tree. display:none / visibility:hidden would drop it out of the tab order. */
.bp-sdpp .radio-group input[type=radio] {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap; clip: rect(0 0 0 0); clip-path: inset(50%);
}
.bp-sdpp .bp-sdpp-card {
  position: relative;
  flex: 1 1 210px;
  box-sizing: border-box;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid #b9b9b9;
  border-radius: 12px;
  cursor: pointer;
  font-family: sans-serif;
}
.bp-sdpp .bp-sdpp-card.is-selected {
  border: 3px solid var(--bp-sdpp-green);
  padding: 11px 13px;
  background: #eef8f4;
}
.bp-sdpp .bp-sdpp-card > label {
  display: grid;
  grid-template-columns: 1.3em 1fr;
  column-gap: 10px;
  cursor: pointer;
}
.bp-sdpp .bp-sdpp-card > label > span { grid-column: 2; }
/* The drawn radio circle: it shows these are a choice of one. */
.bp-sdpp .bp-sdpp-card > label::before {
  content: "";
  grid-row: 1 / span 3;
  align-self: start;
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.15em;
  box-sizing: border-box;
  border: 2px solid #6b6b6b;
  border-radius: 50%;
  background: #fff;
}
.bp-sdpp .bp-sdpp-card input[type=radio]:checked + label::before {
  border-color: var(--bp-sdpp-green-dark);
  box-shadow: inset 0 0 0 3px #fff;
  background: var(--bp-sdpp-green-dark);
}
.bp-sdpp .bp-sdpp-card-title { font-weight: bold; font-size: 1.15rem; line-height: 1.2; color: #222; }
.bp-sdpp .bp-sdpp-card-price { font-size: 1.05rem; color: var(--bp-sdpp-purple); margin-top: 2px; }
.bp-sdpp .bp-sdpp-card-price:empty::before { content: "\00a0"; } /* holds the line until the JS fills it (no layout shift) */
.bp-sdpp .bp-sdpp-card-note { font-size: 0.9rem; color: #555; }
.bp-sdpp .bp-sdpp-freq {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0 calc(1.3em + 10px);
  font-size: 1.05rem;
  cursor: default;
}
.bp-sdpp .bp-sdpp-freq label { font-weight: bold; }
.bp-sdpp .bp-sdpp-freq select { font-size: 1rem; padding: 4px 6px; min-height: 2.2em; }
.bp-sdpp .bp-sdpp-freq select:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 2px; }
/* The radio is invisible, so focus is drawn on the whole card. */
.bp-sdpp .bp-sdpp-card:has(input[type=radio]:focus-visible) { outline: 3px solid var(--bp-sdpp-focus); outline-offset: 2px; }
@supports not selector(:has(*)) {
  .bp-sdpp .bp-sdpp-card input[type=radio]:focus-visible + label { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 4px; }
}
@media (forced-colors: active) {
  .bp-sdpp .bp-sdpp-card.is-selected { border-color: Highlight; }
  .bp-sdpp .bp-sdpp-card input[type=radio]:checked + label::before { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
  .bp-sdpp .bp-sdpp-card:has(input[type=radio]:focus-visible) { outline-color: CanvasText; }
}

/* Loaves */
.bp-sdpp .quantity-selector { display: flex; align-items: center; flex-wrap: wrap; width: fit-content; margin-top: 4px; }
.bp-sdpp .quantity-selector label { font-size: 1.5rem; margin-right: 6px; }
.bp-sdpp .quantity-selector button,
.bp-sdpp .quantity-selector input { font-size: 1.5rem; width: 50px; margin: 0 4px; text-align: center; }
.bp-sdpp .quantity-selector button[aria-disabled="true"] { opacity: 0.45; }
/* Free-delivery meter. Amber "almost there" at 1 loaf; flips to green with a
   truck that drives to the FREE flag and a spark burst when it's unlocked.
   Visual only (aria-hidden): the JS announces the same message in
   #loaf-count-announce. */
.bp-sdpp .bp-sdpp-ship {
  --bp-sdpp-ship-p: 0%;
  --ship-accent: #e58f1b;
  position: relative; box-sizing: border-box;
  max-width: 400px; margin-top: 10px; padding: 6px 12px 7px;
  border: 2px dashed #e7a849; border-radius: 12px;
  background: #fff7ea; color: #7a4300;
  transition: background-color .4s, border-color .4s, color .4s;
}
.bp-sdpp .bp-sdpp-ship[data-state="got"],
.bp-sdpp .bp-sdpp-ship[data-state="with"],
.bp-sdpp .bp-sdpp-ship[data-state="already"] {
  --ship-accent: var(--bp-sdpp-green);
  border-style: solid; border-color: var(--bp-sdpp-green);
  background: #eef8f4; color: var(--bp-sdpp-green-dark);
}
.bp-sdpp .bp-sdpp-ship-track {
  position: relative; height: 8px; margin: 25px 46px 6px 0;
  border-radius: 5px; background: #f3e1c2;
}
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-track,
.bp-sdpp .bp-sdpp-ship[data-state="with"] .bp-sdpp-ship-track,
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-track { background: #cfeee2; }
.bp-sdpp .bp-sdpp-ship-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--bp-sdpp-ship-p);
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, var(--ship-accent) 0 8px, rgba(255,255,255,.28) 8px 14px), var(--ship-accent);
  background-size: 28px 100%;
  transition: width .7s cubic-bezier(.34,1.35,.5,1);
  animation: bp-sdpp-ship-stripes 1s linear infinite;
}
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-fill,
.bp-sdpp .bp-sdpp-ship[data-state="with"] .bp-sdpp-ship-fill,
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-fill { animation: none; background: var(--ship-accent); }
.bp-sdpp .bp-sdpp-ship-goal {
  position: absolute; left: 100%; top: 50%; transform: translate(6px, -50%);
  padding: 2px 7px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: .06em; line-height: 1.3;
  color: #fff; background: #9e5800;
  animation: bp-sdpp-ship-glow 1.8s ease-in-out infinite;
}
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-goal,
.bp-sdpp .bp-sdpp-ship[data-state="with"] .bp-sdpp-ship-goal,
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-goal { background: var(--bp-sdpp-green-dark); animation: none; }
/* The lane spans the track and slides by transform (translateX % of the
   lane = % of the track), so the truck's moves aren't layout shifts. It never
   parks closer than 38px to the left so the truck stays inside the box. */
.bp-sdpp .bp-sdpp-ship-lane {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%; pointer-events: none;
  transform: translateX(max(var(--bp-sdpp-ship-p), 38px));
  transition: transform .7s cubic-bezier(.34,1.35,.5,1);
}
.bp-sdpp .bp-sdpp-ship-truck {
  position: absolute; bottom: 7px; left: 0; width: 50px; height: 30px;
  transform: translateX(-75%);
  animation: bp-sdpp-ship-idle 1.2s ease-in-out infinite;
  overflow: visible;
}
.bp-sdpp .bp-sdpp-truck-body { fill: #fff; stroke: var(--ship-accent); stroke-width: 2; }
.bp-sdpp .bp-sdpp-truck-cab { fill: var(--ship-accent); }
.bp-sdpp .bp-sdpp-truck-window { fill: #fff; }
.bp-sdpp .bp-sdpp-truck-wheel { fill: #333; stroke: #fff; stroke-width: 1.4; }
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-truck,
.bp-sdpp .bp-sdpp-ship[data-state="with"] .bp-sdpp-ship-truck,
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-truck { animation: none; }
.bp-sdpp .bp-sdpp-ship.is-celebrating .bp-sdpp-ship-truck { animation: bp-sdpp-ship-hop .5s .55s ease-out 2; }

.bp-sdpp .bp-sdpp-ship-msg { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; }
/* Compact: the theme pads every .container p by 10px and sizes it 24px. */
body.bp-sdpp .bp-sdpp-ship p { padding: 0; max-width: none; }
/* "Add 1 more loaf and delivery is FREE" is the button that does it. */
.bp-sdpp .bp-sdpp-ship-add {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; color: inherit; line-height: 1.3;
}
.bp-sdpp .bp-sdpp-ship-plus {
  flex: none; display: inline-grid; place-items: center;
  width: 1.5em; height: 1.5em; border-radius: 50%;
  background: #9e5800; color: #fff; font-weight: 800; line-height: 1;
  animation: bp-sdpp-nudge 1.8s ease-out 1s 3;
}
.bp-sdpp .bp-sdpp-ship-add:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.bp-sdpp .bp-sdpp-ship-add:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 3px; border-radius: 4px; }
.bp-sdpp .bp-sdpp-ship-msg strong { font-weight: 800; }
.bp-sdpp .bp-sdpp-ship-need strong { color: #9a5000; }
.bp-sdpp .bp-sdpp-ship-got { display: none; align-items: center; gap: 6px; }
/* One message per state (data-state: need | pending | got | already | with).
   "with": a class or cleanse in the cart carries the bread (see shipStatus()). */
.bp-sdpp .bp-sdpp-ship-pending, .bp-sdpp .bp-sdpp-ship-already, .bp-sdpp .bp-sdpp-ship-with { display: none; }
.bp-sdpp .bp-sdpp-ship[data-state="with"] .bp-sdpp-ship-with { display: flex; align-items: flex-start; gap: 6px; }
.bp-sdpp .bp-sdpp-ship-with .bp-sdpp-ship-check { margin-top: .12em; }
.bp-sdpp .bp-sdpp-ship:not([data-state="need"]) .bp-sdpp-ship-need { display: none; }
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-got { display: flex; }
.bp-sdpp .bp-sdpp-ship[data-state="pending"] .bp-sdpp-ship-pending { display: block; }
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-already { display: flex; align-items: center; gap: 6px; }
.bp-sdpp .bp-sdpp-ship-pending strong { color: #9a5000; }
/* pending: still amber (not free until it's added), bar full, truck parked at FREE. */
.bp-sdpp .bp-sdpp-ship[data-state="pending"] { border-style: solid; }
.bp-sdpp .bp-sdpp-ship-check { flex: none; fill: var(--bp-sdpp-green); }
.bp-sdpp .bp-sdpp-ship.is-celebrating .bp-sdpp-ship-got { animation: bp-sdpp-ship-pop .55s cubic-bezier(.34,1.6,.5,1); }
.bp-sdpp .bp-sdpp-ship-pickup {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600; color: var(--bp-sdpp-green-dark);
}
.bp-sdpp .bp-sdpp-ship-pickup svg { flex: none; fill: var(--bp-sdpp-green); }
.bp-sdpp .bp-sdpp-ship[data-state="got"] .bp-sdpp-ship-pickup,
.bp-sdpp .bp-sdpp-ship[data-state="already"] .bp-sdpp-ship-pickup { display: none; }
/* One small line: "Pickup is always FREE" and the zones button. */
body.bp-sdpp .bp-sdpp-ship p.bp-sdpp-ship-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px;
  margin: 3px 0 0; font-size: 0.85rem; line-height: 1.35;
}
.bp-sdpp .bp-sdpp-ship-zones {
  all: unset; box-sizing: border-box; cursor: pointer;
  font-size: 0.85rem; line-height: 1.35; color: inherit;
  text-decoration: underline; text-decoration-color: rgba(0,0,0,.3); text-underline-offset: 2px;
}
.bp-sdpp .bp-sdpp-ship-zones:hover { text-decoration-color: currentColor; }
.bp-sdpp .bp-sdpp-ship-zones:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 2px; border-radius: 2px; }

/* Spark burst at the FREE flag */
.bp-sdpp .bp-sdpp-ship-sparks { position: absolute; left: 100%; top: 50%; width: 0; height: 0; pointer-events: none; }
.bp-sdpp .bp-sdpp-ship-sparks i {
  position: absolute; left: 22px; top: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bp-sdpp-green); opacity: 0;
}
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(2n) { background: #f0b34a; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(3n) { background: var(--bp-sdpp-purple); width: 5px; height: 5px; }
.bp-sdpp .bp-sdpp-ship.is-celebrating .bp-sdpp-ship-sparks i { animation: bp-sdpp-spark .8s .5s ease-out forwards; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(1) { --dx: -26px; --dy: -24px; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(2) { --dx: 0px;   --dy: -32px; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(3) { --dx: 24px;  --dy: -22px; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(4) { --dx: 28px;  --dy: 8px; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(5) { --dx: -24px; --dy: 14px; }
.bp-sdpp .bp-sdpp-ship-sparks i:nth-child(6) { --dx: 4px;   --dy: 22px; }

/* The loaf count rolls in from below (or above) when it changes. */
.bp-sdpp .quantity-selector.is-bump-up #number_of_loaves_display { animation: bp-sdpp-bump-up .45s cubic-bezier(.3,1.5,.5,1); }
.bp-sdpp .quantity-selector.is-bump-down #number_of_loaves_display { animation: bp-sdpp-bump-down .35s ease-out; }
@keyframes bp-sdpp-bump-up {
  0% { transform: translateY(.6em) scale(.7); opacity: 0; color: var(--bp-sdpp-green-dark); }
  60% { transform: translateY(-.1em) scale(1.25); opacity: 1; color: var(--bp-sdpp-green-dark); }
  100% { transform: none; }
}
@keyframes bp-sdpp-bump-down { 0% { transform: translateY(-.5em); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bp-sdpp .quantity-selector #number_of_loaves_display { animation: none !important; } }

/* Nudge the + button while one loaf short */
.bp-sdpp #increase-loaf.bp-sdpp-nudge { animation: bp-sdpp-nudge 1.8s ease-out 1s 3; border-radius: 6px; }

@keyframes bp-sdpp-ship-stripes { to { background-position: 28px 0; } }
@keyframes bp-sdpp-ship-glow { 50% { box-shadow: 0 0 0 4px rgba(229,143,27,.25); } }
@keyframes bp-sdpp-ship-idle { 50% { transform: translateX(-75%) translateY(-2px); } }
@keyframes bp-sdpp-ship-hop { 40% { transform: translateX(-75%) translateY(-7px) rotate(-6deg); } }
@keyframes bp-sdpp-ship-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bp-sdpp-spark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); }
}
@keyframes bp-sdpp-nudge {
  0% { box-shadow: 0 0 0 0 rgba(229,143,27,.6); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(229,143,27,0); }
}
@media (prefers-reduced-motion: reduce) {
  .bp-sdpp .bp-sdpp-ship *,
  .bp-sdpp #increase-loaf.bp-sdpp-nudge { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .bp-sdpp .bp-sdpp-ship-fill { forced-color-adjust: none; background: Highlight; }
  .bp-sdpp .bp-sdpp-ship-goal { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* Toggles. The checkbox is a transparent full-size overlay; its name comes from
   the <label for>, the on/off words are decorative. */
.bp-sdpp .toggleContainer { display: flex; flex-flow: row wrap; align-items: center; margin: 0 0 10px; font-size: 1.3rem; }
@media (min-width: 599px) { .bp-sdpp .toggleContainer { font-size: 1.5rem; margin-bottom: 10px; } }
.bp-sdpp .toggle-wrapper { display: flex; flex-flow: row nowrap; position: relative; border-radius: 3.125em; overflow: hidden; margin-left: 5px; align-items: center; }
.bp-sdpp .toggle-checkbox {
  -webkit-appearance: none; appearance: none; position: absolute; z-index: 1; top: 0; left: 0;
  border-radius: inherit; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.bp-sdpp .toggle-checkbox:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 2px; }
@supports not selector(:focus-visible) { .bp-sdpp .toggle-checkbox:focus { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 2px; } }

.bp-sdpp .onOffToggle { margin-left: 5px; }
.bp-sdpp .onOffToggle.offToggle { order: 1; margin-right: 10px; }
.bp-sdpp .toggle-container { order: 2; }
.bp-sdpp .onOffToggle.onToggle { order: 3; margin-left: 10px; }

.bp-sdpp .toggle-checkbox:checked ~ .onToggle,
.bp-sdpp .toggle-checkbox:not(:checked) ~ .offToggle { color: var(--bp-sdpp-purple); text-decoration: none; }
.bp-sdpp .toggle-checkbox:checked ~ .offToggle,
.bp-sdpp .toggle-checkbox:not(:checked) ~ .onToggle { color: #9a9a9a; text-decoration: line-through; }

.bp-sdpp .toggle-container {
  display: flex; position: relative; border-radius: inherit; width: 2.5em; height: 1.25em;
  background-color: #d1d4dc;
  box-shadow: inset 0.0625em 0 0 #d4d2de, inset -0.0625em 0 0 #d4d2de, inset 0.125em 0.25em 0.125em 0.25em #b5b5c3;
  mask-image: radial-gradient(#fff, #000);
  transition: all 0.4s;
}
.bp-sdpp .toggle-wrapper.yellow .toggle-checkbox:checked ~ .toggle-container {
  background-color: #fbc433;
  box-shadow: inset 0.0625em 0 0 #fbc433, inset -0.0625em 0 0 #fbc433, inset 0.125em 0.25em 0.125em 0.25em #ee9902;
}
.bp-sdpp .toggle-ball {
  position: relative; border-radius: 50%; width: 1.25em; height: 1.25em;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 16%), radial-gradient(#d2d4dc, #babac2);
  background-position: -0.25em -0.25em; background-size: auto, calc(100% + 0.25em) calc(100% + 0.25em); background-repeat: no-repeat;
  box-shadow: 0.25em 0.25em 0.25em #8d889e, inset 0.0625em 0.0625em 0.25em #d1d1d6, inset -0.0625em -0.0625em 0.25em #8c869e;
  transform: translateX(0);
  transition: transform 0.4s, box-shadow 0.4s;
}
.bp-sdpp .toggle-ball::after {
  content: ""; position: absolute; top: 0; left: 0; border-radius: 50%; width: 100%; height: 100%;
  background-position: -0.25em -0.25em; background-size: auto, calc(100% + 0.25em) calc(100% + 0.25em); background-repeat: no-repeat;
  opacity: 0; transition: opacity 0.4s;
}
.bp-sdpp .toggle-checkbox:checked ~ .toggle-container > .toggle-ball { transform: translateX(100%); }
.bp-sdpp .toggle-wrapper.yellow .toggle-checkbox:checked ~ .toggle-container > .toggle-ball::after {
  opacity: 1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 16%), radial-gradient(#f5d05f, #d67f1b);
  box-shadow: 0.25em 0.25em 0.25em #bc6d00, inset 0.0625em 0.0625em 0.25em #fff27a, inset -0.0625em -0.0625em 0.25em #9f3901;
}

.bp-sdpp .highlight { outline: 2px solid #ffc107; animation: bpSdppHighlight 1.5s ease; }
@keyframes bpSdppHighlight { 0% { background-color: #fff8dc; } 100% { background-color: transparent; } }

/* ---------- Price + buttons row (inside WooCommerce's form) ---------- */
.bp-sdpp .woocommerce-variation-add-to-cart {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 14px 18px;
  position: relative;
}
.bp-sdpp #product-price-wrapper { flex: 1 1 100%; }
/* Two-column layout: price and button side by side, so the pinned row stays short. */
@media (min-width: 623px) { .bp-sdpp #product-price-wrapper { flex: 0 1 auto; min-width: 6em; } }
.bp-sdpp p#product-price { margin: 0; font-weight: bold; color: var(--bp-sdpp-purple); font-size: 1.55rem; line-height: 1.2; }
@media (min-width: 599px) { .bp-sdpp p#product-price { font-size: 2rem; } }
@media (min-width: 623px) { .bp-sdpp p#product-price { font-size: clamp(1.4rem, 2.4vw, 2rem); } }
.bp-sdpp .bp-sdpp-often { font-size: 0.6em; }
/* Discounted subscription, like the old page: struck regular total, red sale
   total + frequency, "Save N%". Red is #d1291c (about 5:1 on white). */
.bp-sdpp .bp-sdpp-price-visual { display: block; }
.bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span { display: block; }
/* Every width: a discounted price is two lines (struck + sale price, then
   "Save 10%"), not three, so price + Add to Cart stays short and on screen. */
.bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-was,
.bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-now { display: inline-block; margin-right: .3em; }
.bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-save { font-size: .7em; }
/* Phones: price and Add to Cart share one row. The discounted price packs
   into two lines (struck + sale price, then "Save 10%"); the row is pinned
   (form.cart below). */
@media (max-width: 622px) {
  .bp-sdpp .woocommerce-variation-add-to-cart { flex-wrap: nowrap; gap: 8px 12px; }
  .bp-sdpp #product-price-wrapper { flex: 1 1 auto; min-width: 0; }
  .bp-sdpp p#product-price { font-size: 1.4rem; }
  .bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-was,
  .bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-now { display: inline-block; margin-right: .3em; }
  .bp-sdpp #product-price.is-discounted .bp-sdpp-price-visual > span.bp-sdpp-save { font-size: .7em; }
  .bp-sdpp .bp-sdpp-per, .bp-sdpp .bp-sdpp-often { font-size: .6em; }
  /* body. prefix: outranks the general button rules further down. */
  body.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button {
    flex: none; margin-left: auto; font-size: 1.2rem; padding: 10px 14px; white-space: nowrap;
  }
}
/* Phones: price + Add to Cart rides the screen like on wide screens. While
   its spot is below the fold it sits on the bottom edge (bottom: 0,
   .is-stuck-bottom); scrolled to, it settles into place, then pins right
   under the loaf (top = --bp-sdpp-loaf-h, the loaf's visible height, set by
   the JS). It releases with .summary, at the end of the description. The JS
   sets scroll-padding top and bottom so focus never lands under it. Bottom
   padding covers the iPhone home indicator. */
@media (max-width: 622px) {
  .bp-sdpp.woocommerce div.product > .summary > form.cart {
    position: sticky; z-index: 4;
    top: var(--bp-sdpp-loaf-h, 0px); bottom: 0;
    margin: 0 -5px; padding: 8px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    transition: box-shadow .2s;
  }
  .bp-sdpp.woocommerce div.product > .summary > form.cart.is-stuck { box-shadow: 0 6px 8px -6px rgba(0,0,0,.25); }
  .bp-sdpp.woocommerce div.product > .summary > form.cart.is-stuck-bottom { box-shadow: 0 -4px 12px rgba(0,0,0,.18); }
  /* Only the loaf stays pinned at the top: the title scrolls away first
     (sticky top = minus the title's height, set by the JS), so the loaf and
     the bottom bar leave about half the screen for reading. */
  .bp-sdpp.woocommerce div.product > .bp-sdpp-image-col { top: calc(-1 * var(--bp-sdpp-title-h, 0px)); }
}
.bp-sdpp .bp-sdpp-was del { position: relative; display: inline-block; text-decoration: none; }
.bp-sdpp .bp-sdpp-was del::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%;
  height: 0.09em; min-height: 2px; background: currentColor; border-radius: 1px;
  transform-origin: left center;
}
.bp-sdpp .bp-sdpp-sale { color: #d1291c; }
.bp-sdpp .bp-sdpp-now, .bp-sdpp .bp-sdpp-save { transform-origin: left top; }
.bp-sdpp #product-price.is-revealing .bp-sdpp-was del::after { animation: bp-sdpp-strike .45s cubic-bezier(.6,0,.3,1) both; }
.bp-sdpp #product-price.is-revealing .bp-sdpp-now  { animation: bp-sdpp-grow .45s .35s cubic-bezier(.3,1.4,.5,1) both; }
.bp-sdpp #product-price.is-revealing .bp-sdpp-save { animation: bp-sdpp-grow .45s .5s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes bp-sdpp-strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bp-sdpp-grow { from { opacity: 0; transform: translateY(-0.35em) scale(.55); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .bp-sdpp #product-price.is-revealing * , .bp-sdpp #product-price.is-revealing *::after { animation: none !important; }
}
@media (forced-colors: active) { .bp-sdpp .bp-sdpp-was del::after { background: CanvasText; } }
.bp-sdpp .bp-sdpp-price-note { font-size: 0.6em; font-weight: normal; color: #555; }

.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button {
  position: relative;
  top: 0;
  float: none;
  margin: 0 0 10px;
  padding: 10px 20px;
  border: 0;
  border-radius: 5px;
  font-family: Helvetica, sans-serif;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button {
  color: #fff;
  font-size: 1.4rem;
  background-color: var(--bp-sdpp-btn, #237a61);
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 #54e3be, 0 7px 0 var(--bp-sdpp-green-dark);
}
.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button:active { top: 7px; box-shadow: inset 0 1px 0 #54e3be, inset 0 -3px 0 var(--bp-sdpp-green-dark); }
.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button:focus-visible,
.bp-sdpp .quantity-selector button:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: 3px; }
.bp-sdpp.woocommerce div.product form.cart .button.single_add_to_cart_button.disabled { opacity: 0.5; }

/* ---------- Tabs (WooCommerce's, styled like the old custom tabs) ---------- */
/* The theme makes .woocommerce-tabs inline-block (shrink to fit); fill the column. */
.bp-sdpp.woocommerce div.product .woocommerce-tabs { display: block; width: 100%; box-sizing: border-box; margin: 20px 0; padding: 0; clear: none; }
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex; flex-flow: row nowrap; max-width: none; margin: 0; padding: 0 !important; list-style: none; overflow: visible;
}
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li {
  flex: 1; display: flex; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
}
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  flex: 1; display: flex; align-items: flex-end; padding: 8px 8px;
  background: lightgray; color: #333; border: 1px solid transparent;
  font-family: sans-serif; font-weight: bold; font-size: 0.85rem; line-height: 1.1; text-decoration: none;
}
@media (min-width: 420px) { .bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: 0.95rem; } }
@media (min-width: 1046px) { .bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: 1.2rem; padding: 10px 14px; } }
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover { background: #fff; border-color: #ccc; border-bottom-color: #fff; }
.bp-sdpp.woocommerce div.product .woocommerce-tabs ul.tabs li a:focus-visible { outline: 2px solid var(--bp-sdpp-focus); outline-offset: -2px; }
.bp-sdpp.woocommerce div.product .woocommerce-tabs .panel {
  margin: 0; padding: 20px; border: 1px solid #ccc; border-top: none; font-size: 1.2rem;
}
/* The titles are h2 (they follow the h1, so h4 skipped levels). The theme hides
   every h2 in the description tab (div#tab-description h2) and ".container h2" adds an 800px cap and 10px padding,
   hence the ID here. [hidden] still wins: it is !important. */
#tab-description .bread-product-description h2.descriptionTitle { display: block; max-width: none; padding: 0; font-size: 1.25rem; margin: .5em 0 .3em; line-height: 1.05em; }
.bp-sdpp .bread-product-description ul { padding: 10px 0 10px 40px; }
.bp-sdpp .woocommerce-Tabs-panel--bp_bread_reviews .review-date { font-size: 1.1rem; font-style: italic; color: #666; margin: 25px 0 0 0;}
.bp-sdpp .woocommerce-Tabs-panel--bp_bread_reviews .review-rating { color: gold; font-size: 1.75rem; margin: 0; padding: 0px 10px; justify-content:center; }
.bp-sdpp .woocommerce-Tabs-panel--bp_bread_reviews .review-text::after {content: " "; border-bottom:lightgray solid 1px; width: 60%; display: flex; margin-top:25px;}
/* aspect-ratio matches the label file (401x826); stated in CSS because height:auto hides
   the attribute-based ratio from Lighthouse's lazy-image check. Change it if the label changes. */
.bp-sdpp .woocommerce-Tabs-panel--bp_nutrition img { width: 100%; max-width: 400px; height: auto; aspect-ratio: 401 / 826; border-right: 3px solid #000; }
.bp-sdpp #commentform p.comment-form-url { display: none !important; }
.bp-sdpp textarea#comment { max-width: 85vw; }

/* ---------- Delivery-zones panel (appended to <body>) ---------- */
/* Delivery-zones panel. Styled like the free-delivery meter it opens from
   (data-tone follows the meter: amber "need", green "got"), with a caret
   pointing at the trigger (data-place below|above|over, --caret-x from JS).
   Shown whole in the current view (the JS shrinks the map if needed); a
   click anywhere, or scrolling the page, closes it. */
.map-tooltip {
  --map-bg: #fff7ea; --map-border: #e7a849; --map-ink: #7a4300; --ship-accent: #e58f1b;
  /* Above the theme's nav.headerNav (z-index 99999), so it can open over it. */
  position: absolute; display: none; z-index: 100000; box-sizing: border-box;
  width: min(560px, calc(100vw - 16px));
  max-height: calc(100vh - 16px); max-height: calc(100svh - 16px);
  flex-direction: column;
  background: var(--map-bg); color: var(--map-ink);
  border: 2px solid var(--map-border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(60, 35, 0, 0.22);
  cursor: pointer; /* a click anywhere on it closes it */
}
.map-tooltip[data-tone="got"] {
  --map-bg: #eef8f4; --map-border: var(--bp-sdpp-green, #35ad8e); --map-ink: var(--bp-sdpp-green-dark, #215749);
  --ship-accent: var(--bp-sdpp-green, #35ad8e);
}
/* Focus is moved here on open so screen readers land in it, but it's a
   container, not a control: no ring (the theme also outlines :focus). */
.map-tooltip:focus, .map-tooltip:focus-visible { outline: none !important; }
.map-tooltip .map-caret {
  position: absolute; left: var(--caret-x, 40px); width: 14px; height: 14px;
  margin-left: -7px; background: var(--map-bg); transform: rotate(45deg);
  border: 2px solid var(--map-border);
}
.map-tooltip[data-place="below"] .map-caret { top: -9px; border-right: 0; border-bottom: 0; }
.map-tooltip[data-place="above"] .map-caret { bottom: -9px; border-left: 0; border-top: 0; }
.map-tooltip[data-place="over"] .map-caret { display: none; }
.map-tooltip-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 6px 12px; font-weight: 800; font-size: 1.05rem;
}
.map-tooltip-title { flex: 1 1 auto; }
.map-tooltip .bp-sdpp-truck-body { fill: #fff; stroke: var(--ship-accent); stroke-width: 2; }
.map-tooltip .bp-sdpp-truck-cab { fill: var(--ship-accent); }
.map-tooltip .bp-sdpp-truck-window { fill: #fff; }
.map-tooltip .bp-sdpp-truck-wheel { fill: #333; stroke: #fff; stroke-width: 1.4; }
.map-tooltip .map-close {
  all: unset; box-sizing: border-box; cursor: pointer; width: 36px; height: 36px;
  border-radius: 50%; text-align: center; line-height: 34px; font-size: 1.6rem; color: inherit;
}
.map-tooltip .map-close:hover { background: rgba(0,0,0,.06); }
.map-tooltip .map-close:focus-visible { outline: 2px solid #14213d; outline-offset: 1px; }
.map-tooltip-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; /* last resort only; JS sizes the map to fit */
  margin: 0 8px 8px; padding: 6px; background: #fff; border-radius: 8px;
}
/* Capped so the written routes below are on screen too, not under the panel scroll. */
.map-tooltip img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.map-tooltip .map-zone-list { padding: 8px 6px 2px; font-size: 0.95rem; line-height: 1.45; color: #222; text-align: left; }
.map-tooltip .map-zone-list p { margin: 0 0 6px; }
.map-tooltip .map-zone-list ul { margin: 0; padding: 0 0 0 20px; list-style: disc; }
.map-tooltip .map-zone-list li { margin: 0 0 2px; }
.map-tooltip .map-pickup { margin: 8px 0 2px; color: var(--bp-sdpp-green-dark, #215749); }
@media (forced-colors: active) { .map-tooltip, .map-tooltip .map-caret { border-color: CanvasText; } }

/* ---------- Add-to-cart popup ("Make it two loaves?") ----------
   A native <dialog> opened with showModal(), appended to <body>. */
.bp-sdpp-upsell {
  box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: calc(100svh - 24px);
  margin: auto; padding: 22px 20px 16px; overflow: auto;
  border: 2px solid var(--bp-sdpp-green, #35ad8e); border-radius: 16px;
  background: #fff; color: #222; font-family: sans-serif; text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.bp-sdpp-upsell::backdrop { background: rgba(20, 30, 25, .55); }
.bp-sdpp-upsell[open] { animation: bp-sdpp-upsell-in .28s cubic-bezier(.2,.9,.3,1.2); }
.bp-sdpp-upsell[open]::backdrop { animation: bp-sdpp-fade .2s ease-out; }
@keyframes bp-sdpp-upsell-in { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes bp-sdpp-fade { from { opacity: 0; } }
.bp-sdpp-upsell .bp-sdpp-upsell-close {
  all: unset; position: absolute; top: 6px; right: 6px; box-sizing: border-box; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; text-align: center; line-height: 38px; font-size: 1.7rem; color: #444;
}
.bp-sdpp-upsell .bp-sdpp-upsell-close:hover { background: rgba(0,0,0,.06); }
.bp-sdpp-upsell .bp-sdpp-upsell-truck { display: block; margin: 0 auto 4px; }
.bp-sdpp-upsell .bp-sdpp-truck-body { fill: #fff; stroke: var(--bp-sdpp-green, #35ad8e); stroke-width: 2; }
.bp-sdpp-upsell .bp-sdpp-truck-cab { fill: var(--bp-sdpp-green, #35ad8e); }
.bp-sdpp-upsell .bp-sdpp-truck-window { fill: #fff; }
.bp-sdpp-upsell .bp-sdpp-truck-wheel { fill: #333; stroke: #fff; stroke-width: 1.4; }
.bp-sdpp-upsell .bp-sdpp-upsell-title { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.2; color: var(--bp-sdpp-purple, #800080); }
.bp-sdpp-upsell .bp-sdpp-upsell-desc { margin: 0 0 14px; font-size: 1.05rem; line-height: 1.4; color: var(--bp-sdpp-green-dark, #215749); }
.bp-sdpp-upsell .bp-sdpp-upsell-choices { display: flex; flex-direction: column; gap: 10px; }
.bp-sdpp-upsell .bp-sdpp-upsell-choice {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%;
  margin: 0; padding: 12px 14px; cursor: pointer;
  border: 0; border-radius: 10px; background: var(--bp-sdpp-btn, #237a61); color: #fff;
  font: inherit; font-size: 1.15rem; font-weight: bold; line-height: 1.25;
  box-shadow: inset 0 1px 0 #54e3be, 0 5px 0 var(--bp-sdpp-green-dark, #215749);
  position: relative; top: 0;
}
.bp-sdpp-upsell .bp-sdpp-upsell-choice:active { top: 4px; box-shadow: inset 0 1px 0 #54e3be, 0 1px 0 var(--bp-sdpp-green-dark, #215749); }
.bp-sdpp-upsell .bp-sdpp-upsell-choice-price { font-size: .95rem; font-weight: normal; }
.bp-sdpp-upsell .bp-sdpp-upsell-choice-price:empty { display: none; }
/* "Continue with 1 loaf": a full-size choice too, in the free-delivery meter's
   amber "1 loaf" colours, so it isn't the small print. */
.bp-sdpp-upsell .bp-sdpp-upsell-skip {
  display: block; box-sizing: border-box; width: 100%; margin: 10px 0 0; padding: 12px 14px; cursor: pointer;
  border: 2px dashed #e7a849; border-radius: 10px; background: #fff7ea; color: #7a4300;
  font: inherit; font-size: 1.1rem; font-weight: bold; line-height: 1.25;
}
.bp-sdpp-upsell .bp-sdpp-upsell-skip:hover { background: #ffefd4; border-style: solid; }
.bp-sdpp-upsell .bp-sdpp-upsell-error { margin: 10px 0 0; color: #b3261e; font-weight: 600; }
.bp-sdpp-upsell .bp-sdpp-upsell-error:empty { display: none; }
.bp-sdpp-upsell.is-busy { cursor: progress; }
.bp-sdpp-upsell button:disabled { opacity: .6; cursor: progress; }
.bp-sdpp-upsell button:focus-visible { outline: 3px solid var(--bp-sdpp-focus, #14213d); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .bp-sdpp-upsell[open], .bp-sdpp-upsell[open]::backdrop { animation: none; }
}
@media (forced-colors: active) { .bp-sdpp-upsell .bp-sdpp-upsell-choice { border: 2px solid ButtonText; } }

/* ---------- "Still deciding?" section below the product (templates/more-info.php) ---------- */
.bp-sdpp .bp-sdpp-more {
  clear: both; box-sizing: border-box; max-width: 1100px; margin: 40px auto 30px; padding: 0 16px;
  font-family: sans-serif; color: #222; line-height: 1.5;
}
.bp-sdpp .bp-sdpp-more h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 4.5vw, 2.1rem); line-height: 1.2; color: var(--bp-sdpp-purple); }
.bp-sdpp .bp-sdpp-more p { margin: 0 0 12px; font-size: 1.1rem; }
/* The theme caps ".container p, ul, h2, h3" at 800px with no auto margins, which pinned
   them left of the centered button. Undo it here; centering is done below. */
.bp-sdpp .bp-sdpp-more :is(h2, h3, p, ul) { max-width: none; }
.bp-sdpp .bp-sdpp-more-hero, .bp-sdpp .bp-sdpp-more-final { box-sizing: border-box; width: auto; text-align: center; padding: 28px 16px; border-radius: 16px; }
.bp-sdpp .bp-sdpp-more-final p { max-width: 34em; margin-left: auto; margin-right: auto; }
/* Row titles and buttons centered over their own column's paragraphs. */
.bp-sdpp .bp-sdpp-more-text h2, .bp-sdpp .bp-sdpp-more-links { text-align: center; }
.bp-sdpp .bp-sdpp-more-text > .bp-sdpp-more-btn { display: block; width: fit-content; margin-left: auto; margin-right: auto; text-align: center; }
.bp-sdpp .bp-sdpp-more-hero h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.bp-sdpp .bp-sdpp-more-lede { font-size: clamp(1.25rem, 3.5vw, 1.6rem) !important; color: var(--bp-sdpp-green-dark); }
.bp-sdpp .bp-sdpp-more-sub { max-width: 34em; margin-left: auto !important; margin-right: auto !important; }

.bp-sdpp .bp-sdpp-more-row { display: grid; gap: 18px 36px; align-items: center; margin: 44px 0; }
@media (min-width: 760px) {
  .bp-sdpp .bp-sdpp-more-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  /* Image on the right every other row. Visual only: the image stays first in the DOM. */
  .bp-sdpp .bp-sdpp-more-row.is-flipped { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .bp-sdpp .bp-sdpp-more-row.is-flipped .bp-sdpp-more-media { order: 2; }
}
.bp-sdpp .bp-sdpp-more-media { margin: 0; }
.bp-sdpp .bp-sdpp-more-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
/* Its own shape comes from an inline aspect-ratio (bp_sdpp_more_image( ..., true )); this
   fallback only applies if that is missing. */
.bp-sdpp .bp-sdpp-more-media.is-graphic img { object-fit: contain; aspect-ratio: auto; max-height: 360px; margin: 0 auto; box-shadow: none; }
.bp-sdpp .bp-sdpp-more-list { margin: 0 0 14px; padding: 0 0 0 1.3em; font-size: 1.05rem; }
.bp-sdpp .bp-sdpp-more-list li { margin: 0 0 6px; }
.bp-sdpp .bp-sdpp-more-list.is-checks { list-style: none; padding: 0; }
.bp-sdpp .bp-sdpp-more-list.is-checks li { position: relative; padding-left: 1.7em; }
.bp-sdpp .bp-sdpp-more-list.is-checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.15em; height: 1.15em; border-radius: 50%;
  background: var(--bp-sdpp-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Buttons: same 3D green as Add to Cart. */
.bp-sdpp .bp-sdpp-more-btn {
  display: inline-block; position: relative; top: 0; margin: 6px 0 10px; padding: 12px 22px;
  border-radius: 8px; background: var(--bp-sdpp-btn, #237a61); color: #fff !important; text-decoration: none !important;
  font-weight: bold; font-size: 1.15rem; line-height: 1.2; text-shadow: 0 1px 0 rgba(0,0,0,.5);
  box-shadow: inset 0 1px 0 #54e3be, 0 6px 0 var(--bp-sdpp-green-dark);
}
.bp-sdpp .bp-sdpp-more-btn:hover { background: var(--bp-sdpp-btn-hover, #1c6a54); }
.bp-sdpp .bp-sdpp-more-btn:active { top: 5px; box-shadow: inset 0 1px 0 #54e3be, 0 1px 0 var(--bp-sdpp-green-dark); }
.bp-sdpp .bp-sdpp-more-btn.is-secondary { background: #fff; color: var(--bp-sdpp-green-dark) !important; text-shadow: none; box-shadow: inset 0 0 0 2px var(--bp-sdpp-green), 0 6px 0 var(--bp-sdpp-green-dark); }
.bp-sdpp .bp-sdpp-more-btn.is-big { font-size: 1.35rem; padding: 14px 30px; }
.bp-sdpp .bp-sdpp-more-btn:focus-visible, .bp-sdpp .bp-sdpp-more-link:focus-visible { outline: 3px solid var(--bp-sdpp-focus); outline-offset: 3px; }
.bp-sdpp .bp-sdpp-more-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.bp-sdpp .bp-sdpp-more-link {
  all: unset; cursor: pointer; color: var(--bp-sdpp-purple); text-decoration: underline; text-underline-offset: 3px;
}

.bp-sdpp .bp-sdpp-more-reviews { margin: 44px 0; text-align: center; }
.bp-sdpp .bp-sdpp-more-quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); text-align: left; }
.bp-sdpp .bp-sdpp-more-quote { margin: 0; padding: 18px; border-radius: 14px; background: #fff7ea; border: 2px solid #f3dcae; }
.bp-sdpp .bp-sdpp-more-quote blockquote { margin: 0 0 8px; padding: 0; border: 0; font-style: normal; quotes: none; }
.bp-sdpp .bp-sdpp-more-quote blockquote p { font-size: 1.05rem; margin: 0; }
.bp-sdpp .bp-sdpp-more-quote blockquote::before, .bp-sdpp .bp-sdpp-more-quote blockquote::after { content: none; }
.bp-sdpp .bp-sdpp-more-quote figcaption { font-size: .9rem; color: #6b4a1a; }
.bp-sdpp .bp-sdpp-more-stars { margin: 0 0 6px !important; color: #b8860b; font-size: 1.2rem !important; letter-spacing: 2px; }
.bp-sdpp .bp-sdpp-more-allreviews { margin-top: 14px !important; }
.bp-sdpp .bp-sdpp-more-allreviews a { color: var(--bp-sdpp-purple); }

.bp-sdpp .bp-sdpp-more-final { background: #fff7ea; border: 2px dashed #e7a849; }
@media (prefers-reduced-motion: reduce) { .bp-sdpp .bp-sdpp-more-btn { transition: none; } }
@media (forced-colors: active) { .bp-sdpp .bp-sdpp-more-btn { border: 2px solid ButtonText; } }

.container section.entry-content ul {padding:10px !important;}