/* Jerome — WooCommerce styles
 *
 * Enqueued only on WooCommerce pages (account, cart, checkout, shop) — see
 * jerome_enqueue_woocommerce_assets() in functions.php. All rules are scoped
 * to the body / wrapper classes WooCommerce sets, so nothing here can leak
 * into other templates.
 *
 * Breakpoint system (Bootstrap-aligned, mirrors custom.css):
 *   xs  <576px       sm  ≥576px       md  ≥768px
 *   lg  ≥992px       xl  ≥1200px      xxl ≥1400px
 */

/* ============================================
   Wrapper & typography
   ============================================ */

.woocommerce-account .woocommerce,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  font-family: var(--wp--preset--font-family--plus-jakarta-sans);
  color: var(--wp--preset--color--ink);
}

/* ============================================
   Page frame
   --------------------------------------------
   The shop's own templates (archive-product, taxonomy-product_cat,
   single-product) declare their 1.5rem gutter as block padding, matching
   every other template in the theme. Keeping it in block attributes rather
   than here is what makes the alignfull trust band work: WordPress reads the
   container's declared padding and generates the matching negative margin.

   Cart, checkout and order-confirmation still fall through to WooCommerce's
   own blockified templates, whose `main` has NO horizontal padding at all —
   below the 1200px wide-size that leaves content flush against the window
   edge. This rule gives those pages a gutter; `.jerome-shop-main` is excluded
   so the ID selector can't outrank the templates that already have one.
   ============================================ */

body.woocommerce-page main#wp--skip-link--target:not(.jerome-shop-main) {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-inline: 1.5rem;
}

@media (max-width: 575.98px) {
  .jerome-shop-main {
    padding-top: 2rem !important;
    padding-bottom: 4rem !important;
  }

  /* The horizontal gutter deliberately stays at 1.5rem on every breakpoint:
     the alignfull negative margin WordPress generates for the trust band is a
     fixed calc(1.5rem * -1), so shrinking the gutter here would push that
     band past the viewport and create a horizontal scrollbar. */
  .jerome-product-main .orthocanis-trust {
    padding-block: 3.5rem !important;
  }
}

/* ============================================
   Breadcrumbs
   --------------------------------------------
   The breadcrumbs block hard-codes `has-small-font-size`, and the preset rule
   behind that class is !important, so matching it needs the same weapon. The
   value is a literal rem because the `small` preset resolves to 13px — see
   the note on font-size presets in custom.css.
   ============================================ */

.jerome-breadcrumbs.has-small-font-size {
  font-size: 0.9375rem !important;
}

.jerome-breadcrumbs {
  margin: 0;
  font-family: var(--wp--preset--font-family--outfit);
  color: var(--wp--preset--color--text-muted);
}

.jerome-breadcrumbs a {
  color: var(--wp--preset--color--marine);
  text-decoration: none;
}

.jerome-breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================
   Shop & category archives — page header
   ============================================ */

/* Section rhythm on these pages is padding, never margin: custom.css zeroes
   `main > * + *` block-gap with !important, so a margin between direct
   children of main is silently dropped. */
.jerome-shop-header {
  padding: 1.25rem 0 3rem;
}

.jerome-shop-header .wp-block-query-title {
  margin: 0;
}

/* No max-width here: the constrained layout answers a narrower child with
   `margin-inline: auto !important`, which would centre the intro under a
   left-aligned heading. The page column is already a comfortable measure. */
