/* ===========================================================================
   Foundry Bakehouse — WooCommerce
   ---------------------------------------------------------------------------
   Gift sets and the Weekly Bread Club sell through WooCommerce, so the shop,
   cart and checkout are part of the site rather than a separate skin. Every
   value comes from tokens.css, so palettes and type pairings carry through.

   WooCommerce's own stylesheets still load (the product gallery and the
   overlays its scripts draw rely on them). This file is queued after them —
   see fbh_woo_enqueue() in inc/woocommerce.php — and written to outrank them:
   site-wide rules hang off body.fbh, and the cart, checkout, order and account
   pages are scoped to .fbh-commerce, the section template-parts/commerce/
   page.php wraps them in. Specificity does the work, not !important.
   =========================================================================== */

/* -- Notices --------------------------------------------------------------- */

.fbh .woocommerce-message,
.fbh .woocommerce-info,
.fbh .woocommerce-error {
  --fbh-notice: var(--fbh-info);
  position: relative;
  margin: 0 0 var(--fbh-space-m);
  padding: var(--fbh-space-s) var(--fbh-space-m);
  border: 0;
  border-left: 3px solid var(--fbh-notice);
  border-radius: var(--fbh-radius);
  background: var(--fbh-ground-2);
  color: var(--fbh-ink);
  font-size: var(--fbh-step--1);
  line-height: 1.5;
  list-style: none;
}
.fbh .woocommerce-message { --fbh-notice: var(--fbh-success); }
.fbh .woocommerce-error   { --fbh-notice: var(--fbh-danger); }

/* WooCommerce sets an icon-font glyph here and pads the text to clear it. */
.fbh .woocommerce-message::before,
.fbh .woocommerce-info::before,
.fbh .woocommerce-error::before { content: none; }

.fbh .woocommerce-error li { margin: 0; padding: 0; }
.fbh .woocommerce-error li + li { margin-top: 0.35rem; }

.fbh :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:not(.button) {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.fbh .woocommerce-notices-wrapper:empty { display: none; }

/* -- Buttons ---------------------------------------------------------------
   The site's button (.fbh-btn): tracked capitals on a 2px corner, brand fill.
   On the cart and checkout the supporting actions — Apply coupon, Update
   cart — drop to an outline, so the one filled button on the page is the one
   that moves the order on. */

:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fbh-space-2xs);
  min-height: 3rem;
  margin: 0;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--fbh-cta);
  border-radius: var(--fbh-radius);
  background: var(--fbh-cta);
  color: var(--fbh-on-cta);
  font-family: var(--fbh-font-text);
  font-size: var(--fbh-step--1);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--fbh-transition), color var(--fbh-transition), border-color var(--fbh-transition);
}

:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button:hover,
:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button.alt:hover {
  border-color: var(--fbh-cta-hover);
  background: var(--fbh-cta-hover);
  color: var(--fbh-on-cta);
}

/* WooCommerce paints .alt (Proceed to checkout, Place order) in its own
   purple. Here it is the brand fill like every other primary button. */
:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button.alt,
:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button.alt.disabled,
:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button.alt.disabled:hover {
  border-color: var(--fbh-cta);
  background: var(--fbh-cta);
  color: var(--fbh-on-cta);
}

:is(.fbh.woocommerce, .fbh .woocommerce) button.button:disabled,
:is(.fbh.woocommerce, .fbh .woocommerce) button.button:disabled[disabled] {
  padding: 0.75rem 1.5rem;
  opacity: 0.45;
  pointer-events: none;
}
:is(.fbh.woocommerce, .fbh .woocommerce) :is(a, button, input).button.disabled { opacity: 0.45; cursor: not-allowed; }

.fbh-commerce .woocommerce :is(.actions, .woocommerce-shipping-calculator, form.checkout_coupon) .button,
:is(.fbh.woocommerce, .fbh .woocommerce) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button {
  border-color: var(--fbh-line-strong);
  background: transparent;
  color: var(--fbh-ink);
}
.fbh-commerce .woocommerce :is(.actions, .woocommerce-shipping-calculator, form.checkout_coupon) .button:hover,
:is(.fbh.woocommerce, .fbh .woocommerce) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button:hover {
  border-color: var(--fbh-ink);
  background: transparent;
  color: var(--fbh-ink);
}

:is(.fbh.woocommerce, .fbh .woocommerce) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button {
  float: right;
  min-height: 0;
  margin: -0.35rem 0 -0.35rem var(--fbh-space-s);
  padding: 0.45rem 0.9rem;
}

/* -- Shop ------------------------------------------------------------------ */

/* WooCommerce still lays the product loop out the way it did before CSS had a
   grid, and two pieces of that survive inside one. Its clearfix ::before and
   ::after carry `content: " "`, so in a grid container they become grid items
   and take tracks of their own — which is why the Bread Club category, holding
   a single product, put that product in the second column. And li.product's
   percentage width is applied to the grid item, shrinking each card to 22% of
   its track: 65px cards on the gift boxes page. Its float and clear need no
   undoing; a grid item ignores both. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { content: none; }

/* auto-fill rather than the auto-fit the theme's own decks use: a category can
   hold one product, and auto-fit collapses the empty tracks and stretches that
   one card the full width of the page. */
.woocommerce ul.products { display: grid; gap: var(--fbh-space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); margin: 0; padding: 0; list-style: none; clear: both; }

/* The [class*="columns-"] selector is WooCommerce's own, from its small-screen
   stylesheet, repeated here so the width reset holds at every width. */
.woocommerce ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
  width: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--fbh-surface);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  overflow: hidden;
  padding: 0 0 var(--fbh-space-m);
}

/* The loop wraps image, title and price in a single link, so padding on the
   card's own children lands on that link and insets the photograph along with
   the text. Pad the pieces instead and let the image bleed to the card edge,
   as it does on the theme's own product cards. The button is excluded and
   given a margin, so its edge lines up with the text rather than its padding
   doing the insetting. */
.woocommerce ul.products li.product > :not(.button),
.woocommerce ul.products li.product .woocommerce-loop-product__link > :not(img) { padding-inline: var(--fbh-space-m); }
.woocommerce ul.products li.product .woocommerce-loop-product__link { display: block; padding-inline: 0; }
.woocommerce ul.products li.product img { padding-inline: 0; margin-bottom: var(--fbh-space-s); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: var(--fbh-step-1); }
/* Titles wrap to different depths, so the buttons staggered down the row. */
.woocommerce ul.products li.product .button { margin-top: auto; margin-inline: var(--fbh-space-m); align-self: start; }

