/* Musthaves by Kell — WooCommerce overrides
   Restyles WooCommerce's native markup (shop loop, single product, cart, checkout,
   my-account) to match the design system, without touching plugin-added hooks
   (Extra Product Options, PostNL, Mollie, PDF Invoices, etc. all keep working). */

/* ---------- Shared ---------- */
.woocommerce { font-family: var(--font-sans-body); color: var(--text-body); }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit {
  font-family: var(--font-sans-body); font-weight: var(--weight-medium); letter-spacing: var(--tracking-wide);
  border: 1px solid var(--accent-primary); border-radius: var(--radius-pill); cursor: pointer;
  background: var(--accent-primary) !important; color: var(--color-cream) !important;
  padding: 12px 26px; font-size: var(--text-body-sm);
  transition: background var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background: var(--accent-primary-hover) !important; border-color: var(--accent-primary-hover); color: var(--color-cream) !important;
}
.woocommerce a.button:active, .woocommerce button.button:active { transform: scale(0.97); }
.woocommerce a.button.alt, .woocommerce #respond input#submit.alt, .woocommerce button.button.alt {
  background: var(--accent-inverse) !important; border-color: var(--accent-inverse);
}
.woocommerce a.button.alt:hover { background: var(--accent-inverse-hover) !important; border-color: var(--accent-inverse-hover); }
.woocommerce a.button.loading::after, .woocommerce button.button.loading::after { border-color: var(--color-cream); }

.woocommerce .star-rating { color: var(--accent-primary); }
.woocommerce span.onsale {
  background: var(--accent-inverse); color: var(--color-cream); border-radius: var(--radius-pill);
  font-family: var(--font-sans-body); font-size: var(--text-body-xs); font-weight: 500;
  min-height: 0; min-width: 0; padding: 4px 12px; line-height: 1.6; top: 12px; left: 12px;
}

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
  background: var(--color-taupe-pale); border-top-color: var(--accent-primary); color: var(--text-heading);
  border-radius: var(--radius-md); font-family: var(--font-sans-body);
  padding-left: 44px !important;
}
/* WooCommerce renders these icons from its own bundled icon font (a private-use
   codepoint via ::before). If that font ever fails to load the glyph falls back
   to a visible "tofu" box — happened on the order-received page. Overriding the
   font-family + content sidesteps the icon font entirely with a plain checkmark
   that always renders. */
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-noreviews::before {
  font-family: inherit !important; content: "\2713" !important;
  color: var(--color-cream); background: var(--accent-primary);
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; top: 50%; left: 14px; transform: translateY(-50%);
}
.woocommerce-error { background: #F4E6E1; border-top-color: var(--state-error); }
.woocommerce-error::before {
  font-family: inherit !important; content: "\0021" !important;
  color: var(--color-cream); background: var(--state-error);
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; top: 50%; left: 14px; transform: translateY(-50%);
}

/* ---------- Shop / archive ---------- */
.mbk-shop-hero { background: var(--bg-surface-muted); padding: 28px 16px 22px; border-bottom: 1px solid var(--border-subtle); margin-top: -16px; }
.mbk-shop-hero__title { font-size: var(--text-display-lg); margin: 12px 0 8px; }
.mbk-shop-hero__desc { font-size: var(--text-body-md); color: var(--text-muted); max-width: 560px; }

.mbk-shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 8px; }
.mbk-shop-toolbar__count { font-size: var(--text-body-xs); color: var(--text-muted); }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none; }
@media (min-width: 860px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .woocommerce ul.products { grid-template-columns: repeat(4, 1fr); } }
.woocommerce ul.products li.product { width: 100%; margin: 0; float: none; text-align: left; }
.woocommerce ul.products li.product a { text-decoration: none; color: inherit; }
.woocommerce ul.products li.product img {
  border-radius: var(--radius-lg); aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 14px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-sans-body); font-size: var(--text-body-md); color: var(--text-heading);
  font-weight: 400; margin-bottom: 6px;
}
.woocommerce ul.products li.product .price {
  font-family: var(--font-sans-body); font-size: var(--text-body-md); color: var(--text-accent);
}
.woocommerce ul.products li.product .price del { color: var(--text-faint); font-size: var(--text-body-sm); opacity: 1; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .button {
  margin-top: 10px; width: 100%; padding: 10px 16px; font-size: var(--text-body-xs);
}

/*
 * Cross-sells (cart page) share their column with the cart totals box
 * instead of getting the shop grid's full page width, so the generic
 * up-to-4-column rule above (sized for viewport width, not the actual
 * container) squeezed each card down to a sliver — titles wrapped one
 * word per line and badges got clipped to a couple of letters. Give this
 * specific context its own, much narrower column count.
 */
.cross-sells ul.products {
  grid-template-columns: repeat(2, 1fr) !important;
}
@media (max-width: 480px) {
  .cross-sells ul.products { grid-template-columns: 1fr !important; }
}

.mbk-shop-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 12px 0 56px; }
.mbk-shop-layout__sidebar { display: none; width: 220px; }
@media (min-width: 860px) { .mbk-shop-layout { grid-template-columns: 220px 1fr; } .mbk-shop-layout__sidebar { display: block; } }