.jerome-shop-header__intro {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.jerome-shop-header__intro p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Shop & category archives — catalog toolbar
   --------------------------------------------
   Result count and sorting read as one pair rather than two strangers at
   opposite ends of the row: same baseline, same type scale, closed off by a
   hairline that separates them from the grid.

   The whole row is removed on catalogs below four products — see
   jerome_hide_catalog_toolbar_on_small_archives() in inc/woocommerce.php.
   ============================================ */

.jerome-shop-toolbar {
  gap: 0.75rem 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Only the grid that actually follows a toolbar needs clearance beneath it.
   On a small catalog the toolbar is not rendered at all, the sibling selector
   stops matching, and the grid keeps sitting directly under the header. */
.jerome-shop-toolbar + .wp-block-woocommerce-product-collection {
  padding-top: 2.5rem;
}

.jerome-shop-toolbar .woocommerce-result-count {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--text-muted);
}

.jerome-shop-toolbar .woocommerce-ordering {
  margin: 0;
}

.jerome-shop-toolbar select.orderby {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 15rem;
  padding: 0.5rem 2.25rem 0.5rem 0.875rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--wp--preset--color--ink);
  background-color: var(--wp--preset--color--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230F2C59' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem auto;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--sm);
  cursor: pointer;
  transition: border-color var(--wp--custom--transition--fast), box-shadow var(--wp--custom--transition--fast);
}

.jerome-shop-toolbar select.orderby:hover {
  border-color: var(--wp--custom--color--disabled);
}

.jerome-shop-toolbar select.orderby:focus {
  outline: none;
  border-color: var(--wp--preset--color--marine);
  box-shadow: var(--wp--custom--shadow--focus);
}

/* ============================================
   Product grid (shop archive + related products)
   --------------------------------------------
   The card itself is the shared .wc-block-product component in custom.css;
   only the track layout lives here.

   WooCommerce's own `shrinkColumns` grid is
   `repeat(auto-fill, minmax(max(150px, 50% - 0.625em), 1fr))`, whose column
   count is derived from a gap of exactly 1.25em — widening the gap silently
   collapses it to a single column. Declaring the tracks outright avoids that
   coupling. `justify-content: center` keeps a partially filled row (one
   related product, say) centred instead of stranded on the left.
   ============================================ */

.jerome-product-grid .wc-block-product-template {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jerome-product-grid .wc-block-product-template > li {
  flex: 1 1 100%;
  margin: 0;
}

@media (min-width: 576px) {
  .jerome-product-grid .wc-block-product-template > li {
    flex: 0 1 calc((100% - 2rem) / 2);
    max-width: calc((100% - 2rem) / 2);
  }
}

.jerome-product-grid .wp-block-query-pagination {
  margin-top: 3rem;
}

/* ============================================
   Single product — hero (gallery + summary)
   ============================================ */

.jerome-product-hero {
  padding: 2rem 0 4.5rem;
  column-gap: clamp(2rem, 4vw, 4rem);
}

/* --- Gallery --- */

.jerome-product-hero__media .woocommerce-product-gallery,
.jerome-product-hero__media .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.jerome-product-hero__media .woocommerce-product-gallery__image img {
  border-radius: var(--wp--custom--radius--lg);
}

/* The zoom trigger reads as a control rather than a stray glyph. */
.jerome-product-hero__media .woocommerce-product-gallery__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--wp--preset--color--surface);
  border-radius: 50%;
  box-shadow: var(--wp--custom--shadow--sm);
}

/* Flexslider floats its thumbnails at a fixed 25%; a flex row with a real gap
   keeps them square and evenly spaced whatever the image count. */
.jerome-product-hero__media .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.jerome-product-hero__media .flex-control-thumbs li {
  float: none;
  width: calc((100% - 2.25rem) / 4);
  margin: 0;
  list-style: none;
}

.jerome-product-hero__media .flex-control-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid transparent;
  border-radius: var(--wp--custom--radius--sm);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity var(--wp--custom--transition--fast), border-color var(--wp--custom--transition--fast);
}

.jerome-product-hero__media .flex-control-thumbs img:hover,
.jerome-product-hero__media .flex-control-thumbs img.flex-active {
  opacity: 1;
  border-color: var(--wp--preset--color--marine);
}

/* --- Summary --- */