/* The sort control, which WooCommerce leaves at the browser's default. Same
   box and the same chevron as the theme's own selects — see .fbh-form select,
   which this mirrors rather than shares, because that one is 100% wide. */
.woocommerce .woocommerce-result-count { margin: 0 0 var(--fbh-space-m); color: var(--fbh-ink-2); }
.woocommerce .woocommerce-ordering { margin: 0 0 var(--fbh-space-m); }
.woocommerce .woocommerce-ordering select.orderby {
  width: auto;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.65rem 2.5rem 0.65rem 0.8rem;
  background-color: var(--fbh-surface);
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  color: var(--fbh-ink);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23312923'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209l6%206%206-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.75rem;
}
.woocommerce .woocommerce-ordering select.orderby::-ms-expand { display: none; }
.woocommerce span.onsale { background: var(--fbh-accent); color: var(--fbh-on-accent); border-radius: var(--fbh-radius-pill); }
.woocommerce div.product .price, .woocommerce ul.products li.product .price { color: var(--fbh-brand); font-family: var(--fbh-font-display); }

/* -- Single product -------------------------------------------------------- */

/* WooCommerce ships this page nearly unstyled, so it arrived in the browser's
   own language rather than the theme's: native selects, white tabs with
   rounded corners and a lavender border, a photograph loose on the page. */

/* The photograph gets the frame the theme's cards have. */
.woocommerce div.product .woocommerce-product-gallery__image {
  background: var(--fbh-surface);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  overflow: hidden;
}
.woocommerce div.product .woocommerce-product-gallery__image img { display: block; }
.woocommerce div.product .woocommerce-product-gallery__trigger { background: var(--fbh-surface); border: 1px solid var(--fbh-line); }
.woocommerce div.product .flex-control-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--fbh-space-s); margin: var(--fbh-space-s) 0 0; padding: 0; list-style: none; }
.woocommerce div.product .flex-control-thumbs li { width: auto; margin: 0; float: none; }
.woocommerce div.product .flex-control-thumbs img { display: block; width: 100%; border: 1px solid var(--fbh-line); border-radius: var(--fbh-radius); opacity: 0.7; }
.woocommerce div.product .flex-control-thumbs img:is(.flex-active, :hover) { opacity: 1; border-color: var(--fbh-line-strong); }

/* The variation picker is a table of label/control pairs. Stacked into the
   theme's form shape — label above, field full width — rather than left in two
   columns where each select sized itself to its longest option and no two
   lined up. */
.woocommerce div.product form.cart table.variations { display: block; width: 100%; margin: 0 0 var(--fbh-space-m); border: 0; }
.woocommerce div.product form.cart table.variations tbody,
.woocommerce div.product form.cart table.variations tr { display: block; }
.woocommerce div.product form.cart table.variations tr + tr { margin-top: var(--fbh-space-s); }
.woocommerce div.product form.cart table.variations :is(th, td) { display: block; width: auto; padding: 0; border: 0; text-align: left; }
.woocommerce div.product form.cart table.variations :is(th, td).label label { display: block; margin-bottom: 0.3rem; font-size: var(--fbh-step--1); font-weight: 600; color: var(--fbh-ink); }

/* Same box and chevron as the theme's own selects — see .fbh-form select,
   which this mirrors rather than shares, since that one is scoped to the
   theme's forms. */
.woocommerce div.product form.cart table.variations select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 2.5rem 0.65rem 0.8rem;
  background-color: var(--fbh-surface);
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  color: var(--fbh-ink);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23312923'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209l6%206%206-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.75rem;
}
.woocommerce div.product form.cart table.variations select::-ms-expand { display: none; }
.woocommerce div.product form.cart .reset_variations { display: inline-block; margin-top: var(--fbh-space-xs); font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }

/* Any text field a plugin adds to the add-to-cart form — the personal-notes
   box on the Bread Club, for one — rather than leaving it at the default. */
.woocommerce div.product form.cart :is(textarea, input[type="text"]) {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: var(--fbh-surface);
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  color: var(--fbh-ink);
}
.woocommerce div.product form.cart textarea { min-height: 5rem; resize: vertical; }

/* The quantity box and the button already sit side by side and only wanted a
   gap. Their wrapper is deliberately not made a flex row: plugins put their
   own fields inside it — the personal-notes box on this product — and a row
   squeezed that field to a fifth of the column. */
.woocommerce div.product form.cart .quantity { margin-right: var(--fbh-space-s); }
.woocommerce div.product form.cart .single_variation .price { display: block; margin-bottom: var(--fbh-space-s); }

/* Fields a plugin adds to the form, which arrive as WooCommerce form rows. */
.woocommerce div.product form.cart .form-row { margin: 0 0 var(--fbh-space-s); padding: 0; }
.woocommerce div.product form.cart .form-row > label { display: block; margin-bottom: 0.3rem; font-size: var(--fbh-step--1); font-weight: 600; color: var(--fbh-ink); }

/* The SKU and category line, set apart from the form above it. */
.woocommerce div.product .product_meta { margin-top: var(--fbh-space-m); padding-top: var(--fbh-space-m); border-top: 1px solid var(--fbh-line); font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }
.woocommerce div.product .product_meta > span { display: block; }