.mbk-filter-group { margin-bottom: 24px; }
.mbk-filter-group__title { font-size: var(--text-body-sm); font-weight: 600; color: var(--text-heading); margin-bottom: 10px; }
.mbk-filter-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mbk-filter-group a { color: var(--text-body); text-decoration: none; font-size: var(--text-body-sm); }
.mbk-filter-group a:hover, .mbk-filter-group a.is-active { color: var(--accent-primary); }

.woocommerce-ordering select {
  font: inherit; font-size: var(--text-body-sm); color: var(--text-body); background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 10px 34px 10px 12px;
}
.woocommerce nav.woocommerce-pagination { text-align: center; margin-top: 8px; }
.woocommerce nav.woocommerce-pagination ul { border: none; display: inline-flex; gap: 6px; }
.woocommerce nav.woocommerce-pagination ul li { border: none; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); color: var(--text-heading); padding: 8px 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--accent-primary); color: var(--color-cream); border-color: var(--accent-primary); }

/* ---------- Single product ---------- */
.woocommerce-breadcrumb {
  font-size: var(--text-body-xs); color: var(--text-muted); padding: 0 0 16px;
}
.woocommerce-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--text-heading); }

.woocommerce div.product {
  display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px;
  max-width: 100%; overflow-x: hidden;
}
@media (min-width: 860px) { .woocommerce div.product { grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: start; } }
.woocommerce div.product div.images,
.woocommerce div.product div.summary { width: auto; float: none; min-width: 0; }
/*
 * Some product descriptions (short description / variation description)
 * contain hand-authored HTML with the occasional stray unclosed tag or
 * long unbroken string. That shouldn't be able to force the whole product
 * page wider than the screen, so wrap defensively here rather than relying
 * on every product's copy being well-formed.
 */
.woocommerce div.product .summary * { max-width: 100%; overflow-wrap: break-word; }

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-surface-muted); }
.woocommerce div.product div.images img { border-radius: var(--radius-lg); }
.woocommerce div.product .flex-control-thumbs { display: flex; gap: 8px; margin-top: 10px; list-style: none; padding: 0; }
.woocommerce div.product .flex-control-thumbs li { width: 60px; }
.woocommerce div.product .flex-control-thumbs li img {
  border-radius: var(--radius-md); border: 1px solid var(--border-subtle); opacity: 1; cursor: pointer;
}
.woocommerce div.product .flex-control-thumbs li img.flex-active { border: 2px solid var(--accent-primary); }