.jerome-product-hero__summary .wp-block-post-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.jerome-product-hero__summary .wp-block-woocommerce-product-price {
  margin: 0 0 1.5rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--wp--preset--color--marine);
}

.jerome-product-hero__summary .wp-block-post-excerpt {
  margin: 0 0 2rem;
}

.jerome-product-hero__summary .wp-block-post-excerpt__excerpt {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--wp--preset--color--text-muted);
}

.jerome-product-hero__summary form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0;
}

.jerome-product-hero__summary .quantity {
  margin: 0;
}

.jerome-product-hero__summary .quantity .qty {
  box-sizing: border-box;
  width: 4.5rem;
  height: 100%;
  padding: 0.875rem 0.5rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1rem;
  text-align: center;
  color: var(--wp--preset--color--ink);
  background-color: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--sm);
  transition: border-color var(--wp--custom--transition--fast), box-shadow var(--wp--custom--transition--fast);
}

.jerome-product-hero__summary .quantity .qty:focus {
  outline: none;
  border-color: var(--wp--preset--color--marine);
  box-shadow: var(--wp--custom--shadow--focus);
}

/* The primary CTA of the whole page, so it outweighs the grid buttons.
   !important matches the .single_add_to_cart_button rule in custom.css, which
   needs it to outrank the wp-element-button styles from theme.json. */
.jerome-product-hero__summary .single_add_to_cart_button {
  padding: 0.875rem 2rem !important;
  font-size: 1.0625rem !important;
  font-weight: 600 !important;
}

/* ============================================
   Single product — description
   --------------------------------------------
   Rendered by core/post-content at the template's 760px content width, so the
   copy keeps a readable measure instead of the 1200px lines WooCommerce's own
   tabbed panel produced. Headings are sized down to match: the site-wide h2
   is 42px, which outshouts the product title inside a text column.
   ============================================ */

/* The white run-out before the ice band starts. */
.jerome-product-description {
  padding-bottom: 4.5rem;
}

.jerome-product-description > *:first-child {
  margin-top: 0;
}

.jerome-product-description h2 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  line-height: 1.2;
}

.jerome-product-description h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.jerome-product-description p,
.jerome-product-description li {
  line-height: 1.8;
}

/* ============================================
   Single product — brand trust band
   --------------------------------------------
   Full-bleed ice band; the bleed mechanics live with the pattern's own styles
   in custom.css, this is only its place in the page rhythm.
   ============================================ */

.jerome-product-main .orthocanis-trust {
  /* Its own 5rem block padding and the description's run-out above carry the
     spacing; the band only needs its horizontal bleed, which WordPress
     generates from the alignfull attribute. */
  border-radius: 0;
}

/* ============================================
   Single product — reviews
   ============================================ */

.jerome-reviews {
  padding-top: 4.5rem;
}

.jerome-reviews .wp-block-woocommerce-product-reviews-title,
.jerome-reviews .comment-reply-title {
  display: block;
  margin: 0 0 1.5rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--wp--preset--color--marine);
}

.jerome-reviews .comment-reply-title {
  font-size: 1.25rem;
  margin-top: 2.5rem;
}

/* The review form is core's comment form, so it uses `p.comment-form-*` rows
   rather than the `.form-row` markup the rest of WooCommerce emits — the
   inputs already inherit the shared field styles below, these rules give the
   labels and rows the same treatment. */
.jerome-reviews .comment-notes {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--text-muted);
}

.jerome-reviews .comment-form-rating,
.jerome-reviews .comment-form-comment,
.jerome-reviews .comment-form-author,
.jerome-reviews .comment-form-email {
  margin: 0 0 1.5rem;
}

.jerome-reviews .comment-form label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wp--preset--color--marine);
}

.jerome-reviews .comment-form .required {
  color: var(--wp--preset--color--mint);
}

.jerome-reviews .stars-wrapper {
  margin: 0;
}

.jerome-reviews .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.jerome-reviews .comment-form-cookies-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  accent-color: var(--wp--preset--color--marine);
}