/* Tabs. WooCommerce draws its own rounded white tabs with curved shoulders
   made of ::before and ::after box-shadows, so those have to go before the row
   can become a plain underlined one. The active tab carries a rule as well as
   a colour, so it is not told apart by colour alone. */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fbh-space-m);
  margin: 0 0 var(--fbh-space-l);
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--fbh-line);
  overflow: visible;
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { content: none; display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 0 0 0.75rem;
  margin-bottom: -0.75rem;
  font-size: var(--fbh-step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fbh-ink-2);
  border-bottom: 2px solid transparent;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li:is(.active, :hover) a { color: var(--fbh-brand); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { border-bottom-color: var(--fbh-brand); }

/* "Additional information" — the attribute table, on the theme's rules. */
.woocommerce div.product .woocommerce-tabs table.shop_attributes { width: 100%; border: 0; border-collapse: collapse; }
.woocommerce div.product .woocommerce-tabs table.shop_attributes :is(th, td) { padding: 0.6rem 0; border: 0; border-bottom: 1px solid var(--fbh-line); text-align: left; vertical-align: top; }
.woocommerce div.product .woocommerce-tabs table.shop_attributes th { width: 32%; font-weight: 600; color: var(--fbh-ink); }
.woocommerce div.product .woocommerce-tabs table.shop_attributes td { color: var(--fbh-ink-2); font-style: normal; }
.woocommerce div.product .woocommerce-tabs table.shop_attributes td p { margin: 0; }

/* Reviews. This panel is WordPress's comment form with WooCommerce's rating
   widget on top, and neither had been touched: inline labels beside 285px
   inputs, a textarea the full 1248px width of the panel, and the default
   lavender submit button. Same treatment as the rest of the page's fields. */
.woocommerce div.product #reviews .woocommerce-noreviews { margin: 0 0 var(--fbh-space-m); color: var(--fbh-ink-2); }
.woocommerce div.product #reviews .comment-reply-title {
  display: block;
  margin-bottom: var(--fbh-space-xs);
  font-family: var(--fbh-font-display);
  font-size: var(--fbh-step-2);
  color: var(--fbh-ink);
}
.woocommerce div.product #reviews .comment-notes { margin: 0 0 var(--fbh-space-m); font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }

/* A form column rather than a band the width of the page: the name and email
   fields are short by nature, and a textarea beside them at full width read as
   two different forms. */
.woocommerce div.product #reviews .comment-form { max-width: min(100%, 40rem); }
.woocommerce div.product #reviews .comment-form > :is(p, div) { margin: 0 0 var(--fbh-space-s); }
.woocommerce div.product #reviews .comment-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: var(--fbh-step--1);
  font-weight: 600;
  color: var(--fbh-ink);
}
.woocommerce div.product #reviews .comment-form .required { color: var(--fbh-brand); }
.woocommerce div.product #reviews .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: var(--fbh-surface);
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  color: var(--fbh-ink);
}
.woocommerce div.product #reviews .comment-form :is(input[type="text"], input[type="email"], input[type="url"]) { min-height: 3rem; }
.woocommerce div.product #reviews .comment-form textarea { min-height: 8rem; resize: vertical; }

/* The consent line is a checkbox with a sentence, not a field with a label. */
.woocommerce div.product #reviews .comment-form-cookies-consent { display: flex; gap: var(--fbh-space-xs); align-items: flex-start; }
.woocommerce div.product #reviews .comment-form-cookies-consent input { flex: none; margin-top: 0.2rem; }
.woocommerce div.product #reviews .comment-form-cookies-consent label { margin: 0; font-size: var(--fbh-step--1); font-weight: 400; color: var(--fbh-ink-2); }

/* WooCommerce swaps the rating select for a row of star links. */
.woocommerce div.product #reviews p.stars { margin: 0; }
.woocommerce div.product #reviews p.stars a { color: var(--fbh-accent); }
.woocommerce div.product #reviews p.stars:hover a,
.woocommerce div.product #reviews p.stars.selected a { color: var(--fbh-brand); }

/* An <input type="submit">, so it cannot carry .fbh-btn — the primary button
   is reproduced here instead. */
.woocommerce div.product #reviews .form-submit { margin: var(--fbh-space-m) 0 0; }
.woocommerce div.product #reviews .form-submit input#submit {
  display: inline-block;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  background: var(--fbh-cta);
  color: var(--fbh-on-cta);
  border: 1.5px solid var(--fbh-cta);
  border-radius: var(--fbh-radius);
  font-family: var(--fbh-font-text);
  font-size: var(--fbh-step--1);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--fbh-transition), border-color var(--fbh-transition);
}
.woocommerce div.product #reviews .form-submit input#submit:hover { background: var(--fbh-cta-hover); border-color: var(--fbh-cta-hover); }

/* Reviews themselves, once there are some. WooCommerce sizes the avatar and
   indents the text with a left margin, from when the avatar was floated; in a
   flex row that margin is a second gap on top of the real one. Both of those
   rules are written with two ids, so these carry #comments as well to reach
   them — a plain .woocommerce div.product prefix loses on id count. */
.woocommerce div.product #reviews #comments ol.commentlist { max-width: min(100%, 46rem); margin: 0 0 var(--fbh-space-l); padding: 0; list-style: none; }
.woocommerce div.product #reviews #comments ol.commentlist li { margin: 0 0 var(--fbh-space-m); padding: 0; background: none; border: 0; }
.woocommerce div.product #reviews #comments ol.commentlist li .comment_container { display: flex; gap: var(--fbh-space-s); align-items: flex-start; }
.woocommerce div.product #reviews #comments ol.commentlist li img.avatar {
  position: static;
  float: none;
  width: 3rem;
  height: 3rem;
  flex: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 1px solid var(--fbh-line);
  border-radius: 50%;
}
.woocommerce div.product #reviews #comments ol.commentlist li .comment-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: var(--fbh-space-m);
  background: var(--fbh-surface);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
}
.woocommerce div.product #reviews #comments ol.commentlist li .comment-text p { margin: 0 0 var(--fbh-space-xs); }
.woocommerce div.product #reviews #comments ol.commentlist li .comment-text p:last-child { margin-bottom: 0; }
.woocommerce div.product #reviews #comments ol.commentlist li .comment-text p.meta { font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }
.woocommerce div.product #reviews #comments ol.commentlist li .comment-text .star-rating { margin-bottom: var(--fbh-space-xs); color: var(--fbh-accent); }

/* -- Commerce pages: head and progress ------------------------------------- */

.fbh-commercehead { padding-block: var(--fbh-space-xl) var(--fbh-space-l); }

.fbh-commercehead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--fbh-space-s) var(--fbh-space-xl);
}

.fbh-commercehead__title { margin: 0; font-size: var(--fbh-step-5); }

/* Cart → Checkout → Order received. A real sequence, so it is numbered.

   Named fbh-progress rather than reusing the section component's name: this
   sheet loads on every page of the site, and a flex display rule here beat
   that component's grid on source order alone — same specificity, printed
   later. It turned the numbered-steps sections into a wrapping flex row whose
   items shrank to their own text, so three steps with long copy stacked up
   with ragged rules instead of sitting in one even row. */
.fbh-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fbh-space-2xs) var(--fbh-space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fbh-step;
  font-size: var(--fbh-step--1);
  color: var(--fbh-ink-2);
}

.fbh-progress__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  counter-increment: fbh-step;
}