.woocommerce div.product .product_title { font-size: var(--text-display-lg); margin: 12px 0 6px; }
.woocommerce div.product p.price, .woocommerce div.product span.price {
  font-family: var(--font-serif-display); font-size: var(--text-display-md); color: var(--text-heading);
}
.woocommerce div.product p.price del, .woocommerce div.product span.price del {
  font-size: var(--text-body-sm); color: var(--text-muted); font-family: var(--font-sans-body); opacity: 1;
}
.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: var(--text-body-md); color: var(--text-muted); line-height: var(--leading-relaxed); margin-bottom: 24px;
}
.woocommerce div.product .mbk-trust-row { margin-top: 20px; }

/*
 * WooCommerce shows a selected variation's own "description" field (if a
 * product has one filled in) right under the variation dropdowns — on this
 * store that field was filled with the same shipping/review bullets as the
 * product's short description above, so selecting any variation duplicated
 * that whole block. Hiding it keeps the (already-shown) short description
 * as the single source for that copy; per-variation descriptions were only
 * ever used here as a copy of the short description, not for size/variant-
 * specific notes.
 */
.woocommerce div.product .woocommerce-variation-description { display: none; }

.woocommerce-tabs .wc-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--border-subtle); list-style: none; padding: 0; margin: 0 0 0; }
.woocommerce-tabs .wc-tabs li { border: none; background: none; margin: 0; padding: 0; border-bottom: 1px solid var(--border-subtle); }
.woocommerce-tabs .wc-tabs li a {
  display: flex; justify-content: space-between; padding: 18px 0; font-family: var(--font-sans-body);
  font-size: var(--text-body-md); color: var(--text-heading); text-decoration: none;
}
.woocommerce-tabs .panel { border: none; padding: 0 0 18px; font-size: var(--text-body-sm); color: var(--text-muted); line-height: var(--leading-relaxed); }
.woocommerce-tabs { padding-bottom: 40px; }

.woocommerce div.product form.cart { margin-bottom: 0; }
.woocommerce div.product form.cart .quantity { display: inline-flex; align-items: center; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); margin-right: 12px; }
.woocommerce div.product form.cart .quantity input.qty {
  border: none; width: 44px; text-align: center; font: inherit; background: none; padding: 12px 0;
}

/*
 * Extra Product Options (ThemeComplete) renders its personalisation fields
 * (name input, dropdowns, radio/checkbox choices, swatches, uploads) inside
 * form.cart using plain HTML form elements plus its own wrapper classes.
 * We deliberately don't touch its hooks/markup, but re-skin the generic
 * elements here so whatever it outputs still looks native to the theme.
 * Swatch/image-choice variants may still need a follow-up pass once we can
 * see the plugin's actual rendered markup on the live site.
 */
.woocommerce div.product form.cart {
  font-family: var(--font-sans-body); color: var(--text-body);
}
.woocommerce div.product form.cart label {
  font-size: var(--text-body-xs); letter-spacing: var(--tracking-wide); color: var(--text-muted);
  display: block; margin-bottom: 6px;
}
.woocommerce div.product form.cart input[type="text"],
.woocommerce div.product form.cart input[type="number"],
.woocommerce div.product form.cart input[type="email"],
.woocommerce div.product form.cart input[type="tel"],
.woocommerce div.product form.cart input[type="date"],
.woocommerce div.product form.cart select,
.woocommerce div.product form.cart textarea {
  font: inherit; font-size: var(--text-body-md); color: var(--text-body); background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 12px 14px;
  width: 100%; max-width: 100%; outline: none;
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.woocommerce div.product form.cart input[type="text"]:focus,
.woocommerce div.product form.cart input[type="number"]:focus,
.woocommerce div.product form.cart select:focus,
.woocommerce div.product form.cart textarea:focus {
  border-color: var(--border-default); box-shadow: 0 0 0 3px var(--color-taupe-pale);
}
.woocommerce div.product form.cart input[type="checkbox"],
.woocommerce div.product form.cart input[type="radio"] {
  accent-color: var(--accent-primary); width: 18px; height: 18px; margin-right: 8px; vertical-align: middle;
}
.woocommerce div.product form.cart fieldset {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px; margin: 0 0 16px;
}
.woocommerce div.product form.cart > div,
.woocommerce div.product form.cart .tc-options-wrapper,
.woocommerce div.product form.cart .tm-epo-field-wrap {
  margin-bottom: 16px;
}
.woocommerce div.product form.cart .description,
.woocommerce div.product form.cart small {
  font-size: var(--text-body-xs); color: var(--text-faint);
}
.woocommerce div.product form.cart .reset_variations,
.woocommerce div.product form.cart a.reset_variations {
  font-size: var(--text-body-xs); color: var(--text-muted); text-decoration: underline;
}
.woocommerce div.product form.cart .tm-epo-required {
  color: var(--accent-primary); margin-right: 2px;
}

.mbk-sticky-cta {
  position: sticky; bottom: 0; z-index: 20; background: var(--bg-page); border-top: 1px solid var(--border-subtle);
  padding: 12px 16px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-md);
}
@media (min-width: 860px) { .mbk-sticky-cta { display: none; } }