.jerome-reviews .comment-form-cookies-consent label {
  margin: 0;
  font-family: var(--wp--preset--font-family--plus-jakarta-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--wp--preset--color--text-muted);
}

/* ============================================
   Single product — related products
   --------------------------------------------
   Whitespace alone separates this from the reviews above; the ice band
   further up already breaks the page, so a rule here would be one divider
   too many.
   ============================================ */

/* Roughly twice the heading's own 2rem run-out below, which reads as a section
   break without the review form's trailing whitespace compounding into a gulf. */
.jerome-related {
  padding-top: 3.5rem;
}

.jerome-related__title {
  margin: 0 0 2rem;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  line-height: 1.2;
}

/* Strip WooCommerce's float-clearing pseudo-elements — we use grid. */
.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
  content: none;
}

/* ============================================
   My account — break out of the 720px content constraint
   --------------------------------------------
   The page template wraps post-content in a constrained layout
   (contentSize = 720px). That's right for paragraph pages but it leaves
   the my-account sidebar+content grid cramped. Widen the page-template's
   constrained children to wideSize (1200px) on the my-account body class
   only — every other template stays at 720px.

   TODO: this is a CSS workaround for a layout-engine choice. The cleaner
   fix is a dedicated templates/page-my-account.html with a wider layout,
   assigned to the my-account page in the editor. Do that the next time
   the page template is touched.
   ============================================ */

body.woocommerce-account main.wp-block-group.is-layout-constrained > .wp-block-post-title,
body.woocommerce-account main.wp-block-group.is-layout-constrained > .wp-block-post-content {
  max-width: var(--wp--style--global--wide-size, 1200px);
  width: 100%;
}

/* Let the .woocommerce wrapper fill the now-wider post-content (the
   inner constrained layout would otherwise still clamp it to 720px). */
body.woocommerce-account .wp-block-post-content.is-layout-constrained > .woocommerce {
  max-width: 100%;
}

/* ============================================
   My account — page heading
   ============================================ */

.woocommerce-account .wp-block-post-title {
  margin-bottom: 1.75rem;
}

/* ============================================
   My account — layout grid
   --------------------------------------------
   Only applies when the my-account nav is present (i.e. logged in).
   :has() is used so the logged-out login/register screens skip the grid
   and use their own centered-card layout below.
   Mobile (default): single column, nav stacked above content.
   Desktop (lg+):    240px sidebar + flexible content column.
   ============================================ */

.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) {
  display: grid;
  /* minmax(0, 1fr) — not bare 1fr — so unbreakable tokens like long
     usernames can't push the column wider than its track. */
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
}

/* ============================================
   My account — navigation
   --------------------------------------------
   Selectors mirror WooCommerce's own specificity
   (`.woocommerce-account .woocommerce-MyAccount-navigation ul li a`)
   so default rules like `float: left; width: 30%` and the link's
   `display: block` don't override our layout.
   ============================================ */

.woocommerce-account .woocommerce-MyAccount-navigation {
  font-family: var(--wp--preset--font-family--outfit);
  float: none;
  width: 100%;
  margin: 0;

  & ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  & ul li {
    margin: 0;
    padding: 0;
    border: none;
    list-style: none;
  }

  & ul li a {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--wp--custom--radius--sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--wp--preset--color--ink);
    text-decoration: none;
    transition: background-color var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast);
  }

  & ul li a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
    transition: background-color var(--wp--custom--transition--fast), transform var(--wp--custom--transition--fast);
  }

  & ul li a:hover {
    background-color: var(--wp--preset--color--ice);
    color: var(--wp--preset--color--marine);
  }

  & ul li.is-active a {
    background-color: var(--wp--preset--color--marine);
    color: var(--wp--preset--color--surface);
  }

  & ul li.is-active a::before {
    background-color: var(--wp--preset--color--mint);
    transform: scale(1.2);
  }

  /* Logout sits visually separated — it's a destructive action. */
  & ul li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--wp--preset--color--border);
  }

  & ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: var(--wp--preset--color--text-muted);
  }

  & ul li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background-color: var(--wp--preset--color--ice);
    color: var(--wp--preset--color--marine);
  }
}