.fbh-progress__item::before {
  content: counter(fbh-step);
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1.5px solid var(--fbh-line-strong);
  border-radius: 50%;
  background: var(--fbh-surface);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fbh-progress__item:not(:last-child)::after {
  content: "";
  width: clamp(1rem, 3vw, 2.5rem);
  height: 1px;
  margin-left: 0.25rem;
  background: var(--fbh-line-strong);
}

.fbh-progress__item.is-done::before { content: "\2713"; border-color: var(--fbh-brand); color: var(--fbh-brand); }
.fbh-progress__item.is-current { color: var(--fbh-ink); font-weight: 600; }
.fbh-progress__item.is-current::before { border-color: var(--fbh-brand); background: var(--fbh-brand); color: var(--fbh-on-brand); }
.fbh-progress a { color: inherit; text-underline-offset: 0.2em; }
.fbh-progress a:hover { color: var(--fbh-brand); }

.fbh-commerce { padding-block: var(--fbh-space-xl) var(--fbh-space-3xl); }

.fbh-commerce .woocommerce :is(h2, h3) { margin: 0 0 var(--fbh-space-s); font-size: var(--fbh-step-2); }

/* -- Fields ----------------------------------------------------------------
   The same field as the site's own forms (.fbh-form in components.css). */

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row { margin: 0 0 var(--fbh-space-s); padding: 0; }

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: var(--fbh-step--1);
  font-weight: 600;
  line-height: 1.4;
  color: var(--fbh-ink);
}

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row label:is(.checkbox, .woocommerce-form__label-for-checkbox) {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row .required { visibility: visible; color: var(--fbh-brand); font-weight: 600; text-decoration: none; }
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row .optional { font-weight: 400; color: var(--fbh-ink-3); }

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row :is(input.input-text, textarea, select),
:is(.fbh.woocommerce, .fbh .woocommerce) .quantity input.qty,
.fbh-commerce .woocommerce table.cart td.actions .coupon input.input-text {
  width: 100%;
  min-height: 3rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
  box-shadow: none;
  color: var(--fbh-ink);
  font: inherit;
  line-height: 1.4;
}

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row textarea { height: auto; min-height: 7rem; resize: vertical; }
:is(.fbh.woocommerce, .fbh .woocommerce) :is(input, textarea)::placeholder { color: var(--fbh-ink-3); }

:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row :is(input.input-text, textarea, select):focus,
:is(.fbh.woocommerce, .fbh .woocommerce) .quantity input.qty:focus,
.fbh-commerce .woocommerce table.cart td.actions .coupon input.input-text:focus { border-color: var(--fbh-ink-2); }

/* WooCommerce sets outline: 0 on its fields; the site's focus ring comes back. */
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row :is(input.input-text, textarea, select):focus-visible,
:is(.fbh.woocommerce, .fbh .woocommerce) .quantity input.qty:focus-visible,
.fbh-commerce .woocommerce table.cart td.actions .coupon input.input-text:focus-visible {
  outline: 3px solid var(--fbh-focus);
  outline-offset: 2px;
}

:is(.fbh.woocommerce, .fbh .woocommerce) :is(input[type="checkbox"], input[type="radio"]) {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--fbh-brand);
}

:is(.fbh.woocommerce, .fbh .woocommerce) .quantity input.qty {
  width: 4.75rem;
  padding-inline: 0.4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Validation: the theme's forms have no green "valid" state, so neither do
   these; an error is the danger tone. */
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row.woocommerce-invalid label { color: var(--fbh-danger); }
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row.woocommerce-invalid :is(input.input-text, select, textarea),
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row.woocommerce-invalid .select2-container:not(.select2-container--open) .select2-selection { border-color: var(--fbh-danger); }
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row.woocommerce-validated :is(input.input-text, select, textarea),
:is(.fbh.woocommerce, .fbh .woocommerce) form .form-row.woocommerce-validated .select2-container:not(.select2-container--open) .select2-selection { border-color: var(--fbh-line-strong); }

.fbh-commerce .woocommerce form .checkout-inline-error-message,
.fbh-commerce .woocommerce form.checkout_coupon .coupon-error-notice,
.fbh-commerce .woocommerce table.cart td.actions .coupon .coupon-error-notice {
  margin: 0.35rem 0 0;
  color: var(--fbh-danger);
  font-size: var(--fbh-step--1);
  text-align: left;
}

/* Country and state pickers (selectWoo). */
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container .select2-selection--single {
  height: 3rem;
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
}
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0 2.25rem 0 0.8rem;
  line-height: calc(3rem - 2px);
  color: var(--fbh-ink);
}
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container .select2-selection--single .select2-selection__arrow { top: 0; right: 0.5rem; height: calc(3rem - 2px); }
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container .select2-selection--single .select2-selection__arrow b { border-top-color: var(--fbh-ink-2); }
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container--open .select2-selection--single .select2-selection__arrow b { border-bottom-color: var(--fbh-ink-2); }
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container:is(.select2-container--focus, .select2-container--open) .select2-selection { border-color: var(--fbh-ink-2); }
:is(.fbh.woocommerce, .fbh .woocommerce) .select2-container .select2-selection:focus-visible { outline: 3px solid var(--fbh-focus); outline-offset: 2px; }

/* The open list is appended to <body>, outside any .woocommerce wrapper. */
.fbh .select2-dropdown {
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
  box-shadow: var(--fbh-shadow-lift);
  color: var(--fbh-ink);
}
.fbh .select2-container--default .select2-search--dropdown .select2-search__field {
  min-height: 2.6rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
}
.fbh .select2-container--default .select2-results__option { padding: 0.45rem 0.8rem; }
.fbh .select2-container--default .select2-results__option:is([aria-selected="true"], [data-selected="true"]) { background: var(--fbh-ground-2); color: var(--fbh-ink); }
.fbh .select2-container--default .select2-results__option--highlighted:is([aria-selected], [data-selected]) { background: var(--fbh-brand); color: var(--fbh-on-brand); }

/* Coupon and returning-customer forms that open above the checkout. */
.fbh-commerce .woocommerce :is(form.checkout_coupon, form.login, form.register, form.lost_reset_password) {
  margin: 0 0 var(--fbh-space-m);
  padding: var(--fbh-space-m);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-surface-2);
}
.fbh-commerce .woocommerce form.checkout_coupon .form-row { margin: 0; }
.fbh-commerce .woocommerce form.checkout_coupon .form-row-first { width: min(100%, 22rem); margin-right: var(--fbh-space-xs); }
.fbh-commerce .woocommerce form.checkout_coupon .form-row-last { width: auto; float: left; }

/* -- Cart ------------------------------------------------------------------
   Line items on the left, the order summary on the right; one column until
   there is room for both. The summary stays in view while the list scrolls. */

.fbh-cart { display: grid; gap: var(--fbh-space-xl); align-items: start; }

@media (min-width: 64rem) {
  .fbh-cart { grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem); column-gap: clamp(2.5rem, 5vw, 5rem); }
  .fbh-cart__summary { position: sticky; top: calc(var(--fbh-sticky-offset, 0px) + var(--fbh-space-m)); }
}