/* ---------- Cart / checkout (native shortcode markup) ---------- */
.woocommerce table.shop_table { border: none; border-radius: var(--radius-md); }
.woocommerce table.shop_table th { font-family: var(--font-sans-body); font-weight: 600; color: var(--text-heading); border-bottom: 1px solid var(--border-subtle); }
.woocommerce table.shop_table td { border-top: 1px solid var(--border-subtle); font-family: var(--font-sans-body); }
.woocommerce table.shop_table td.product-name a { color: var(--text-heading); text-decoration: none; }
.woocommerce table.shop_table td img { border-radius: var(--radius-md); }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
  background: var(--bg-surface-muted); border-radius: var(--radius-lg); padding: 20px; float: none; width: auto;
}
.woocommerce-cart .cart-collaterals { display: grid; gap: 24px; }
@media (min-width: 860px) { .woocommerce-cart .cart-collaterals { grid-template-columns: 1fr 0.85fr; } }
.woocommerce-cart .cart-collaterals > .cross-sells { width: auto !important; float: none !important; }
.woocommerce-cart table.cart td.actions .coupon .input-text {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit;
}

/*
 * Classic checkout markup (form-checkout.php) has no wrapping element around
 * #customer_details and #order_review — they're direct siblings inside
 * form.checkout, and plugins can add further siblings of their own (address
 * validation notices, extra fields). Defaulting every unrecognised child to
 * grid-column: 1 / -1 (full width) is the safe choice — only the known
 * order-summary pieces get pulled into the narrower right-hand column,
 * so anything unfamiliar spans the whole width instead of getting squeezed
 * into a half-width column it was never designed to fit.
 */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 860px) {
  .woocommerce-checkout .col2-set { grid-template-columns: 1fr 1fr; }
  .woocommerce-checkout .col2-set > * { grid-column: 1 / -1; }
  .woocommerce-checkout .col2-set > .col-1 { grid-column: 1; }
  .woocommerce-checkout .col2-set > .col-2 { grid-column: 2; }

  .woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 16px 40px;
    align-items: start;
  }
  .woocommerce-checkout form.checkout > * { grid-column: 1 / -1; }
  .woocommerce-checkout form.checkout > #customer_details {
    grid-column: 1;
    grid-row: 1 / -1;
  }
  .woocommerce-checkout form.checkout > #order_review_heading,
  .woocommerce-checkout form.checkout > #order_review,
  .woocommerce-checkout form.checkout > .mbk-freeship {
    grid-column: 2;
  }
  .woocommerce-checkout form.checkout > #order_review {
    position: sticky;
    top: 24px;
  }
}
/*
 * WooCommerce's own bundled stylesheet is never dequeued (kept intentionally,
 * so plugins that expect it keep working) — but it still applies its classic
 * float-based 2-column layout to these exact elements (roughly width: 48%;
 * float: left/right). Turning the *containers* into CSS Grid stops the
 * float positioning, but that leftover width doesn't get overridden just by
 * that — each child still only fills part of the grid cell we gave it,
 * which is what made the checkout's billing columns and order-summary box
 * look narrow/oddly placed instead of filling their assigned column.
 */