/* ============================================
   My account — content panel
   --------------------------------------------
   Nested under .woocommerce-account so every rule here matches the
   `.woocommerce-account .woocommerce-MyAccount-content` specificity of
   WooCommerce's own float/width defaults — no specificity ratcheting.
   ============================================ */

.woocommerce-account .woocommerce-MyAccount-content {
  float: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  margin: 0;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--lg);
  padding: 2rem;
  box-shadow: var(--wp--custom--shadow--sm);

  & > *:first-child { margin-top: 0; }
  & > *:last-child  { margin-bottom: 0; }

  & h2,
  & h3 {
    margin-top: 0;
    font-family: var(--wp--preset--font-family--outfit);
    color: var(--wp--preset--color--marine);
  }

  & h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  & h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  & p {
    margin: 0 0 1rem;
    line-height: 1.7;
  }

  & p:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .woocommerce-account .woocommerce-MyAccount-content {
    padding: 1.5rem 1.25rem;
  }
}

/* ============================================
   Notices — info / message / error
   --------------------------------------------
   Applies on every Woo page, not just my-account.
   ============================================ */

.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-noreviews,
ul.woocommerce-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  background-color: var(--wp--preset--color--ice);
  border: 1px solid var(--wp--preset--color--border);
  border-left: 3px solid var(--wp--preset--color--marine);
  border-radius: var(--wp--custom--radius--sm);
  color: var(--wp--preset--color--ink);
  list-style: none;
}

.woocommerce-message {
  border-left-color: var(--wp--preset--color--mint);
  background-color: var(--wp--custom--color--mint-alpha-10);
}

.woocommerce-error,
ul.woocommerce-error {
  border-left-color: var(--wp--custom--color--error);
  background-color: var(--wp--custom--color--error-alpha-8);
  color: var(--wp--custom--color--error-dark);
}

/* Replace WooCommerce's icon-font pseudo-element with a CSS-only badge,
   matched to the notice tone. */
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  font-family: var(--wp--preset--font-family--outfit);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
  color: var(--wp--preset--color--surface);
  background: var(--wp--preset--color--marine);
  border-radius: 50%;
  margin: 0;
  padding: 0;
  top: auto;
  left: auto;
}

.woocommerce-info::before { content: "i"; }
.woocommerce-message::before { content: "\2713"; background: var(--wp--preset--color--mint); }
.woocommerce-error::before { content: "!"; background: var(--wp--custom--color--error); }

.woocommerce-info a,
.woocommerce-message a,
.woocommerce-error a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.woocommerce-info .button,
.woocommerce-message .button {
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================
   Addresses
   --------------------------------------------
   Defaults from WooCommerce float `.col-1`/`.col-2` at 48% width with
   higher specificity than our class selectors, which fights the grid.
   Match Woo's specificity by prefixing with `.woocommerce-account` and
   explicitly reset float + width on the address columns.
   ============================================ */

.woocommerce-account .woocommerce-Addresses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1rem 0 0;

  &::before,
  &::after { content: none; }
}

@media (min-width: 768px) {
  .woocommerce-account .woocommerce-Addresses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.woocommerce-account .woocommerce-Address {
  float: none;
  width: 100%;
  margin: 0;
  background: var(--wp--preset--color--ice);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--md);
  padding: 1.25rem 1.25rem 1.5rem;
  box-sizing: border-box;
  transition: border-color var(--wp--custom--transition--fast), box-shadow var(--wp--custom--transition--fast);

  &:hover {
    border-color: var(--wp--preset--color--marine);
    box-shadow: 0 4px 12px var(--wp--custom--color--marine-alpha-6);
  }

  & > header.title,
  & .woocommerce-Address-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  & .woocommerce-Address-title h3 {
    margin: 0;
    font-size: 1.0625rem;
  }

  & .woocommerce-Address-title .edit {
    float: none;
    font-family: var(--wp--preset--font-family--outfit);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wp--preset--color--marine);
    text-decoration: none;
    white-space: nowrap;
  }

  & .woocommerce-Address-title .edit:hover {
    color: var(--wp--preset--color--mint);
  }

  & address {
    font-style: normal;
    line-height: 1.6;
    color: var(--wp--preset--color--text-muted);
    margin: 0;
  }
}