.fbh-commerce .woocommerce table.fbh-cartlines {
  margin: 0;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
}

.fbh-commerce .woocommerce table.fbh-cartlines :is(th, td) {
  padding: var(--fbh-space-m) var(--fbh-space-s) var(--fbh-space-m) 0;
  border: 0;
  border-top: 1px solid var(--fbh-line);
  background: none;
  line-height: 1.45;
  vertical-align: top;
}
.fbh-commerce .woocommerce table.fbh-cartlines :is(th, td):last-child { padding-right: 0; }

.fbh-commerce .woocommerce table.fbh-cartlines thead th {
  padding-block: 0 var(--fbh-space-xs);
  border-top: 0;
  font-size: var(--fbh-step--1);
  font-weight: 600;
  color: var(--fbh-ink-2);
}

.fbh-commerce .woocommerce table.fbh-cartlines :is(th, td):is(.product-quantity, .product-subtotal) { text-align: right; }

.fbh-commerce .woocommerce table.fbh-cartlines td.product-thumbnail { width: 7.25rem; }
.fbh-commerce .woocommerce table.fbh-cartlines td.product-thumbnail a { display: block; }
.fbh-commerce .woocommerce table.fbh-cartlines td.product-thumbnail img {
  width: 6rem;
  height: 6rem;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-ground-2);
}

.fbh-commerce .woocommerce table.fbh-cartlines td.product-quantity { width: 7rem; }

.fbh-commerce .woocommerce table.fbh-cartlines td.product-subtotal {
  width: 7rem;
  font-family: var(--fbh-font-display);
  font-size: var(--fbh-step-1);
  font-weight: 600;
  white-space: nowrap;
  color: var(--fbh-ink);
}

.fbh-cartline__name {
  margin: 0 0 0.3rem;
  font-family: var(--fbh-font-display);
  font-size: var(--fbh-step-1);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fbh-ink);
  text-align: left;
}
.fbh-cartline__name a { text-decoration: none; }
.fbh-cartline__name a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.fbh-commerce .woocommerce table.fbh-cartlines .product-short-description {
  max-width: 52ch;
  margin: 0 0 0.35rem;
  font-size: var(--fbh-step--1);
  color: var(--fbh-ink-2);
  text-align: left;
}

.fbh-commerce .woocommerce table.fbh-cartlines :is(dl.variation, .backorder_notification) {
  margin: 0 0 0.35rem;
  font-size: var(--fbh-step--1);
  color: var(--fbh-ink-2);
  text-align: left;
}

.fbh-cartline__unit { margin: 0; font-size: var(--fbh-step--1); color: var(--fbh-ink-3); text-align: left; }

.fbh-cartline__remove { margin: 0.5rem 0 0; text-align: left; }
.fbh-cartline__remove a {
  font-size: var(--fbh-step--1);
  font-weight: 600;
  color: var(--fbh-ink-2);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.fbh-cartline__remove a:hover { color: var(--fbh-danger); }

.fbh-commerce .woocommerce table.cart td.actions {
  padding: var(--fbh-space-m) 0 0;
  border-top: 1px solid var(--fbh-line-strong);
  background: none;
  text-align: left;
}

.fbh-cartactions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fbh-space-s);
}

.fbh-commerce .woocommerce table.cart td.actions .coupon {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 18rem;
  gap: var(--fbh-space-2xs);
  max-width: 26rem;
  float: none;
}
.fbh-commerce .woocommerce table.cart td.actions .coupon input.input-text { flex: 1 1 8rem; width: auto; min-width: 0; float: none; }
.fbh-commerce .woocommerce table.cart td.actions .coupon::before,
.fbh-commerce .woocommerce table.cart td.actions .coupon::after { content: none; }
.fbh-commerce .woocommerce table.cart td.actions .button { float: none; }
.fbh-commerce .woocommerce table.cart td.actions .coupon .coupon-error-notice { flex-basis: 100%; }

.fbh-commerce .woocommerce .cart-collaterals .cart_totals {
  float: none;
  width: auto;
  padding: var(--fbh-space-m);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-surface);
  box-shadow: var(--fbh-shadow-card);
}

.fbh-commerce .woocommerce .cart_totals > h2 { margin: 0 0 var(--fbh-space-xs); }

.fbh-commerce .woocommerce .cart_totals .wc-proceed-to-checkout { padding: var(--fbh-space-m) 0 0; }

.fbh-commerce .woocommerce .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  margin: 0;
  padding: 0.95rem 1.5rem;
  font-size: var(--fbh-step--1);
}

.fbh-commerce .woocommerce .cross-sells { float: none; width: auto; margin-top: var(--fbh-space-2xl); }
.fbh-commerce .woocommerce .cross-sells > h2 { font-size: var(--fbh-step-3); }

.fbh-commerce .woocommerce .return-to-shop { margin: var(--fbh-space-m) 0 0; }

/* -- Totals and order summaries --------------------------------------------
   The cart totals, the checkout's order summary and the order details on the
   order received page read like the catering price list: label, dotted
   leader, amount. Rows become flex lines, so these tables are taken out of
   table layout. */

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(thead, tbody, tfoot) { display: block; }

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) tr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem var(--fbh-space-s);
  padding: 0.7rem 0;
  border-top: 1px solid var(--fbh-line);
}

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) > :first-child > tr:first-child { padding-top: 0; border-top: 0; }

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(th, td) {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) td::before { content: none; }

/* Item lines: the name takes the room, the amount sits right. */
.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) tr > :first-child { flex: 1 1 12rem; min-width: 0; }
.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) tr > :last-child:not(:first-child) { flex: 0 1 auto; margin-left: auto; text-align: right; }

.fbh-commerce .woocommerce :is(table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) thead th {
  font-size: var(--fbh-step--1);
  font-weight: 600;
  color: var(--fbh-ink-3);
}

.fbh-commerce .woocommerce :is(table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) .product-quantity { font-weight: 400; color: var(--fbh-ink-3); white-space: nowrap; }

.fbh-commerce .woocommerce :is(table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(dl.variation, .wc-item-meta) {
  margin: 0.2rem 0 0;
  padding: 0;
  font-size: var(--fbh-step--1);
  color: var(--fbh-ink-2);
  list-style: none;
}

/* Totals lines: label, leader, amount. */
.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(tfoot tr, tr.cart-subtotal, tr.cart-discount, tr.fee, tr.tax-rate, tr.tax-total, tr.order-total):not(.woocommerce-shipping-totals) > th { flex: 0 0 auto; font-weight: 400; }

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(tfoot tr, tr.cart-subtotal, tr.cart-discount, tr.fee, tr.tax-rate, tr.tax-total, tr.order-total):not(.woocommerce-shipping-totals) > td {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  text-align: right;
}

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) :is(tfoot tr, tr.cart-subtotal, tr.cart-discount, tr.fee, tr.tax-rate, tr.tax-total, tr.order-total):not(.woocommerce-shipping-totals) > td::before {
  content: "";
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  margin-right: 0.6rem;
  border-bottom: 1px dotted var(--fbh-line-strong);
  transform: translateY(-0.25em);
}