.woocommerce-checkout .col2-set > .col-1,
.woocommerce-checkout .col2-set > .col-2,
.woocommerce-checkout form.checkout > #order_review_heading,
.woocommerce-checkout form.checkout > #order_review {
  width: auto !important;
  float: none !important;
  clear: none !important;
  margin-right: 0 !important;
}
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 12px 14px; font: inherit;
  background: var(--bg-surface); width: 100%;
}
.woocommerce form .form-row label { font-size: var(--text-body-xs); letter-spacing: var(--tracking-wide); color: var(--text-muted); }
#order_review, .woocommerce-checkout-review-order {
  background: var(--bg-surface-muted); border-radius: var(--radius-lg); padding: 20px;
}
.woocommerce ul.wc_payment_methods { list-style: none; margin: 0; padding: 0; }
.woocommerce ul.payment_methods li {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
}
.woocommerce #payment ul.payment_methods { border: none; padding: 0; }

/* ---------- Order received / thank-you page ---------- */
/* A separate custom snippet (not part of this theme) injects a congratulatory
   heading with a "wachtmuziekje" link directly before the checkout shortcode
   output on this page. It reuses our --text-display-lg token, which is sized
   for a short title, not a full sentence — scope it down here instead of
   touching that snippet. */
main#main > h1:has(+ div .woocommerce-order) {
  font-size: var(--text-display-sm) !important;
  line-height: 1.35; font-family: var(--font-serif-display); font-weight: var(--weight-medium);
  color: var(--text-heading); margin-bottom: 24px !important;
}
main#main > h1:has(+ div .woocommerce-order) h2 {
  font-size: var(--text-body-lg); font-family: var(--font-sans-body); font-weight: var(--weight-medium);
  color: var(--text-muted); margin: 10px 0 0;
}
main#main > h1:has(+ div .woocommerce-order) br { display: none; }
main#main > h1:has(+ div .woocommerce-order) a { color: var(--accent-primary); }

.woocommerce-order { max-width: 720px; margin: 0 auto; }
.woocommerce-order-overview {
  list-style: none; display: flex; flex-wrap: wrap; gap: 16px 32px;
  margin: 0 0 24px; padding: 20px 24px; background: var(--bg-surface-muted);
  border-radius: var(--radius-lg);
}
.woocommerce-order-overview__order, .woocommerce-order-overview__date,
.woocommerce-order-overview__total, .woocommerce-order-overview__payment-method {
  font-size: var(--text-body-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.woocommerce-order-overview strong { display: block; margin-top: 2px; font-size: var(--text-body-md); color: var(--text-heading); text-transform: none; letter-spacing: normal; }
.woocommerce-order-details, .woocommerce-customer-details { margin-top: 32px; }
.woocommerce-order-details__title, .woocommerce-column__title {
  font-family: var(--font-serif-display); font-size: var(--text-display-sm); font-weight: var(--weight-medium);
  color: var(--text-heading); margin: 0 0 16px;
}
.woocommerce-table--order-details tfoot th, .woocommerce-table--order-details tfoot td { font-family: var(--font-sans-body); }
.woocommerce-order-details .order-actions-button { margin-top: 4px; }

/* ---------- My account ---------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block; padding: 10px 14px; border-radius: var(--radius-md); color: var(--text-body); text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--color-taupe-pale); color: var(--text-heading); }
.woocommerce-account .woocommerce-MyAccount-content table.shop_table { width: 100%; }
.woocommerce-account .addresses .title .edit { color: var(--accent-primary); }

.woocommerce-form-login, .woocommerce-form-register { max-width: 400px; margin: 0 auto; }
.woocommerce-form-login .form-row, .woocommerce-form-register .form-row { margin-bottom: 14px; }