/* Inherit the same column-reset for the legacy .col-1/.col-2 markup that
   WooCommerce still emits on the addresses page. */
.woocommerce-account .woocommerce-Addresses .col-1,
.woocommerce-account .woocommerce-Addresses .col-2 {
  float: none;
  width: 100%;
  margin: 0;
}

/* ============================================
   Forms — inputs, labels, fieldsets
   --------------------------------------------
   Style matches the Contact Form 7 inputs in custom.css so the whole site
   feels consistent. Applies on every Woo form (account, checkout, login).
   ============================================ */

.woocommerce form .form-row,
.woocommerce-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0 0 1.25rem;
  padding: 0;
}

/* Two-column rows (used by checkout + edit-address) on sm+ */
@media (min-width: 576px) {
  .woocommerce form .form-row-first,
  .woocommerce-form-row.form-row-first,
  .woocommerce form .form-row-last,
  .woocommerce-form-row.form-row-last {
    display: inline-flex;
    width: calc(50% - 0.625rem);
    vertical-align: top;
    float: none;
  }

  .woocommerce form .form-row-first,
  .woocommerce-form-row.form-row-first {
    margin-right: 1.25rem;
  }
}

.woocommerce form .form-row label,
.woocommerce-form-row label {
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wp--preset--color--marine);
}

.woocommerce form .form-row .required,
.woocommerce-form-row .required {
  color: var(--wp--preset--color--mint);
  text-decoration: none;
  margin-left: 0.125rem;
}

.woocommerce form .form-row .optional,
.woocommerce-form-row .optional {
  color: var(--wp--preset--color--text-muted);
  font-weight: 500;
}

.woocommerce form em {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--wp--preset--color--text-muted);
  margin-top: 0.25rem;
}

.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="tel"],
.woocommerce form input[type="password"],
.woocommerce form input[type="number"],
.woocommerce form input[type="url"],
.woocommerce form input[type="search"],
.woocommerce form select,
.woocommerce form textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.875rem;
  font: inherit;
  font-size: 1rem;
  color: var(--wp--preset--color--ink);
  background-color: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--sm);
  box-shadow: var(--wp--custom--shadow--xs);
  transition: border-color var(--wp--custom--transition--fast), box-shadow var(--wp--custom--transition--fast);
}

.woocommerce form textarea {
  min-height: 8rem;
  resize: vertical;
}

.woocommerce form input::placeholder,
.woocommerce form textarea::placeholder {
  color: var(--wp--preset--color--text-muted);
  opacity: 1;
}

.woocommerce form input:hover,
.woocommerce form select:hover,
.woocommerce form textarea:hover {
  border-color: var(--wp--custom--color--disabled);
}

.woocommerce form input:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--marine);
  box-shadow: var(--wp--custom--shadow--focus);
}

/* Show-password toggle inside password inputs */
.woocommerce form .password-input {
  display: block;
  width: 100%;
  position: relative;
}

.woocommerce form .show-password-input {
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wp--preset--color--text-muted);
}

.woocommerce form .show-password-input:hover,
.woocommerce form .show-password-input.display-password {
  color: var(--wp--preset--color--marine);
}

/* Password-change fieldset on the edit-account screen */
.woocommerce form fieldset {
  margin: 1.25rem 0 0;
  padding: 1.25rem;
  background-color: var(--wp--preset--color--ice);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--md);
}

