/*
 Theme Name:   Divi Child
 Theme URI:    https://sabasabai.no
 Description:  Sabasabai unified child theme stylesheet (recipes + shop + Divi header)
 Author:       Tore
 Author URI:   https://aliom.no
 Template:     Divi
 Version:      1.7.5-alpha

 ------------------------------------------------------------
 Version History
 ------------------------------------------------------------
 1.7.1 - Blog grid 4-column layout + hover zoom
 1.7.2 - Uniform height on desktop/tablet
 1.7.3 - Compact spacing between image and title
 1.7.4 - Mobile layout fix (safe single column)
 1.7.5 - Cleaned Ingredient Insights & Steps Overview (deprecated old image/product columns)
 ------------------------------------------------------------

 TABLE OF CONTENTS
 ------------------------------------------------------------
  0) Base / Variables / Resets
  1) Ingredient Insights (layout + Woo product)   [Deprecated + New clean]
  2) ACF Gallery Slider
  3) Steps Overview                               [Deprecated + New clean]
  4) Sticky Stack
  5) Divi Builder Preview Fixes
  6) Woo Buttons – site-wide gold
  7) Woo Button Motion Smoothing
  8) Theme Builder Add-to-Cart Fix
  9) Cart Totals Styling
 10) Blog Grid (4-column, even height, hover zoom, mobile safe)
 11) Woo Bundled Products
 12) Divi Header Search
 ------------------------------------------------------------
*/

/* =========================================================
   0) BASE / VARIABLES / RESETS
   --------------------------------------------------------- */
:root {
  --saba-gold: #c9a646;           /* warm golden-yellow accent */
  --saba-gold-darker: #a38334;    /* deeper gold hover tone */
  --saba-bluegray: #627e8b;       /* calm blue-gray base */
  --saba-green: #2f6f5e;          /* organic green tone */
  --saba-red: #a63a3a;            /* coral-red accent */
  --saba-graphite: #2e2f31;       /* soft dark neutral */
  --saba-ivory: #eae3d7;          /* warm ivory background */
  --header-sticky-height: 72px;   /* used for sticky offsets */
}

* {
  box-sizing: border-box;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =========================================================
   1) INGREDIENT INSIGHTS
   Displays ingredient descriptions with linked Woo products.
   --------------------------------------------------------- */

/* === Deprecated 2025-12-11 === */
.saba-insights {
  display: grid;
  gap: 1.5rem;
}

.saba-insight {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1rem 0;
}

.saba-insight-text {
  flex: 1 1 65%;
}

.saba-insight-product {
  flex: 0 0 35%;
}

.saba-insight-product img {
  width: 100%;
  height: auto;
}

/* Buttons in product area */
.saba-insight-product :is(a.button, button.button, input.button) {
  display: inline-block;
  width: 100%;
  margin-top: 0.5rem;
  text-align: center;
  border-radius: 6px;
}

/* Hover magnifying glass overlay */
.saba-insight-product .saba-prod-link {
  position: relative;
  display: block;
}