.fbh-commerce .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) tr.cart-discount td { color: var(--fbh-success); }
.fbh-commerce .woocommerce a.woocommerce-remove-coupon { margin-left: 0.4rem; font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }

.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table) tr.order-total {
  margin-top: 0.15rem;
  padding-top: 0.9rem;
  border-top-color: var(--fbh-line-strong);
}
.fbh-commerce .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) tr.order-total > th { font-weight: 600; }
.fbh-commerce .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) tr.order-total > td { font-family: var(--fbh-font-display); font-size: var(--fbh-step-2); font-weight: 600; line-height: 1.2; }
.fbh-commerce .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) tr.order-total .amount { color: var(--fbh-brand); }
.fbh-commerce .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) tr.order-total small {
  flex-basis: 100%;
  font-family: var(--fbh-font-text);
  font-size: var(--fbh-step--1);
  font-weight: 400;
  color: var(--fbh-ink-2);
}

/* Shipping stacks: the label, then the choices under it at full width. */
.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) tr.woocommerce-shipping-totals { display: grid; gap: 0.4rem; }
.fbh-commerce .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table, table.woocommerce-table--order-details) tr.woocommerce-shipping-totals > td:last-child:not(:first-child) { margin-left: 0; text-align: left; }
.fbh-commerce .woocommerce tr.woocommerce-shipping-totals > td > * { text-align: left; }

.fbh-commerce .woocommerce ul#shipping_method {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fbh-commerce .woocommerce ul#shipping_method li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  line-height: 1.45;
  text-indent: 0;
}
.fbh-commerce .woocommerce ul#shipping_method li input { margin: 0.2rem 0 0; }
.fbh-commerce .woocommerce ul#shipping_method li label { display: inline; margin: 0; font-weight: 400; cursor: pointer; }
.fbh-commerce .woocommerce ul#shipping_method .amount { font-weight: 600; }

.fbh-commerce .woocommerce .woocommerce-shipping-destination { margin: 0.55rem 0 0; font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }
.fbh-commerce .woocommerce .woocommerce-shipping-calculator { margin: 0.25rem 0 0; }
.fbh-commerce .woocommerce a.shipping-calculator-button {
  font-size: var(--fbh-step--1);
  font-weight: 600;
  color: var(--fbh-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.fbh-commerce .woocommerce .shipping-calculator-form { margin: 0.75rem 0 0; }
.fbh-commerce .woocommerce .shipping-calculator-form .form-row { margin: 0 0 0.6rem; }
.fbh-commerce .woocommerce .shipping-calculator-form .button { width: 100%; }

/* -- Checkout --------------------------------------------------------------
   Details on the left, the order summary and payment on the right. The two
   wrappers are opened and closed through WooCommerce's checkout hooks (see
   inc/woocommerce.php), so form-checkout.php is not overridden. */

.fbh-commerce .woocommerce form.checkout { display: grid; gap: var(--fbh-space-xl); grid-template-columns: minmax(0, 1fr); }
.fbh-commerce .woocommerce form.checkout::before,
.fbh-commerce .woocommerce form.checkout::after { content: none; }

@media (min-width: 64rem) {
  .fbh-commerce .woocommerce form.checkout {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
  .fbh-commerce .woocommerce form.checkout > :not(.fbh-checkout__details):not(.fbh-checkout__summary) { grid-column: 1 / -1; }
}

.fbh-commerce .woocommerce form.checkout .col2-set :is(.col-1, .col-2) { float: none; width: auto; max-width: none; }

.fbh-checkout__summary {
  padding: var(--fbh-space-m);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-surface);
  box-shadow: var(--fbh-shadow-card);
}
.fbh-commerce .woocommerce .fbh-checkout__summary #order_review_heading { margin: 0 0 var(--fbh-space-xs); }

.fbh-commerce .woocommerce :is(.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-additional-fields, .woocommerce-account-fields) > h3 { margin: 0 0 var(--fbh-space-s); }
.fbh-commerce .woocommerce .woocommerce-additional-fields { margin-top: var(--fbh-space-l); }

.fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fbh-space-s);
}
.fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > .form-row {
  grid-column: 1 / -1;
  float: none;
  width: auto;
  margin: 0;
}
.fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > .form-row-first { grid-column: 1; }
.fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > .form-row-last { grid-column: 2; }
.fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > .clear { display: none; }

.fbh-commerce .woocommerce .woocommerce-account-fields { margin-top: var(--fbh-space-s); }

/* "Want to gift this?" stands in for WooCommerce's "Ship to a different
   address?" checkbox. The checkbox is still in the form, hidden; the button
   flips it (assets/js/app.js) and WooCommerce does the rest. */
/* WooCommerce floats this heading left (with an ID in the selector), which
   shrink-wraps the toggle; matched and outranked here. */
.fbh-commerce .woocommerce form.checkout .col2-set h3#ship-to-different-address {
  float: none;
  width: auto;
  margin: var(--fbh-space-l) 0 0;
  font-size: inherit;
}

.fbh-gift__toggle {
  display: flex;
  align-items: center;
  gap: var(--fbh-space-s);
  width: 100%;
  padding: var(--fbh-space-s) var(--fbh-space-m);
  border: 1px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-surface);
  color: var(--fbh-ink);
  font-family: var(--fbh-font-text);
  font-size: var(--fbh-step-0);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--fbh-transition), background var(--fbh-transition);
}
.fbh-gift__toggle:hover { border-color: var(--fbh-ink-2); }
.fbh-gift__toggle[aria-expanded="true"] { border-color: var(--fbh-brand); background: var(--fbh-surface-2); }