.woocommerce form fieldset legend {
  padding: 0 0.5rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--marine);
}

/* ============================================
   Buttons (.button — WooCommerce's own class, distinct from wp-block-button)
   ============================================ */

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.woocommerce-MyAccount-content .button {
  appearance: none;
  display: inline-block;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--wp--preset--color--surface);
  background-color: var(--wp--preset--color--marine);
  border: 1px solid var(--wp--preset--color--marine);
  border-radius: var(--wp--custom--radius--sm);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--wp--custom--transition--base), border-color var(--wp--custom--transition--base), transform var(--wp--custom--transition--base), box-shadow var(--wp--custom--transition--base);
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
  background-color: var(--wp--preset--color--marine-light);
  border-color: var(--wp--preset--color--marine-light);
  color: var(--wp--preset--color--surface);
  transform: translateY(-1px);
  box-shadow: var(--wp--custom--shadow--md);
}

.woocommerce .button:active,
.woocommerce button.button:active,
.woocommerce input.button:active,
.woocommerce a.button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--wp--custom--shadow--xs-strong);
}

.woocommerce .button[disabled],
.woocommerce button.button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================
   Tables — orders, downloads, payment methods
   ============================================ */

.woocommerce table.shop_table,
.woocommerce table.woocommerce-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0.5rem 0 1.5rem;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--md);
  overflow: hidden;
}

.woocommerce table.shop_table th {
  background-color: var(--wp--preset--color--ice);
  font-family: var(--wp--preset--font-family--outfit);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wp--preset--color--marine);
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--wp--preset--color--border);
}

.woocommerce table.shop_table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--wp--preset--color--border);
  font-size: 0.9375rem;
  vertical-align: middle;
}

.woocommerce table.shop_table tbody tr:last-child td {
  border-bottom: none;
}

.woocommerce table.shop_table tbody tr:hover td {
  background-color: var(--wp--custom--color--ice-alpha-60);
}

.woocommerce table.shop_table .button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  margin-right: 0.25rem;
}

.woocommerce table.shop_table .button:last-child {
  margin-right: 0;
}

/* Mobile — flip tables to stacked cards (uses Woo's data-title attribute) */
@media (max-width: 767.98px) {
  .woocommerce table.shop_table {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .woocommerce table.shop_table thead {
    display: none;
  }

  .woocommerce table.shop_table tbody,
  .woocommerce table.shop_table tr {
    display: block;
  }

  .woocommerce table.shop_table tr {
    margin-bottom: 1rem;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--radius--md);
    overflow: hidden;
  }

  .woocommerce table.shop_table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.625rem 1rem;
    text-align: right;
  }

  .woocommerce table.shop_table td::before {
    content: attr(data-title);
    font-family: var(--wp--preset--font-family--outfit);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp--preset--color--marine);
    text-align: left;
  }

  .woocommerce table.shop_table tr:last-child td:last-child {
    border-bottom: none;
  }
}

/* ============================================
   Pagination (orders list)
   ============================================ */

.woocommerce-pagination {
  margin: 1.5rem 0 0;
}

.woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
}

.woocommerce-pagination ul.page-numbers li {
  border: none;
  margin: 0;
}

.woocommerce-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: var(--wp--custom--radius--sm);
  font-family: var(--wp--preset--font-family--outfit);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--marine);
  background: var(--wp--preset--color--ice);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast), border-color var(--wp--custom--transition--fast);
}

.woocommerce-pagination .page-numbers:hover {
  border-color: var(--wp--preset--color--marine);
}

.woocommerce-pagination .page-numbers.current {
  background: var(--wp--preset--color--marine);
  color: var(--wp--preset--color--surface);
}