.saba-insight-product .saba-prod-link img {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.saba-insight-product .saba-prod-link:hover img {
  opacity: 0.85;
  transform: scale(1.01);
}

.saba-insight-product .saba-prod-link::after {
  content: "\1F50D";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 42px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.saba-insight-product .saba-prod-link:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* === End Deprecated === */

/* =========================================================
   1) INGREDIENT INSIGHTS (clean version)
   Displays ingredient descriptions with inline WYSIWYG images.
   --------------------------------------------------------- */
.saba-insights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.saba-insight {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.saba-insight-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  color: var(--saba-graphite);
}

.saba-insight-text img {
  margin-top: 0.5rem;
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* =========================================================
   2) ACF GALLERY SLIDER
   Simple responsive image slider with optional captions.
   --------------------------------------------------------- */
.saba-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.saba-slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.saba-slide {
  flex: 0 0 100%;
  position: relative;
}

.saba-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.saba-slide:hover figcaption {
  opacity: 1;
}

/* ACF Slider: hide nav and progress elements from [saba_acf_gallery] */
.saba-slider .saba-nav,
.saba-slider .saba-dots {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Prevent any extra spacing below slider */
.saba-slider {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}


/* =========================================================
   3) STEPS OVERVIEW
   Displays cooking steps (with optional image).
   --------------------------------------------------------- */

/* === Deprecated 2025-12-11 === 
.saba-steps {
  display: grid;
  gap: 0;
}

.saba-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.saba-step-text {
  flex: 1 1 65%;
}

.saba-step-media {
  flex: 0 0 35%;
}

.saba-step h3,
.saba-step h4 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  line-height: 1.3;
}

.saba-step h3::first-letter,
.saba-step h4::first-letter {
  font-weight: 700;
  color: var(--saba-gold);
}
/* === End Deprecated === */

/* =========================================================
   3) STEPS OVERVIEW (clean version)
   Displays numbered steps with optional inline images.
   --------------------------------------------------------- */
.saba-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: step;
}

.saba-step {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  counter-increment: step;
}

.saba-step-text h3 {
  position: relative;
  font-size: 1.3rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  color: var(--saba-graphite);
}

.saba-step-text h3::before {
  content: counter(step) ". ";
  color: var(--saba-gold);
  font-weight: 700;
}

.saba-step-text img {
  margin-top: 0.5rem;
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* =========================================================
   4) STICKY STACK
   Keeps product box or title sticky beside content.
   --------------------------------------------------------- 
@media (min-width: 981px) {
  .sticky-stack {
    position: sticky;
    top: var(--header-sticky-height);
    z-index: 10;
  }
}

.sticky-product-box {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.sticky-product-box img {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sticky-product-box .saba-prod-link:hover img {
  opacity: 0.85;
  transform: scale(1.01);
}

/* =========================================================
   5) DIVI BUILDER PREVIEW FIXES
   Adjusts layout inside the Visual Builder.
   --------------------------------------------------------- */
.et-fb .saba-insight,
.et-fb .saba-step {
  flex-direction: column;
}

.et-fb .saba-insight-text,
.et-fb .saba-step-text {
  flex: 1 1 100%;
}
/* ============================================================
   6) WOO BUTTONS – STRUCTURAL BASELINE (CLEAN RESET)
   ------------------------------------------------------------
   Version: 2.4-clean
   Date: 2025-12-07
   Author: Tore
   Purpose:
     Removes all color overrides now handled in Divi Global
     Defaults. Keeps only alignment, spacing, and form styling
     relevant to WooCommerce product pages.
   ------------------------------------------------------------
   Version History
   ------------------------------------------------------------
   1.0 - Original gold baseline for WooCommerce
   2.0 - Reset for Divi baseline
   2.1 - Solid gold + darker hover
   2.2 - Gradient experiments (removed)
   2.3 - Global gradient override (removed)
   2.4 - Clean structural baseline before Global Header setup
   ============================================================ */


/* ------------------------------------------------------------
   BUTTON VISUALS – REMOVED
   ------------------------------------------------------------
   All color, gradient, and hover styling is now defined
   through Divi Theme Builder (Global Defaults).
   ------------------------------------------------------------ */


/* ------------------------------------------------------------
   PRODUCT FORM ALIGNMENT
   ------------------------------------------------------------ */

/* -- Flex layout: aligns quantity + add-to-cart nicely -- 
body.single-product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* -- Quantity input field -- 
body.single-product form.cart .quantity input.qty {
  padding: 0.45em 0.7em;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  font-size: 1em;
  line-height: 1.2;
}

/* -- Variation dropdown reset to Divi baseline -- 
body.single-product form.cart select {
  appearance: auto;
  background-color: #fff;
  padding: 0.45em 1.75em 0.45em 0.7em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  line-height: 1.3;
}

/* -- Hover cue for dropdowns -- 
body.single-product form.cart select:hover {
  border-color: #be9b4a;
}


/* ------------------------------------------------------------
   END SECTION 6
   ------------------------------------------------------------ */

/* =========================================================
   8) THEME BUILDER ADD-TO-CART FIX
   Ensures Add to Cart modules display properly.
   --------------------------------------------------------- */
.et-l .et_pb_module.et_pb_wc_add_to_cart form.cart {
  display: block !important;
}

/* =========================================================
   9) CART TOTALS STYLING
   Adds padding and contrast for tax rows.
   --------------------------------------------------------- */
.woocommerce .cart_totals .custom-tax-row th,
.woocommerce .cart_totals .custom-tax-row td {
  font-weight: 500;
  color: #333;
  border-top: none;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* =========================================================
   10) BLOG GRID
   4-column responsive layout, even heights, hover zoom, safe on mobile.
   --------------------------------------------------------- */
#blog-grid-1.et_pb_blog_grid .et_pb_salvattore_content[data-columns]::before,
#blog-grid-1 .et_pb_salvattore_content[data-columns]::before {
  content: '4 .column.size-1of4';
}

#blog-grid-1 .et_pb_salvattore_content .column.size-1of4 {
  width: 25% !important;
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 980px) {
  #blog-grid-1 .et_pb_salvattore_content[data-columns]::before {
    content: '2 .column.size-1of2';
  }
  #blog-grid-1 .et_pb_salvattore_content .column.size-1of2 {
    width: 50% !important;
  }
}

