html, body { max-width: 100%; overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #f3b21a !important; outline-offset: 3px; }
:where(button, .button, .btn, input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 44px; }
.sp-filter-bar, .sp-filter-row { min-width: 0; }
.sp-filter-row--sort { align-items: center; margin-top: 12px; }
.sp-home-sort { width: min(100%, 280px); min-height: 46px; padding: 9px 38px 9px 13px; border: 1px solid #cfd4df; border-radius: 8px; background-color: #fff; color: #20263a; font: inherit; cursor: pointer; }
.sp-active-filter { display: flex; align-items: center; margin-left: auto; }
.sp-clear-filters { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; }
.sp-pagination, .sp-pagination ul { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; }
.sp-pagination ul { padding: 0; list-style: none; }
.sp-pagination a, .sp-pagination span { display: grid; min-width: 44px; min-height: 44px; place-items: center; }
.woocommerce ul.products li.product, .sp-products-grid > li { min-width: 0; }
.woocommerce ul.products li.product, .sp-products-grid > li.product { cursor: pointer; }
.woocommerce ul.products li.product :where(a, button, input, select, textarea, label),
.sp-products-grid > li.product :where(a, button, input, select, textarea, label) { cursor: auto; }
.woocommerce ul.products li.product a,
.woocommerce ul.products li.product button,
.sp-products-grid > li.product a,
.sp-products-grid > li.product button { cursor: pointer; }
.woocommerce ul.products li.product img, .sp-products-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.woocommerce ul.products li.product .price, .product-price, .sp-card-total { display: block; max-width: 100%; overflow-wrap: anywhere; line-height: 1.25; }
.sp-tagline { color: #5b6270 !important; font-size: .78rem; font-weight: 500 !important; text-transform: uppercase; letter-spacing: .035em; }
.woocommerce-loop-product__title { color: #1f3a8a !important; font-weight: 700 !important; }
.sp-title-grammages, .sp-grams { color: #5b6270 !important; font-weight: 400; }
.sp-card-mobile-price { display: none; }
.sp-card-mobile-price { gap: 3px; margin-top: 13px; }
.sp-card-mobile-price__range { color: var(--brand-red, #d92d20); font-size: clamp(18px, 5.4vw, 23px); font-weight: 800; line-height: 1.18; }
.sp-card-mobile-price__range .woocommerce-Price-amount { color: inherit; }
.sp-card-mobile-price small { color: #626a7e; font-size: 11px; line-height: 1.35; }
.sp-home-calculator, .sp-home-calculator p, .sp-home-calculator label { color: #20263a; }
.sp-home-calculator__result { color: #11182d; background: #fff; }
.sp-home-calculator__result .sp-calc-result-stat { gap: 3px; padding: clamp(18px, 3vw, 28px); }
.sp-home-calculator__result .sp-calc-result-stat small { margin-bottom: 7px; color: #626a7e; font-size: 12px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.sp-home-calculator__result .sp-calc-result-stat strong { display: flex; align-items: baseline; gap: 7px; color: #252d78; font-size: clamp(20px, 2.3vw, 29px); line-height: 1.08; }
.sp-home-calculator__result .sp-calc-result-stat strong b { color: var(--brand-red, #d92d20); font-size: clamp(42px, 5vw, 64px); line-height: .95; letter-spacing: -.045em; }
.sp-home-calculator__result .sp-calc-result-stat span { color: #535b70; font-size: 14px; }
.sp-home-calculator__result .sp-calc-result-stat--total { background: #fff8f7; }
.sp-home-calculator__cut-info { display: grid; gap: 8px; margin-top: 14px; }
.sp-home-calculator__cut-benefit { display: flex; min-height: 44px; align-items: center; gap: 9px; margin: 0 !important; padding: 11px 14px; border: 1px solid #bfe5cd; border-radius: 9px; background: #effaf3; color: #176b3a !important; font-size: 14px !important; }
.sp-home-calculator__cut-benefit > span { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; background: #d9f3e2; font-weight: 800; }
.sp-home-calculator__minimum { margin: 0 !important; padding: 11px 14px; border-left: 3px solid #9ba3b7; background: #f6f7fa; color: #535b70 !important; font-size: 13px !important; }
.sp-home-calculator__minimum strong { color: #30384d; }
.sp-custom-cut-fields > .sp-custom-cut-limits,
.sp-custom-cut-fields > .sp-custom-cut-explanation,
.sp-custom-cut-fields > .sp-whole-sheet-notice { display: none; }
.sp-custom-cut-highlights { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.sp-custom-cut-highlights li { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #dfe3ec; border-radius: 8px; background: #f7f8fb; color: #30384d; font-size: 13px; line-height: 1.3; }
.sp-custom-cut-highlights li > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: #e8ebf7; color: var(--brand-blue, #303b91); font-size: 11px; font-weight: 800; }
.sp-custom-cut-highlights li.is-benefit { border-color: #bfe5cd; background: #effaf3; color: #176b3a; }
.sp-custom-cut-highlights li.is-benefit > span { background: #d9f3e2; color: #176b3a; }
.sp-custom-cut-details { margin-top: 10px; border: 1px solid #dfe3ec; border-radius: 8px; background: #fff; overflow: hidden; }
.sp-custom-cut-details summary { position: relative; min-height: 46px; padding: 12px 42px 12px 13px; color: var(--brand-blue, #303b91); font-size: 13px; font-weight: 800; line-height: 1.35; cursor: pointer; list-style: none; }
.sp-custom-cut-details summary::-webkit-details-marker { display: none; }
.sp-custom-cut-details summary::after { content: "+"; position: absolute; top: 50%; right: 14px; color: var(--brand-blue, #303b91); font-size: 21px; font-weight: 500; transform: translateY(-50%); }
.sp-custom-cut-details[open] summary::after { content: "−"; }
.sp-custom-cut-details[open] summary { border-bottom: 1px solid #e5e8ef; }
.sp-custom-cut-details__content { padding: 5px 14px 13px; }
.sp-custom-cut-details__content p { margin: 10px 0 0; color: #5b6270; font-size: 13px; line-height: 1.55; }
.sp-custom-cut-details__content strong { color: #30384d; }
.sp-ready-only { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 13px; border: 1px solid #d9deeb; border-radius: 9px; background: #f7f8fb; }
.sp-ready-only > span { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; background: #e8ebf7; color: var(--brand-blue, #303b91); font-weight: 800; }
.sp-ready-only p { margin: 0; }
.sp-ready-only strong { display: block; color: var(--brand-blue, #303b91); font-size: 14px; }
.sp-ready-only small { display: block; margin-top: 2px; color: #626a7e; font-size: 12px; line-height: 1.35; }
.sp-card-ready-only { display: block; margin-top: 9px; color: #626a7e; font-size: 11px; font-weight: 650; line-height: 1.35; }
.sp-card-ready-only > span { color: var(--brand-blue, #303b91); }

/* Category, shop and home grids share the exact same card partial. */
.sp-catalog-page .sp-products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sp-catalog-page .sp-products-grid > li.product { width: auto !important; margin: 0 !important; }
.sp-card-purchase--lightweight .sp-card-options,
.sp-card-purchase--lightweight .sp-card-buy-row,
.sp-card-purchase--lightweight .sp-card-add-button { display: none !important; }
.sp-card-purchase--lightweight .sp-mobile-product-options-link { display: flex !important; min-height: 44px; align-items: center; justify-content: space-between; }
.single-product .sp-related-section .sp-card-options,
.single-product .sp-related-section .sp-card-buy-row,
.single-product .sp-related-section .sp-card-add-button { display: none !important; }
.single-product .sp-related-section .sp-mobile-product-options-link { display: flex !important; min-height: 44px; align-items: center; justify-content: space-between; }
.single-product .sp-related-section .sp-card-mobile-price { display: grid; }

/* Keep quantity and the primary action aligned on desktop. */
body.single-product.woocommerce div.product form.variations_form.sp-single-variation-form .woocommerce-variation-add-to-cart,
body.single-product.woocommerce div.product form.cart:not(.variations_form) {
  display: grid !important;
  grid-template-columns: minmax(112px, 130px) minmax(0, 1fr) !important;
  grid-template-areas:
    "quantity button"
    "note note" !important;
  gap: 10px 14px !important;
  align-items: end !important;
  width: 100% !important;
}
body.single-product.woocommerce div.product form.cart .quantity {
  display: flex !important;
  grid-area: quantity !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
}
body.single-product.woocommerce div.product form.cart .quantity::before {
  margin: 0 0 7px !important;
  overflow: hidden;
  font-size: 12px !important;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.single-product.woocommerce div.product form.cart.sp-custom-cut-active .quantity::before {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}
body.single-product.woocommerce div.product form.cart .quantity .qty {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 52px !important;
  border: 1px solid #cfd4df !important;
  background: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.single-product.woocommerce div.product .single_add_to_cart_button {
  grid-area: button !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body.single-product.woocommerce div.product .sp-product-purchase-note {
  grid-area: note !important;
  margin-top: 2px !important;
}
@media (max-width: 520px) {
  body.single-product.woocommerce div.product form.variations_form.sp-single-variation-form .woocommerce-variation-add-to-cart,
  body.single-product.woocommerce div.product form.cart:not(.variations_form) {
    grid-template-columns: minmax(76px, 96px) minmax(0, 1fr) !important;
    gap: 9px 10px !important;
  }
  body.single-product.woocommerce div.product form.cart .quantity::before {
    font-size: 10px !important;
  }
}
@media (max-width: 1020px) { .sp-catalog-page .sp-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sp-catalog-page .sp-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 680px) {
  .site-header .sp-site-search { display: flex !important; width: 44px; min-width: 44px; }
  .site-header .sp-site-search input[type="search"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .site-header .sp-site-search:focus-within { position: absolute; left: 12px; right: 12px; z-index: 80; width: auto; padding: 6px; background: #fff; }
  .site-header .sp-site-search:focus-within input[type="search"] { position: static; width: 100%; height: 44px; opacity: 1; pointer-events: auto; }
  #sp-products-grid, .sp-products-grid, .woocommerce ul.products:not(.sp-order-steps) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; width: 100% !important; }
  .sp-products-grid > li, .woocommerce ul.products li.product { width: 100% !important; max-width: 100%; margin: 0 !important; overflow: hidden; }
  .sp-card-body { padding-inline: 10px; }
  .sp-card-mobile-price { display: grid; }
  .sp-card-purchase .sp-card-buy-row, .sp-card-purchase .sp-card-add-button, .sp-card-option-group--select, .sp-card-option-group--other { display: none !important; }
  .sp-catalog-page ul.products > li.product > .button { display: none !important; }
  .sp-card-purchase { padding: 0 10px 12px; }
  .sp-card-option-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sp-card-option { min-height: 36px !important; padding: 6px 8px !important; }
  .sp-mobile-product-options-link { display: flex !important; min-height: 44px; align-items: center; justify-content: space-between; }
  .sp-filter-row { align-items: flex-start; flex-direction: column; }
  .sp-filter-row--sort { padding-inline: 18px; }
  .sp-filter-row--sort .sp-filter-label { padding: 0 !important; }
  .sp-home-sort { width: 100%; }
  .sp-color-chips { width: 100%; }
  .sp-active-filter { width: 100%; margin-left: 0; }
  .sp-clear-filters { justify-content: center; }
}

/* Mobile and narrow tablets: cards summarize; choices happen on the product page. */
@media (max-width: 800px) {
  .single-product .sp-related-section {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .single-product .sp-related-section ul.products {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .single-product .sp-related-section ul.products li.product {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .home #sp-products-grid .sp-card-options,
  .home #sp-products-grid .sp-card-buy-row,
  .home #sp-products-grid .sp-card-add-button,
  .sp-catalog-page .sp-products-grid .sp-card-options,
  .sp-catalog-page .sp-products-grid .sp-card-buy-row,
  .sp-catalog-page .sp-products-grid .sp-card-add-button,
  .single-product .sp-related-section .sp-card-options,
  .single-product .sp-related-section .sp-card-buy-row,
  .single-product .sp-related-section .sp-card-add-button {
    display: none !important;
  }
  .home #sp-products-grid .sp-card-mobile-price,
  .sp-catalog-page .sp-products-grid .sp-card-mobile-price,
  .single-product .sp-related-section .sp-card-mobile-price {
    display: grid !important;
  }
  .home #sp-products-grid .sp-mobile-product-options-link,
  .sp-catalog-page .sp-products-grid .sp-mobile-product-options-link,
  .single-product .sp-related-section .sp-mobile-product-options-link {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 11px 0 5px;
    border-top: 1px solid #e1e4ea;
    color: var(--brand-blue, #303b91);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
  }
  .home #sp-products-grid .sp-card-body,
  .sp-catalog-page .sp-products-grid .sp-card-body,
  .single-product .sp-related-section .sp-card-body {
    padding: 13px 12px 8px !important;
    gap: 0 !important;
    min-height: 0 !important;
  }
  .home #sp-products-grid .sp-tagline,
  .sp-catalog-page .sp-products-grid .sp-tagline,
  .single-product .sp-related-section .sp-tagline {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 6px !important;
    color: #626a7e !important;
    font-size: 10px !important;
    letter-spacing: .065em;
  }
  .home #sp-products-grid .woocommerce-loop-product__title,
  .sp-catalog-page .sp-products-grid .woocommerce-loop-product__title,
  .single-product .sp-related-section .woocommerce-loop-product__title {
    min-height: 0 !important;
    margin: 0 !important;
    font-size: clamp(22px, 6vw, 26px) !important;
    font-weight: 750 !important;
    letter-spacing: -.02em !important;
    line-height: 1.15 !important;
  }
  .home #sp-products-grid .sp-title-grammages,
  .sp-catalog-page .sp-products-grid .sp-title-grammages,
  .single-product .sp-related-section .sp-title-grammages {
    display: block;
    margin: 9px 0 0 !important;
    color: #626a7e !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4;
  }
  .sp-card-mobile-price {
    margin-top: 14px;
  }
  .sp-card-mobile-price__range {
    color: var(--brand-red, #d92d20);
    max-width: 100%;
    font-size: clamp(17px, 4.6vw, 21px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }
  .single-product .sp-related-section .sp-card-mobile-price small {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .single-product .sp-related-section .sp-card-mobile-price {
    margin: 14px 0 0 !important;
  }
  .single-product .sp-related-section .sp-card-purchase {
    padding: 0 12px 14px !important;
    gap: 0 !important;
  }
  .single-product .sp-related-section .sp-mobile-product-options-link {
    gap: 8px;
    overflow-wrap: anywhere;
  }
  .single-product .sp-related-section > h2 {
    max-width: 100%;
    margin-bottom: 22px !important;
    font-size: clamp(24px, 7vw, 30px) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere;
  }
}

/* Product context fills the gallery column instead of leaving a blank desktop area. */
.single-product .sp-product-context {
  float: left;
  clear: left;
  width: 55%;
  margin: 30px 0 22px;
  padding: 28px 30px 30px;
  border: 1px solid #e1e4ec;
  border-top: 4px solid var(--brand-red, #d92d20);
  border-radius: 14px;
  background: #fff;
  color: #303543;
}
.single-product .sp-product-context__eyebrow {
  margin: 0 0 7px;
  color: var(--brand-red, #d92d20);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.single-product .sp-product-context h2 {
  margin: 0 0 16px;
  color: var(--brand-blue, #303b91);
  font-size: clamp(25px, 2.3vw, 32px);
  line-height: 1.12;
}
.single-product .sp-product-context .sp-family-description {
  font-size: 15px;
  line-height: 1.65;
}
.single-product .sp-product-context .sp-family-description p {
  margin-bottom: 15px;
}
.single-product .sp-product-context .sp-family-description__facts {
  gap: 10px;
  margin-top: 20px;
}
.single-product .sp-product-context .sp-family-description__facts > div {
  padding: 14px;
  background: #f7f8fb;
}
.single-product .sp-product-context .sp-family-description__facts dd {
  font-size: 15px;
}
@media (max-width: 800px) {
  .single-product .sp-product-context {
    display: block;
    float: none;
    clear: both;
    width: 100%;
    margin: 28px 0 8px;
    padding: 23px 20px 25px;
    border: 1px solid #e1e4ec;
    border-top: 4px solid var(--brand-red, #d92d20);
    border-radius: 12px;
    background: #fff;
  }
}

/* Purchase assurances belong after the product choices and primary action. */
body.single-product .sp-product-benefits {
  grid-template-columns: 1fr;
  margin: 20px 0 0;
}
body.single-product .sp-product-benefits > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 0 !important;
  border-bottom: 1px solid #e5e8ef !important;
}
body.single-product .sp-product-benefits > div:last-child {
  border-bottom: 0 !important;
}
body.single-product .sp-product-benefits > div > span {
  margin: 1px 0 0;
}
body.single-product .sp-product-benefits p {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  width: 100%;
  min-width: 0;
  align-items: start;
}
body.single-product .sp-product-benefits strong,
body.single-product .sp-product-benefits small {
  display: block;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.single-product .sp-product-benefits strong { line-height: 1.3; }
body.single-product .sp-product-benefits small { margin-top: 0; line-height: 1.45; }
@media (max-width: 480px) {
  body.single-product .sp-product-benefits p {
    display: block;
  }
  body.single-product .sp-product-benefits small { margin-top: 3px; }
}