/* ============================================
   Login / Register (logged-out my-account screen)
   --------------------------------------------
   Two layouts:
   • Login only (registration disabled): single centered card.
   • Login + Register (#customer_login.u-columns): side-by-side cards
     on md+, stacked below.
   ============================================ */

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--radius--lg);
  padding: 2rem;
  box-shadow: var(--wp--custom--shadow--sm);
}

@media (max-width: 575.98px) {
  .woocommerce-account .woocommerce-form-login,
  .woocommerce-account .woocommerce-form-register {
    padding: 1.5rem 1.25rem;
  }
}

/* Login-only card (no register column) is centered and bounded. */
.woocommerce-account .woocommerce > .woocommerce-form-login {
  max-width: 480px;
  margin: 0 auto;
}

.woocommerce-account .woocommerce > h2 {
  max-width: 480px;
  margin: 0 auto 1rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: left;
}

/* Two-column variant when registration is enabled. */
.woocommerce-account #customer_login.u-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0;
}

.woocommerce-account #customer_login.u-columns::before,
.woocommerce-account #customer_login.u-columns::after {
  content: none;
}

.woocommerce-account #customer_login.u-columns .u-column1,
.woocommerce-account #customer_login.u-columns .u-column2 {
  width: 100%;
  float: none;
  margin: 0;
}

@media (min-width: 768px) {
  .woocommerce-account #customer_login.u-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.woocommerce-account #customer_login h2 {
  margin: 0 0 1rem;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: left;
}

/* "Remember me" + "Lost your password?" rows sit just below the inputs. */
.woocommerce-form-login__rememberme {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--ink);
}

.woocommerce-form-login__rememberme input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--wp--preset--color--marine);
}

.woocommerce-LostPassword {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}

.woocommerce-LostPassword a {
  color: var(--wp--preset--color--marine);
  text-decoration: underline;
}

.woocommerce-LostPassword a:hover {
  color: var(--wp--preset--color--mint);
}

/* ============================================
   Cart / Checkout block buttons
   --------------------------------------------
   WooCommerce Blocks (Cart/Checkout) inherit a much larger button
   font-size from their own block stylesheet, which causes "Bekijk mijn
   winkelwagen" / "Naar afrekenen" to wrap onto two lines. Normalise the
   sizing and inherit the rest from the global button look.
   ============================================ */

.wc-block-cart .wp-block-button .wp-block-button__link,
.wc-block-cart .wp-element-button,
.wc-block-checkout .wp-block-button .wp-block-button__link,
.wc-block-checkout .wp-element-button,
.wc-block-components-button {
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.75rem 1.25rem;
  border-radius: var(--wp--custom--radius--sm);
  white-space: normal;
}

/* The two side-by-side actions in the cart sidebar — keep them readable
   without wrapping at common widths. */
.wc-block-cart__submit-container,
.wp-block-woocommerce-proceed-to-checkout-block {
  display: flex;
  align-items: stretch;
}

.wc-block-cart__submit-container .wp-element-button,
.wc-block-cart__submit-container .wc-block-cart__submit-button,
.wp-block-woocommerce-proceed-to-checkout-block .wp-element-button {
  width: 100%;
}

/* ============================================
   Single product — "Bekijk winkelmand" link after add-to-cart
   --------------------------------------------
   By default the .added_to_cart anchor sits below the button with a
   large gap (often because it's emitted outside .cart and inherits block
   gap). Pull it tight against the button and align style with the link
   role it plays.
   ============================================ */

.woocommerce a.added_to_cart {
  display: inline-block;
  margin: 0.75rem 0 0;
  padding: 0.375rem 0;
  font-family: var(--wp--preset--font-family--outfit);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--wp--preset--color--marine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.woocommerce a.added_to_cart:hover {
  color: var(--wp--preset--color--mint);
}

/* Strip the block gap that WordPress inserts between the add-to-cart
   form and the trailing .added_to_cart link on single product pages. */
.woocommerce div.product form.cart + .added_to_cart,
.woocommerce form.cart + .added_to_cart {
  margin-top: 0.5rem !important;
}