/* Phone: 1 column */
@media (max-width: 767px) {
  #blog-grid-1 .et_pb_salvattore_content[data-columns]::before {
    content: '1 .column.size-1of1';
  }
  #blog-grid-1 .et_pb_salvattore_content .column.size-1of1 {
    width: 100% !important;
  }
}

/* Card styling */
#blog-grid-1 .et_pb_post {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  margin: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Uniform height across row */
#blog-grid-1 .et_pb_salvattore_content[data-columns] {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

#blog-grid-1 .et_pb_post .post-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#blog-grid-1 .et_pb_post .post-meta {
  margin-top: auto;
}

/* Hover lift */
#blog-grid-1 .et_pb_post:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #ddd;
}

/* Featured image zoom */
#blog-grid-1 .et_pb_post .et_pb_image_container img {
  transition: transform 0.5s ease;
}

#blog-grid-1 .et_pb_post:hover .et_pb_image_container img {
  transform: scale(1.08);
}

/* Image corners match card corners */
#blog-grid-1 .et_pb_post .et_pb_image_container,
#blog-grid-1 .et_pb_post .et_pb_image_container img {
  border-radius: 8px 8px 0 0 !important;
  overflow: hidden;
  display: block;
}

/* Compact spacing */
#blog-grid-1 .et_pb_post .et_pb_image_container {
  margin-bottom: 0.6rem !important;
}

#blog-grid-1 .et_pb_post .entry-title {
  margin-top: 0 !important;
  margin-bottom: 0.4rem !important;
  line-height: 1.3;
}

#blog-grid-1 .et_pb_post .post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#blog-grid-1 .et_pb_post p,
#blog-grid-1 .et_pb_post .post-meta {
  margin-top: 0.25rem !important;
}

/* Mobile: disable flex equal height */
@media (max-width: 767px) {
  #blog-grid-1 .et_pb_salvattore_content[data-columns] {
    display: block !important;
  }
  #blog-grid-1 .et_pb_post {
    display: block !important;
    height: auto !important;
  }
  #blog-grid-1 .et_pb_post .post-content {
    display: block !important;
  }
}

/* =========================================================
   11) WOO BUNDLED PRODUCTS
   Typography and spacing tweaks for bundled kits.
   --------------------------------------------------------- 
body.single-product [class*="bundled_product"] .bundled_product_title {
  font-size: 1.1rem;
  font-weight: 700;
}

body.single-product [class*="bundled_product"] .bundled_product_excerpt {
  font-size: 0.95rem;
  line-height: 1.45;
}

body.single-product [class*="bundled_product"] .price {
  font-size: 0.96rem;
  color: #333;
}
*/
/* =========================================================
   12) DIVI HEADER SEARCH
   Improves search input and placeholder legibility.
   --------------------------------------------------------- */

.site-main-menu .et_pb_menu__search-input {
  color: #eae3d7 !important;
  caret-color: #eae3d7;
}

.site-main-menu .et_pb_menu__search-input::placeholder {
  color: rgba(234, 227, 215, 0.85) !important;
  opacity: 1;
}
/* Hide browser-native search clear X in main menu search */
.site-main-menu .et_pb_menu__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}


/* =========================================================
   WooCommerce Product Bundles
   Layout-aware styling for Grid, Standard and Tabular layouts
   Version: 1.3
   Last updated: 2026-05-06

   Version history:
   1.0 - Added layout-aware styling for bundle layouts.
   1.1 - Refined tabular product text, checkbox and optional pricing.
   1.2 - Added compact mobile layout for tabular bundles.
   1.3 - Cleaned duplicate rules and removed old grid experiments.

   Table of contents:
   1. Shared bundle styling
   2. Grid / Standard bundle layout
   3. Tabular bundle layout - desktop/tablet
   4. Tabular bundle layout - mobile
   ========================================================= */


/* ---------------------------------------------------------
   1. Shared bundle styling
   --------------------------------------------------------- */

/* Keep bundle elements predictable across layouts. */
body.single-product .bundle_form .bundled_product_summary,
body.single-product .bundle_form table[class*="bundled"] {
  box-sizing: border-box !important;
}

/* Remove underlines from bundle product links. */
body.single-product .bundle_form .bundled_product_summary a,
body.single-product .bundle_form table[class*="bundled"] a {
  text-decoration: none !important;
}