.fbh-gift__box {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 1.5px solid var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
  transition: background var(--fbh-transition), border-color var(--fbh-transition);
}
.fbh-gift__toggle[aria-expanded="true"] .fbh-gift__box { border-color: var(--fbh-brand); background: var(--fbh-brand); }
.fbh-gift__toggle[aria-expanded="true"] .fbh-gift__box::after {
  content: "";
  width: 0.38rem;
  height: 0.7rem;
  margin-top: -0.15rem;
  border: solid var(--fbh-on-brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fbh-gift__text { display: grid; gap: 0.1rem; }
.fbh-gift__title { font-family: var(--fbh-font-display); font-size: var(--fbh-step-1); font-weight: 600; line-height: 1.25; }
.fbh-gift__hint { font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }

.fbh-commerce .woocommerce .shipping_address { padding-top: var(--fbh-space-m); }

/* -- Payment --------------------------------------------------------------- */

.fbh-commerce .woocommerce #payment { margin: var(--fbh-space-m) 0 0; border-radius: 0; background: none; }

.fbh-commerce .woocommerce #payment ul.payment_methods {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}
.fbh-commerce .woocommerce #payment ul.payment_methods::before,
.fbh-commerce .woocommerce #payment ul.payment_methods::after { content: none; }

.fbh-commerce .woocommerce #payment ul.payment_methods li {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius);
  background: var(--fbh-surface);
  font-weight: 400;
  line-height: 1.4;
}
.fbh-commerce .woocommerce #payment ul.payment_methods li:has(> input:checked) { border-color: var(--fbh-ink-2); }
.fbh-commerce .woocommerce #payment ul.payment_methods li > input { margin: 0 0.6rem 0 0; vertical-align: -0.15em; }
.fbh-commerce .woocommerce #payment ul.payment_methods li > label { display: inline; margin: 0; font-weight: 600; cursor: pointer; }

.fbh-commerce .woocommerce #payment div.payment_box {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--fbh-radius);
  background: var(--fbh-ground-2);
  color: var(--fbh-ink-2);
  font-size: var(--fbh-step--1);
}
.fbh-commerce .woocommerce #payment div.payment_box::before { content: none; }
.fbh-commerce .woocommerce #payment div.payment_box p { margin: 0; }

.fbh-commerce .woocommerce #payment div.form-row { margin: 0; padding: var(--fbh-space-m) 0 0; }

.fbh-commerce .woocommerce #payment #place_order {
  float: none;
  width: 100%;
  min-height: 3.5rem;
  margin: 0;
}

.fbh-commerce .woocommerce .woocommerce-privacy-policy-text { margin: 0 0 var(--fbh-space-s); font-size: var(--fbh-step--1); color: var(--fbh-ink-2); }
.fbh-commerce .woocommerce .woocommerce-privacy-policy-text p { margin: 0; }
.fbh-commerce .woocommerce .woocommerce-terms-and-conditions-wrapper .form-row { margin: 0 0 var(--fbh-space-s); }

/* -- Order received -------------------------------------------------------- */

.fbh-commerce .woocommerce .woocommerce-order { max-width: 56rem; }

.fbh-commerce .woocommerce .woocommerce-thankyou-order-received {
  margin: 0 0 var(--fbh-space-l);
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--fbh-font-display);
  font-size: var(--fbh-step-3);
  line-height: var(--fbh-leading-head);
  color: var(--fbh-ink);
}
.fbh-commerce .woocommerce .woocommerce-thankyou-order-received::before { content: none; }

/* Order number, date, email, total, payment: a hairline grid of facts. */
.fbh-commerce .woocommerce ul.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 1px;
  margin: 0 0 var(--fbh-space-xl);
  padding: 0;
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-line);
  list-style: none;
  overflow: hidden;
}
.fbh-commerce .woocommerce ul.woocommerce-order-overview::before,
.fbh-commerce .woocommerce ul.woocommerce-order-overview::after { content: none; }
.fbh-commerce .woocommerce ul.woocommerce-order-overview li {
  float: none;
  margin: 0;
  padding: var(--fbh-space-s) var(--fbh-space-m);
  border: 0;
  background: var(--fbh-surface);
  font-size: var(--fbh-step--1);
  line-height: 1.4;
  color: var(--fbh-ink-2);
  text-transform: none;
}
.fbh-commerce .woocommerce ul.woocommerce-order-overview li strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--fbh-font-display);
  font-size: var(--fbh-step-1);
  font-weight: 600;
  line-height: 1.3;
  color: var(--fbh-ink);
  overflow-wrap: anywhere;
}

.fbh-commerce .woocommerce :is(.woocommerce-order-details, .woocommerce-customer-details) { margin: 0 0 var(--fbh-space-xl); }

.fbh-commerce .woocommerce .woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--fbh-space-m);
}
.fbh-commerce .woocommerce .woocommerce-columns--addresses::before,
.fbh-commerce .woocommerce .woocommerce-columns--addresses::after { content: none; }
.fbh-commerce .woocommerce .woocommerce-columns--addresses .woocommerce-column { float: none; width: auto; }

.fbh-commerce .woocommerce .woocommerce-customer-details address {
  padding: var(--fbh-space-s) var(--fbh-space-m);
  border: 1px solid var(--fbh-line);
  border-radius: var(--fbh-radius-card);
  background: var(--fbh-surface);
  font-style: normal;
  line-height: 1.6;
}

/* -- Account --------------------------------------------------------------- */

/* Signed out, this page is WooCommerce's two floated columns, and nothing had
   been done to them: the panels sat at different heights, the remember-me
   checkbox shared a line with the Log in button, and the newsletter options
   the mailing-list plugin adds were bold labels with their boxes pressed
   against them. The columns become a grid, which also collapses to one on a
   phone without a breakpoint of its own. */
.fbh-commerce--account .woocommerce .u-columns.col2-set {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--fbh-space-l);
}
.fbh-commerce--account .woocommerce .u-columns.col2-set::before,
.fbh-commerce--account .woocommerce .u-columns.col2-set::after { content: none; display: none; }
.fbh-commerce--account .woocommerce .u-columns > :is(.u-column1, .u-column2) { float: none; width: auto; display: flex; flex-direction: column; }
.fbh-commerce--account .woocommerce .u-columns h2 { margin: 0 0 var(--fbh-space-s); }

/* The form fills its column, so the two panels end level whichever has more
   in it — the register side always does. */
.fbh-commerce--account .woocommerce form:is(.login, .register) { flex: 1; margin: 0; }
.fbh-commerce--account .woocommerce form:is(.login, .register) br { display: none; }
.fbh-commerce--account .woocommerce form:is(.login, .register) .g-recaptcha { margin-block: var(--fbh-space-s); max-width: 100%; overflow: hidden; }

/* The submit row holds the remember-me label, two hidden inputs and the
   button, all inline. Stacked, the checkbox sits above the button instead of
   beside it. Identified by what it lacks: every field row carries
   woocommerce-form-row, and this one does not. */