/* ---------------------------------------------------------
   2. Grid / Standard bundle layout
   --------------------------------------------------------- */

/* Keep the native Product Bundles grid/float layout. Do not force 4 columns. */
body.single-product .bundle_form .bundled_products:not(table) .bundled_product,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary {
  margin-bottom: 34px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Light horizontal padding inside each bundled product card. */
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary {
  padding: 0 10px !important;
}

/* Product images in Grid / Standard layout. */
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .bundled_product_images,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .bundled_product_image,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .images {
  max-width: 130px !important;
  width: 130px !important;
  margin: 0 auto 10px !important;
}

body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary img {
  max-width: 130px !important;
  width: 130px !important;
  height: 130px !important;
  object-fit: contain !important;
}

/* Product text in Grid / Standard layout. */
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .bundled_product_title,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .product_title {
  font-size: 16px !important;
  line-height: 1.3 !important;
  margin: 6px 0 5px !important;
  text-align: center !important;
}

body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .price,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .bundled_item_cart_content,
body.single-product .bundle_form .bundled_products:not(table) .bundled_product_summary .cart {
  font-size: 14px !important;
  line-height: 1.35 !important;
  text-align: center !important;
}


/* ---------------------------------------------------------
   3. Tabular bundle layout - desktop/tablet
   --------------------------------------------------------- */

/* Main tabular bundle table. */
body.single-product .bundle_form table[class*="bundled"] {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

/* Header row. */
body.single-product .bundle_form table[class*="bundled"] th {
  padding: 18px 16px 20px !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-align: left !important;
  vertical-align: middle !important;
}

/* Quantity column header. */
body.single-product .bundle_form table[class*="bundled"] th:last-child {
  width: 110px !important;
  text-align: center !important;
}

/* Table cells. */
body.single-product .bundle_form table[class*="bundled"] td {
  padding: 14px 16px !important;
  vertical-align: middle !important;
  line-height: 1.35 !important;
  font-size: 17px !important;
}

/* Product image column. */
body.single-product .bundle_form table[class*="bundled"] td:first-child {
  width: 110px !important;
  padding-right: 8px !important;
}

/* Product images in Tabular layout. */
body.single-product .bundle_form table[class*="bundled"] img {
  width: 86px !important;
  max-width: 86px !important;
  height: 86px !important;
  object-fit: contain !important;
}

/* Product names in Tabular layout. */
body.single-product .bundle_form table[class*="bundled"] .bundled_product_title,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_title a,
body.single-product .bundle_form table[class*="bundled"] .product_title,
body.single-product .bundle_form table[class*="bundled"] .product_title a {
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.22 !important;
}

/* Short description override / product description below product name. */
body.single-product .bundle_form table[class*="bundled"] .bundled_product_excerpt,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_excerpt p,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_description,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_description p,
body.single-product .bundle_form table[class*="bundled"] .details,
body.single-product .bundle_form table[class*="bundled"] .details p {
  font-size: 14px !important;
  line-height: 1.22 !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

/* Quantity / amount column. */
body.single-product .bundle_form table[class*="bundled"] td:last-child {
  width: 110px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Optional add-on line. */
body.single-product .bundle_form table[class*="bundled"] .bundled_item_cart_content,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_optional_checkbox,
body.single-product .bundle_form table[class*="bundled"] label {
  margin-top: 6px !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  color: #627e8b !important;
}

/* Add a little separation between description and optional add-on line. */
body.single-product .bundle_form table[class*="bundled"] .bundled_item_cart_content {
  margin-top: 8px !important;
}

/* Optional add-on checkbox. */
body.single-product .bundle_form table[class*="bundled"] input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin-right: 9px !important;
  vertical-align: -3px !important;
  accent-color: #627e8b;
}

/* Optional add-on price. */
body.single-product .bundle_form table[class*="bundled"] .bundled_item_cart_content .price,
body.single-product .bundle_form table[class*="bundled"] .bundled_product_optional_checkbox .price {
  font-size: 18px !important;
  line-height: 1.35 !important;
  color: #627e8b !important;
}


/* ---------------------------------------------------------
   4. Tabular bundle layout - mobile
   --------------------------------------------------------- */

@media (max-width: 767px) {

  /* Hide table headers on mobile. */
  body.single-product .bundle_form table[class*="bundled"] thead {
    display: none !important;
  }

  /* Convert each bundled product row to a compact mobile row. */
  body.single-product .bundle_form table[class*="bundled"] tr {
    display: grid !important;
    grid-template-columns: 76px 1fr 42px !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    align-items: start !important;
    margin: 0 0 22px !important;
    padding: 0 0 18px !important;
  }

  /* Reset table cells for mobile grid layout. */
  body.single-product .bundle_form table[class*="bundled"] td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    text-align: left !important;
  }

  /* Product image column. */
  body.single-product .bundle_form table[class*="bundled"] td:first-child {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  /* Product images on mobile. */
  body.single-product .bundle_form table[class*="bundled"] img {
    width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  /* Product text column. */
  body.single-product .bundle_form table[class*="bundled"] td:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  /* Quantity column. */
  body.single-product .bundle_form table[class*="bundled"] td:last-child {
    grid-column: 3 !important;
    grid-row: 1 !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    padding-top: 2px !important;
    width: auto !important;
    white-space: normal !important;
  }

  /* Product names on mobile. Avoid broad td a selectors here. */
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_title,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_title a,
  body.single-product .bundle_form table[class*="bundled"] .product_title,
  body.single-product .bundle_form table[class*="bundled"] .product_title a,
  body.single-product .bundle_form table[class*="bundled"] h3,
  body.single-product .bundle_form table[class*="bundled"] h3 a,
  body.single-product .bundle_form table[class*="bundled"] h4,
  body.single-product .bundle_form table[class*="bundled"] h4 a {
    font-size: 18px !important;
    line-height: 1.18 !important;
    font-weight: 700 !important;
    margin: 0 0 3px !important;
  }

  /* Short description / override text on mobile. */
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_excerpt,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_excerpt p,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_description,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_description p,
  body.single-product .bundle_form table[class*="bundled"] .details p {
    font-size: 15px !important;
    line-height: 1.25 !important;
    margin: 0 0 5px !important;
    font-weight: 400 !important;
  }

  /* Optional add-on line on mobile. */
  body.single-product .bundle_form table[class*="bundled"] .bundled_item_cart_content,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_optional_checkbox,
  body.single-product .bundle_form table[class*="bundled"] label {
    font-size: 16px !important;
    line-height: 1.3 !important;
    color: #627e8b !important;
  }

  /* Optional add-on checkbox on mobile. */
  body.single-product .bundle_form table[class*="bundled"] input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 7px !important;
    vertical-align: -3px !important;
    accent-color: #627e8b;
  }

  /* Optional add-on price on mobile. */
  body.single-product .bundle_form table[class*="bundled"] .bundled_item_cart_content .price,
  body.single-product .bundle_form table[class*="bundled"] .bundled_product_optional_checkbox .price {
    font-size: 16px !important;
    color: #627e8b !important;
  }
}

/* =========================================================
   WooCommerce Blocks
   Cart cross-sells styling
   Version: 1.4
   Last updated: 2026-05-07

   Version history:
   1.0 - Added base styling for Cart Cross-Sells.
   1.1 - Added Sabasabai gradient button styling.
   1.2 - Added mobile layout.
   1.3 - Added image containment fixes.
   1.4 - Cleaned duplicate rules and added optional product-list class.

   Required block classes:
   - Add "saba-cart-cross-sells" to the Cart Cross-Sells wrapper block.
   - Optional: Add "saba-cart-cross-sells-products" to the Cart Cross-Sells Products block.

   Table of contents:
   1. Variables
   2. Section and heading
   3. Product grid
   4. Product cards and content
   5. Buttons
   6. Mobile layout
   ========================================================= */


/* ---------------------------------------------------------
   1. Variables
   --------------------------------------------------------- */

.saba-cart-cross-sells {
  /* Regular button gradient */
  --saba-cross-sell-button-bg-left: #d3b363;
  --saba-cross-sell-button-bg-left-stop: 0%;
  --saba-cross-sell-button-bg-mid: #d3b363;
  --saba-cross-sell-button-bg-mid-stop: 33%;
  --saba-cross-sell-button-bg-right: #ecd181;
  --saba-cross-sell-button-bg-right-stop: 100%;

  /* Hover button gradient */
  --saba-cross-sell-button-hover-bg-left: #d3b363;
  --saba-cross-sell-button-hover-bg-left-stop: 0%;
  --saba-cross-sell-button-hover-bg-mid: #d3b363;
  --saba-cross-sell-button-hover-bg-mid-stop: 67%;
  --saba-cross-sell-button-hover-bg-right: #ecd181;
  --saba-cross-sell-button-hover-bg-right-stop: 100%;

  /* Regular button border */
  --saba-cross-sell-button-border-color: #ecd181;
  --saba-cross-sell-button-border-width: 2px;
  --saba-cross-sell-button-border-radius: 6px;

  /* Hover button border */
  --saba-cross-sell-button-hover-border-color: #ecd181;
  --saba-cross-sell-button-hover-border-width: 2px;
  --saba-cross-sell-button-hover-border-radius: 0;

  /* Button text */
  --saba-cross-sell-button-text-color: #ffffff;
  --saba-cross-sell-button-hover-text-color: #ffffff;
}


/* ---------------------------------------------------------
   2. Section and heading
   --------------------------------------------------------- */

.saba-cart-cross-sells {
  margin-top: 36px;
  margin-bottom: 40px;
}

/* Cross-sell heading */
.saba-cart-cross-sells h2.wp-block-heading,
.saba-cart-cross-sells .wp-block-heading {
  margin: 0 0 28px;
  font-size: 26px !important;
  line-height: 1.2;
  font-weight: 500;
  color: #2e2f31;
  text-align: left;
}

/* ---------------------------------------------------------
   3. Product grid
   --------------------------------------------------------- */

.saba-cart-cross-sells ul,
.saba-cart-cross-sells .wc-block-grid__products,
.saba-cart-cross-sells .products,
.saba-cart-cross-sells .wp-block-post-template,
.saba-cart-cross-sells .wp-block-woocommerce-product-template,
.saba-cart-cross-sells-products ul,
.saba-cart-cross-sells-products .wc-block-grid__products,
.saba-cart-cross-sells-products .products,
.saba-cart-cross-sells-products .wp-block-post-template,
.saba-cart-cross-sells-products .wp-block-woocommerce-product-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 36px;
  row-gap: 40px;
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}


/* ---------------------------------------------------------
   4. Product cards and content
   --------------------------------------------------------- */

.saba-cart-cross-sells li,
.saba-cart-cross-sells .wc-block-grid__product,
.saba-cart-cross-sells .product,
.saba-cart-cross-sells .wp-block-post,
.saba-cart-cross-sells-products li,
.saba-cart-cross-sells-products .wc-block-grid__product,
.saba-cart-cross-sells-products .product,
.saba-cart-cross-sells-products .wp-block-post {
  text-align: center;
  border: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Product image wrappers */
.saba-cart-cross-sells .wc-block-grid__product-image,
.saba-cart-cross-sells .wc-block-components-product-image,
.saba-cart-cross-sells .wp-block-woocommerce-product-image,
.saba-cart-cross-sells-products .wc-block-grid__product-image,
.saba-cart-cross-sells-products .wc-block-components-product-image,
.saba-cart-cross-sells-products .wp-block-woocommerce-product-image {
  height: auto !important;
  overflow: visible !important;
}

/* Product images */
.saba-cart-cross-sells img,
.saba-cart-cross-sells-products img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 150px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto 18px;
  display: block;
}

/* Product titles */
.saba-cart-cross-sells .wc-block-grid__product-title,
.saba-cart-cross-sells .woocommerce-loop-product__title,
.saba-cart-cross-sells .wp-block-post-title,
.saba-cart-cross-sells h3,
.saba-cart-cross-sells li > a,
.saba-cart-cross-sells-products .wc-block-grid__product-title,
.saba-cart-cross-sells-products .woocommerce-loop-product__title,
.saba-cart-cross-sells-products .wp-block-post-title,
.saba-cart-cross-sells-products h3,
.saba-cart-cross-sells-products li > a {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  color: #2e2f31;
  text-decoration: none;
}

/* Product prices */
.saba-cart-cross-sells .price,
.saba-cart-cross-sells .wc-block-grid__product-price,
.saba-cart-cross-sells .wp-block-woocommerce-product-price,
.saba-cart-cross-sells-products .price,
.saba-cart-cross-sells-products .wc-block-grid__product-price,
.saba-cart-cross-sells-products .wp-block-woocommerce-product-price {
  margin: 14px 0 22px;
  font-size: 17px;
  line-height: 1.3;
  color: #2e2f31;
}


/* ---------------------------------------------------------
   5. Buttons
   --------------------------------------------------------- */

.saba-cart-cross-sells .button,
.saba-cart-cross-sells .wp-block-button__link,
.saba-cart-cross-sells .add_to_cart_button,
.saba-cart-cross-sells button,
.saba-cart-cross-sells-products .button,
.saba-cart-cross-sells-products .wp-block-button__link,
.saba-cart-cross-sells-products .add_to_cart_button,
.saba-cart-cross-sells-products button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 13px 28px;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;

  color: var(--saba-cross-sell-button-text-color) !important;
  background: linear-gradient(
    90deg,
    var(--saba-cross-sell-button-bg-left) var(--saba-cross-sell-button-bg-left-stop),
    var(--saba-cross-sell-button-bg-mid) var(--saba-cross-sell-button-bg-mid-stop),
    var(--saba-cross-sell-button-bg-right) var(--saba-cross-sell-button-bg-right-stop)
  ) !important;

  border-color: var(--saba-cross-sell-button-border-color) !important;
  border-style: solid !important;
  border-width: var(--saba-cross-sell-button-border-width) !important;
  border-radius: var(--saba-cross-sell-button-border-radius) !important;

  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    border-radius 180ms ease,
    color 180ms ease;
}

.saba-cart-cross-sells .button:hover,
.saba-cart-cross-sells .button:focus,
.saba-cart-cross-sells .wp-block-button__link:hover,
.saba-cart-cross-sells .wp-block-button__link:focus,
.saba-cart-cross-sells .add_to_cart_button:hover,
.saba-cart-cross-sells .add_to_cart_button:focus,
.saba-cart-cross-sells button:hover,
.saba-cart-cross-sells button:focus,
.saba-cart-cross-sells-products .button:hover,
.saba-cart-cross-sells-products .button:focus,
.saba-cart-cross-sells-products .wp-block-button__link:hover,
.saba-cart-cross-sells-products .wp-block-button__link:focus,
.saba-cart-cross-sells-products .add_to_cart_button:hover,
.saba-cart-cross-sells-products .add_to_cart_button:focus,
.saba-cart-cross-sells-products button:hover,
.saba-cart-cross-sells-products button:focus {
  color: var(--saba-cross-sell-button-hover-text-color) !important;
  background: linear-gradient(
    90deg,
    var(--saba-cross-sell-button-hover-bg-left) var(--saba-cross-sell-button-hover-bg-left-stop),
    var(--saba-cross-sell-button-hover-bg-mid) var(--saba-cross-sell-button-hover-bg-mid-stop),
    var(--saba-cross-sell-button-hover-bg-right) var(--saba-cross-sell-button-hover-bg-right-stop)
  ) !important;

  border-color: var(--saba-cross-sell-button-hover-border-color) !important;
  border-width: var(--saba-cross-sell-button-hover-border-width) !important;
  border-radius: var(--saba-cross-sell-button-hover-border-radius) !important;
}


/* ---------------------------------------------------------
   6. Mobile layout
   --------------------------------------------------------- */

@media (max-width: 767px) {

  /* Cross-sell section wrapper */
  .saba-cart-cross-sells {
    margin-top: 24px;
    margin-bottom: 28px;
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Cross-sell heading */
  .saba-cart-cross-sells h2,
  .saba-cart-cross-sells .wp-block-heading {
    margin: 0 0 20px;
    font-size: 34px;
    line-height: 1.1;
  }

  /* Product grid: one product per row on mobile */
  .saba-cart-cross-sells ul,
  .saba-cart-cross-sells .wc-block-grid__products,
  .saba-cart-cross-sells .products,
  .saba-cart-cross-sells .wp-block-post-template,
  .saba-cart-cross-sells .wp-block-woocommerce-product-template,
  .saba-cart-cross-sells-products ul,
  .saba-cart-cross-sells-products .wc-block-grid__products,
  .saba-cart-cross-sells-products .products,
  .saba-cart-cross-sells-products .wp-block-post-template,
  .saba-cart-cross-sells-products .wp-block-woocommerce-product-template {
    grid-template-columns: 1fr;
    row-gap: 32px;
    column-gap: 0;
  }

  /* Product card */
  .saba-cart-cross-sells li,
  .saba-cart-cross-sells .wc-block-grid__product,
  .saba-cart-cross-sells .product,
  .saba-cart-cross-sells .wp-block-post,
  .saba-cart-cross-sells-products li,
  .saba-cart-cross-sells-products .wc-block-grid__product,
  .saba-cart-cross-sells-products .product,
  .saba-cart-cross-sells-products .wp-block-post {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    padding: 22px 18px 24px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #ffffff;
    text-align: center;
    box-sizing: border-box;
  }

  /* Product images */
  .saba-cart-cross-sells img,
  .saba-cart-cross-sells-products img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 145px !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto 14px;
    display: block;
  }

  /* Product titles */
  .saba-cart-cross-sells .wc-block-grid__product-title,
  .saba-cart-cross-sells .woocommerce-loop-product__title,
  .saba-cart-cross-sells .wp-block-post-title,
  .saba-cart-cross-sells h3,
  .saba-cart-cross-sells li > a,
  .saba-cart-cross-sells-products .wc-block-grid__product-title,
  .saba-cart-cross-sells-products .woocommerce-loop-product__title,
  .saba-cart-cross-sells-products .wp-block-post-title,
  .saba-cart-cross-sells-products h3,
  .saba-cart-cross-sells-products li > a {
    font-size: 22px;
    line-height: 1.25;
  }

  /* Product price */
  .saba-cart-cross-sells .price,
  .saba-cart-cross-sells .wc-block-grid__product-price,
  .saba-cart-cross-sells .wp-block-woocommerce-product-price,
  .saba-cart-cross-sells-products .price,
  .saba-cart-cross-sells-products .wc-block-grid__product-price,
  .saba-cart-cross-sells-products .wp-block-woocommerce-product-price {
    margin: 10px 0 16px;
    font-size: 18px;
    line-height: 1.3;
  }

  /* Add-to-cart button */
  .saba-cart-cross-sells .button,
  .saba-cart-cross-sells .wp-block-button__link,
  .saba-cart-cross-sells .add_to_cart_button,
  .saba-cart-cross-sells button,
  .saba-cart-cross-sells-products .button,
  .saba-cart-cross-sells-products .wp-block-button__link,
  .saba-cart-cross-sells-products .add_to_cart_button,
  .saba-cart-cross-sells-products button {
    width: 100%;
    max-width: 260px;
    min-height: 50px;
    padding: 13px 22px;
    font-size: 17px;
  }
}

/* =========================================================
   WooCommerce Blocks
   Sticky cart totals column
   Version: 1.0
   Keeps the cart totals column visible while scrolling long carts/cross-sells
   ========================================================= */

@media (min-width: 981px) {

  /* Sticky summary column on cart page */
  .saba-cart-totals-sticky {
    position: sticky;
    top: 150px;
    align-self: flex-start;
    z-index: 5;
  }
}
/* =========================================================
   Cart – Proceed to Checkout button
   Styles the actual WooCommerce Blocks checkout button
   ========================================================= */

body.woocommerce-cart .saba-cart-checkout-button .wc-block-cart__submit-button,
body.woocommerce-cart .saba-cart-checkout-button a.wc-block-cart__submit-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  min-height: 52px !important;
  padding: 14px 16px !important;

  background: linear-gradient(90deg, #d3b363 0%, #d3b363 33%, #ecd181 100%) !important;
  border: 2px solid #ecd181 !important;
  border-radius: 6px !important;

  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;

  box-shadow: none !important;
}

/* Inner text in WooCommerce Blocks */
body.woocommerce-cart .saba-cart-checkout-button .wc-block-components-button__text {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
}
/* Hover – Cart Proceed to Checkout button */
body.woocommerce-cart .saba-cart-checkout-button .wc-block-cart__submit-button:hover,
body.woocommerce-cart .saba-cart-checkout-button .wc-block-cart__submit-button:focus,
body.woocommerce-cart .saba-cart-checkout-button a.wc-block-cart__submit-button:hover,
body.woocommerce-cart .saba-cart-checkout-button a.wc-block-cart__submit-button:focus {
  background: linear-gradient(90deg, #d3b363 0%, #d3b363 67%, #ecd181 100%) !important;
  border: 2px solid #ecd181 !important;
  border-radius: 0px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
/* =========================================================
   Checkout – Place Order / Send bestilling button
   Styles the actual WooCommerce Blocks checkout button
   ========================================================= */

body.woocommerce-checkout .saba-checkout-place-order-button .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .saba-checkout-place-order-button button.wc-block-components-checkout-place-order-button,
body.woocommerce-checkout button.saba-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  min-height: 52px !important;
  padding: 14px 16px !important;

  background: linear-gradient(90deg, #d3b363 0%, #d3b363 33%, #ecd181 100%) !important;
  border: 2px solid #ecd181 !important;
  border-radius: 6px !important;

  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;

  box-shadow: none !important;
}

/* Inner text in WooCommerce Blocks */
body.woocommerce-checkout .saba-checkout-place-order-button .wc-block-components-button__text,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button .wc-block-components-button__text {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 500 !important;
}

/* Hover – Checkout Place Order button */
body.woocommerce-checkout .saba-checkout-place-order-button .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .saba-checkout-place-order-button .wc-block-components-checkout-place-order-button:focus,
body.woocommerce-checkout button.saba-checkout-place-order-button:hover,
body.woocommerce-checkout button.saba-checkout-place-order-button:focus,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:focus {
  background: linear-gradient(90deg, #d3b363 0%, #d3b363 67%, #ecd181 100%) !important;
  border: 2px solid #ecd181 !important;
  border-radius: 0px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: none !important;
}