.fbh-commerce--account .woocommerce form.login p.form-row:not(.woocommerce-form-row) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fbh-space-s);
}
.fbh-commerce--account .woocommerce form.login .woocommerce-form-login__rememberme { margin: 0; }

/* Checkbox and wording on one line with a gap, at the weight of body copy
   rather than the plugin's bold. */
.fbh-commerce--account .woocommerce form:is(.login, .register) label.woocommerce-form__label-for-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--fbh-space-2xs);
  font-weight: 400;
}
.fbh-commerce--account .woocommerce form.register input[type="checkbox"] { flex: none; margin: 0 var(--fbh-space-2xs) 0 0; vertical-align: middle; }
.fbh-commerce--account .woocommerce form.register input[type="checkbox"] + label.inline { font-weight: 400; vertical-align: middle; }

/* The plugin separates its options with empty clearing divs, which is also
   the only place a gap between them can go. */
.fbh-commerce--account .woocommerce form.register .clear { clear: both; height: var(--fbh-space-2xs); }

/* reCAPTCHA renders at a fixed 304px, which is 7px wider than the panel can
   give it on a 390px screen — enough to shave the right edge off the widget.
   Google's own answer is to scale it; the box it leaves behind is a few pixels
   taller than the badge, which nobody will notice. */
@media (max-width: 26rem) {
  .fbh-commerce--account .woocommerce form:is(.login, .register) .g-recaptcha { transform: scale(0.95); transform-origin: 0 0; }
}


@media (min-width: 48rem) {
  .fbh-commerce--account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    display: grid;
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
    gap: var(--fbh-space-xl);
    align-items: start;
  }
  .fbh-commerce--account .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
  .fbh-commerce--account .woocommerce:has(> .woocommerce-MyAccount-navigation)::after { content: none; }
}

.fbh-commerce--account .woocommerce :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) { float: none; width: auto; }
.fbh-commerce--account .woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; border-top: 1px solid var(--fbh-line); list-style: none; }
.fbh-commerce--account .woocommerce-MyAccount-navigation li { margin: 0; border-bottom: 1px solid var(--fbh-line); }
.fbh-commerce--account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 0.7rem 0;
  font-weight: 500;
  color: var(--fbh-ink-2);
  text-decoration: none;
}
.fbh-commerce--account .woocommerce-MyAccount-navigation a:hover { color: var(--fbh-ink); }
.fbh-commerce--account .woocommerce-MyAccount-navigation li.is-active a {
  padding-left: 0.75rem;
  box-shadow: inset 3px 0 0 var(--fbh-brand);
  font-weight: 600;
  color: var(--fbh-ink);
}

/* -- Block-based cart and checkout -----------------------------------------
   The pages run on the classic templates. If they are ever switched to
   WooCommerce's Cart and Checkout blocks, the theme's templates stop applying
   (wp-admin says so — see inc/woocommerce.php); this keeps the blocks in the
   site's type, colour and buttons in the meantime. */

.fbh :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) { font-family: var(--fbh-font-text); color: var(--fbh-ink); }

.fbh :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) :is(h2, h3, .wc-block-components-title, .wc-block-cart__totals-title, .wc-block-components-checkout-step__title) {
  font-family: var(--fbh-font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
}

.fbh .wc-block-components-button:not(.is-link) {
  min-height: 3rem;
  border-radius: var(--fbh-radius);
  background: var(--fbh-cta);
  color: var(--fbh-on-cta);
  font-family: var(--fbh-font-text);
  font-size: var(--fbh-step--1);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.fbh .wc-block-components-button:not(.is-link):hover { background: var(--fbh-brand-hover); color: var(--fbh-on-brand); }

.fbh :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) :is(.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select, .wc-block-components-textarea) {
  border-color: var(--fbh-line-strong);
  border-radius: var(--fbh-radius);
  background-color: var(--fbh-surface);
  color: var(--fbh-ink);
}

.fbh .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-family: var(--fbh-font-display); color: var(--fbh-brand); }

/* -- Small screens ---------------------------------------------------------
   WooCommerce's small-screen sheet (up to 768px) turns cart cells into
   right-aligned label/value rows. Each cart line is put back together here as
   a small grid: picture beside the name, quantity and line total under it. */

@media (max-width: 47.999rem) {
  .fbh-commercehead { padding-block: var(--fbh-space-l) var(--fbh-space-m); }
  .fbh-commercehead__title { font-size: var(--fbh-step-4); }
  .fbh-commerce { padding-top: var(--fbh-space-l); }

  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name name"
      "thumb qty  total";
    gap: var(--fbh-space-xs) var(--fbh-space-s);
    padding-block: var(--fbh-space-m);
    border-top: 1px solid var(--fbh-line);
  }
  .fbh-commerce .woocommerce table.fbh-cartlines tbody tr.cart_item:first-child { border-top: 0; padding-top: 0; }

  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
  }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td::before { content: none; }

  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-thumbnail { grid-area: thumb; }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-thumbnail img { width: 4.5rem; height: 4.5rem; }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-name { grid-area: name; }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-quantity { grid-area: qty; align-self: center; }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-quantity .quantity { text-align: left; }
  .fbh-commerce .woocommerce table.fbh-cartlines tr.cart_item > td.product-subtotal { grid-area: total; align-self: center; }

  .fbh-commerce .woocommerce table.cart td.actions { display: block; }
  .fbh-cartactions { flex-direction: column; align-items: stretch; }
  .fbh-commerce .woocommerce table.cart td.actions .coupon { flex-basis: auto; max-width: none; }
  .fbh-commerce .woocommerce table.cart td.actions .coupon .button { width: auto; }
  .fbh-commerce .woocommerce table.cart td.actions .fbh-cartactions > .button { width: 100%; }

  .fbh-checkout__summary,
  .fbh-commerce .woocommerce .cart-collaterals .cart_totals { padding: var(--fbh-space-s); }
}

@media (max-width: 30rem) {
  .fbh-commerce .woocommerce :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > :is(.form-row-first, .form-row-last) { grid-column: 1 / -1; }
  .fbh-progress__item:not(:last-child)::after { width: 0.75rem; }
}

/* What is in a gift box, under its name and price. Unbulleted, because the
   lines are already "4 - Chocolate Chunk" and a bullet in front of a count
   reads as a second number. */
.fbh-product__contents {
  margin: 0 0 var(--fbh-space-s);
  padding: 0;
  list-style: none;
  color: var(--fbh-ink-2);
  font-size: var(--fbh-step--1);
  line-height: 1.5;
}
.fbh-product__contents li + li { margin-top: 0.1rem; }
