/* Grid wrapper */
#product-display-area .archive-pagination {
  margin-top: 75px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
#product-display-area .archive-pagination .page-numbers {
  aspect-ratio: 1 / 1;

  height: 34px;
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-top: 2px;
  color: var(--color-text-h2);
}
.page-numbers:not(.dots):hover {
  box-shadow: 0 0 5px rgba(215, 63, 63, 0.5);
}
#product-display-area .archive-pagination .page-numbers.current {
  background: var(--color-primary);
  color: #fff !important;
  border-color: var(--color-primary);
  position: relative;
  z-index: 1;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(215, 63, 63, 0.4),
    0 0 10px rgba(215, 63, 63, 0.6);
  transition: box-shadow 0.3s ease;
}
.products-grid {
  display: grid;
  width: 100%;
  gap: 5rem 2rem;
  grid-template-columns: repeat(1, 1fr);
  justify-items: center; /* center cards in their grid cell */
  align-items: start;
  padding: 0; /* optional */
  will-change: content, transform, opacity;
}
/* * ADD THIS  
 * This sets the base styles for the placeholder grid
 */
.placeholder-card-row {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(1, 1fr); /* 1 column on mobile */
  gap: 16px; /* Match your 400px gap */
}
.products-grid:focus-visible {
  outline: none !important;
}
.woocommerce div.product > a {
  z-index: 99;
}
.product-cart-count-badge.active {
  bottom: 18px !important;
  height: 40px !important;
  width: 40px !important;
}
.add-to-cart-wrapper .add_to_cart_button.ajax_add_to_cart,
.add-to-cart-wrapper .mw_add_to_cart,
.oab-out-of-stock .add-to-cart-wrapper > a {
  max-width: 50%;
}
@media (min-width: 440px) {
  .category-group-description {
    max-width: 100%;
  }
  .add-to-cart-wrapper {
    justify-content: stretch !important;
  }
  .add-to-cart-wrapper .add_to_cart_button.ajax_add_to_cart,
  .add-to-cart-wrapper .mw_add_to_cart,
  .oab-out-of-stock .add-to-cart-wrapper > a {
    width: calc(100% - 32px) !important;
    max-width: none;
    padding: 21px !important;
  }

  .product-cart-count-badge.active {
    left: auto;
    right: calc(100% - 64px) !important;
    bottom: 21px !important;
    height: 36px !important;
    width: 36px !important;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .placeholder-card-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (min-width: 640px) {
  .add-to-cart-wrapper .add_to_cart_button.ajax_add_to_cart,
  .add-to-cart-wrapper .mw_add_to_cart,
  .oab-out-of-stock .add-to-cart-wrapper > a {
    max-width: 170px;
    width: 51% !important;
  }
  .product-cart-count-badge.active {
    left: 16px !important;
    right: auto !important;
  }
}
@media (min-width: 780px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-meta-wrapper {
    padding-top: 0 !important;
  }
  .placeholder-card-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 1.4rem;
  }
  .category-group-description {
    max-width: 80%;
  }
  .product-meta-wrapper {
    padding: 36px 19px 16px 19px !important;
  }
  /* Row for the fake product cards */
  .placeholder-card-row {
    grid-template-columns: repeat(
      4,
      1fr
    ); /* Shows 4 cards per row on desktop */
    gap: 24px;
  }
}

.product-result-count {
  flex-shrink: 0;
}
.filter-option {
  min-width: 200px;
}
@media (max-width: 480px) {
  .category-group-header-wrapper {
    flex-wrap: wrap;
    row-gap: 42px;
  }
  .product-result-count {
    min-width: 100% !important;
  }
  .product-category-wrapper {
    margin-bottom: 15px !important;
    margin: 0 0 24px 0 !important;
    transition: opacity 0.3s ease-in-out; /* Keep opacity if you need fade effects later, but usually GSAP handles this */
  }

  .custom-dropdown-panel {
    min-width: 0px !important;
  }
  .sort-dropdown .option,
  .filter-dropdown .filter-label {
    font-size: 14px;
  }
  .filters-wrapper {
    flex-wrap: wrap;
    row-gap: 24px;
  }

  .dropdown-menu-wrapper.sort-menu,
  .filters-row {
    flex-grow: 1;
  }

  .products-grid {
    gap: 3rem 1rem;
  }
  .product-title,
  .product-price * {
    font-size: 14px !important;
  }
}
.product-price bdi {
  gap: 3px;
  display: flex;
}

@media (max-width: 520px) {
  .mob-full-price del,
  .mob-full-price del * {
    font-size: 14px !important;
  }
  .mob-full-price del svg {
    height: 14px !important;
    width: 14px !important;
  }
}

.product-title {
  margin-bottom: 6px !important;

  font-size: clamp(16px, 1.2vw, 1.38rem) !important;
}
@media (min-width: 400px) and (max-width: 520px) {
  .product-meta-wrapper {
    padding: 4px 14px 14px 12px !important;
  }
  .product-title {
    margin-bottom: 6px !important;
    font-size: 14px !important;
  }
  .product-price del,
  .product-price del * {
    font-size: 13px !important;
  }
  .product-price ins {
    font-size: 14px !important;
  }
}

/* Blur-up LQIP */
.product-thumb {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1; /* avoid GSAP opacity conflicts; gsap handles animation separately */
}

.product-thumb.blur-up {
  filter: blur(8px);
  transform: scale(1.02);
  transition:
    filter 360ms ease,
    transform 360ms ease;
  will-change: filter, transform;
}

.product-thumb.blur-up.lazyloaded {
  filter: none;
  transform: none;
}
.custom-product-card-wrapper.product {
  --cat-rgb-components: var(--oats);
  --cat-color-var: var(--oats);
  --c-glass: #dec9c9;
  --c-light: #fff;
  --c-dark: #000;
  --glass-reflex-dark: 1;
  --glass-reflex-light: 1;
  --saturation: 150%;
  background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
  /* backdrop-filter: blur(8px) saturate(var(--saturation)); */
  /* -webkit-backdrop-filter: blur(8px) saturate(var(--saturation)); */
  box-shadow:
    inset 0 0 0 1px
      color-mix(
        in srgb,
        var(--c-light) calc(var(--glass-reflex-light) * 10%),
        transparent
      ),
    inset 1.8px 3px 0px -2px
      color-mix(
        in srgb,
        var(--c-light) calc(var(--glass-reflex-light) * 90%),
        transparent
      ),
    inset -2px -2px 0px -2px
      color-mix(
        in srgb,
        var(--c-light) calc(var(--glass-reflex-light) * 80%),
        transparent
      ),
    inset -3px -8px 1px -6px
      color-mix(
        in srgb,
        var(--c-light) calc(var(--glass-reflex-light) * 60%),
        transparent
      ),
    inset -0.3px -1px 4px 0px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 12%),
        transparent
      ),
    inset -1.5px 2.5px 0px -2px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 20%),
        transparent
      ),
    inset 0px 3px 4px -2px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 20%),
        transparent
      ),
    inset 2px -6.5px 1px -4px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
        transparent
      ),
    0px 1px 5px 0px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
        transparent
      ),
    0px 6px 16px 0px
      color-mix(
        in srgb,
        var(--c-dark) calc(var(--glass-reflex-dark) * 8%),
        transparent
      );
  border-radius: 24px;
  color: var(--color-text-body, #3b352f);
}
.custom-product-card {
  align-items: center;
  user-select: none;
  /* background-color: rgb(var(--cat-rgb-components, var(--oats))); */
  contain: size;
  display: flex;
  justify-content: center;
  overflow: clip;
  position: relative;
  transition:
    0.4s grid-template-rows var(--ease-out-quint),
    0.4s transform var(--ease-out-cubic);
  border-radius: 24px 24px 0px 0px;
  aspect-ratio: 1 / 1 !important;
  padding: 7px !important;
  height: auto !important;
  width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

/*
 * Performance hint for product card animations
 * This tells the browser to prepare for changes to transform and opacity,
 * often offloading the animation to the GPU for smoother performance.
*/
.products-grid .custom-product-card-wrapper {
  will-change: transform, opacity;
  transform: translateZ(0); /* Promotes to own layer */
}
/* Fix 1: Hides product cards by default to prevent a "flash" on reveal */
.products-grid .custom-product-card-wrapper,
.product-group-swiper .swiper-slide {
  opacity: 0;
}

/* Fix 2: Creates the "mask" for the title/description slide-in animation */
/* This wrapper will hide the text until GSAP slides it up into view */
.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom; /* Prevents a slight jump in some browsers */
}

.custom-product-card img {
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1) 0.1s !important;
  max-height: 100%;
  border-radius: 18px;

  /* TODO Remove once images are proper png */
  mix-blend-mode: multiply;
}

/*
 * Only apply the scale effect when the swiper is NOT being dragged.
 * This prevents the CSS transform from fighting with Swiper's JS transform.
*/
/* 2. Apply the scale effect on hover EVERYWHERE by default */
.custom-product-card-wrapper:hover .custom-product-card img {
  transform: scale(1.03);
}
.product-group-swiper.swiper-grabbing
  .custom-product-card-wrapper:hover
  .custom-product-card
  img {
  transform: none !important; /* This overrides the rule above */
}
.product-cart-icon,
.cart-actions {
  min-height: 100%;
  width: 100%;
  height: 100%;
}
.product-cart-icon {
  cursor: pointer;
}
.product-cart-icon.disabled,
.cart-plus.disabled {
  cursor: auto;
  opacity: 0.2;
}
/* fallback: if you want to use var(--cat-color-var) when your :root variables are rgb() strings */
.custom-product-card .h-full.w-full.block.fallback {
  background: var(--cat-color-var);
}

.product-group-swiper .swiper-slide {
  height: -webkit-fill-available !important;
}
.add-to-cart {
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-heading);
  flex-direction: column;
  font-weight: 600;
  z-index: 30;
  background: rgba(var(--cat-rgb-components), 1);
  padding: 8px;
  overflow: hidden;
  max-height: 40px;
  display: flex;
  justify-content: center;
  gap: 40px;
  min-width: 65px !important;
  width: 90px;
  height: 40px;
}

.custom-product-card-wrapper.loading .add-to-cart {
  animation: pulse 1.3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.custom-product-card-wrapper.loading .cart-minus,
.custom-product-card-wrapper.loading .cart-plus {
  cursor: default;
}
.custom-product-card-wrapper .cart-minus svg,
.custom-product-card-wrapper .cart-plus svg {
  flex-shrink: 0;
}
@keyframes oab-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}

.ajax_add_to_cart.loading,
.add-to-cart-wrapper .mw_add_to_cart.loading {
  animation: oab-pulse 0.9s ease-in-out infinite;
  pointer-events: none; /* prevent double clicks */
}
@media (min-width: 1025px) {
  .add-to-cart-wrapper .add_to_cart_button.ajax_add_to_cart,
  .add-to-cart-wrapper .mw_add_to_cart,
  .oab-out-of-stock .add-to-cart-wrapper > a {
    box-shadow: none !important;
  }
  .add-to-cart-wrapper > a.added_to_cart.wc-forward {
    position: absolute;
    left: 21px;
    font-size: 12px;
    z-index: 90;
  }
  .add-to-cart-wrapper .product-price {
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      filter 0.25s ease;
  }

  .add-to-cart-wrapper:has(.ajax_add_to_cart.added) .product-price,
  .add-to-cart-wrapper:has(.mw_add_to_cart.added) .product-price {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    filter: blur(2px);
  }

  .mob-full-price {
    display: none;
  }
  .custom-product-card-wrapper:hover .add-to-cart-wrapper {
    transform: translateY(0);
  }
  .add-to-cart-wrapper {
    position: absolute;
    left: 0;
    z-index: 2;
    right: 0;
    bottom: 0;
    height: 145px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
    /* transition: all 0.7s cubic-bezier(0.76, 0, 0.24, 1); */
    transform: translateY(150%);

    border-radius: 24px;
    background: transparent;
    height: 94px;
    background: white;
    border-radius: 14px;
    padding: 7px 10px;
    cursor: default;
    justify-content: space-around;
    gap: 14px;
    width: 75%;
    max-width: 90%;
    min-width: fit-content;
    height: fit-content;
    margin: 0 auto;
    margin-bottom: 18px;
  }
  .product-price {
    display: flex;
    font-weight: 600 !important;
    color: var(--color-text-h4) !important;
  }
  .product-meta-wrapper {
    justify-content: start !important;
    padding: 10px 19px 24px 21px !important;
  }

  .mob-add-to-cart-btn {
    display: none;
  }

  /* Create the background with low opacity by default */
  .product-meta-wrapper::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 107%;
    border-radius: 24px; /* Match the card radius */
    z-index: 1; /* Place it behind the product content and button (which has z-index 30) */
    backdrop-filter: blur(3px);
    /* Set the background color/gradient */
    /* background: linear-gradient(180deg, #f2ede680, #f2ede6a6); */
    /* use the parsed r,g,b components */
    background: linear-gradient(
      180deg,
      rgba(var(--cat-rgb-components), 0.5),
      rgba(var(--cat-rgb-components), 0.65)
    );
    /* Start fully transparent */
    opacity: 0;

    /* Long, smooth transition for a slow fade-in/fade-out effect (the "linger") */
    transition: opacity 1.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* On hover, make the background fully visible */
  .custom-product-card-wrapper:hover {
    /* Fade in the background */
    background: linear-gradient(
      180deg,
      rgba(var(--cat-rgb-components), 0.5),
      rgba(var(--cat-rgb-components), 0.65)
    );

    /* Speed up the fade-in for the hover state */
    transition-duration: 0.8s;
  }

  .custom-product-card-wrapper:hover .add-to-cart-wrapper {
    transform: translateY(0);
  }

  .category-group-description {
    max-width: 60%; /* Adjust as needed */
  }
  .product-cart-count-badge {
    display: none;
  }
  .product-cart-count-badge.active {
    display: block;
    border-radius: 50%;
    background: var(--color-accent-subtle);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 18px;
    height: 36px;
    width: 36px;
    min-height: 34px;
    min-width: 34px;
    max-height: 34px;
    max-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3px;
  }
}

.cart-actions .cart-minus {
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  font-weight: 600;
  width: 100%;
  justify-content: center;
  display: flex;
  color: var(--color-accent);
  border-radius: 0 0 38px 38px;
  z-index: 90;
  align-items: center;
  font-size: 21px !important;
  margin-top: 2px;
}
.cart-actions .cart-plus {
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  justify-content: center;
  align-items: center;
  display: flex;

  color: var(--color-accent);
  border-radius: 38px 38px 0 0;
  height: 100%;
  font-size: 22px !important;
  padding-top: 1px;
  z-index: 90;
  transition: all 0.3s ease-in-out;
}
.product-cart-icon:hover svg {
  transform: rotateZ(-6deg);
}
.cart-minus:hover,
.cart-plus:hover {
  color: var(--color-btn-secondary-text);
}
.cart-minus:focus,
.cart-plus:focus {
  transform: scale(0.95);
}
.add-to-cart.active .product-cart-icon,
.add-to-cart.active .cart-actions {
  transform: translateY(-100%);
}

.add-to-cart .product-cart-icon {
  transform: translateY(40px);
  transition: all 0.3s ease-in-out;
  min-height: 40px;
}

.add-to-cart .cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: auto;
  transform: translateY(0);
  transition: all 0.3s ease-in-out;
  min-height: 40px;
}
.product-cart-count {
  height: 100%;
  display: flex;
  position: relative;
  align-items: center;
  z-index: -1;
  justify-content: center;
  padding-top: 4px;
  font-size: 14px;
  color: var(--color-text-h2);
}

.custom-product-card-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  text-align: center;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* background-color: #f5f5f3; */
  /* box-shadow: 0 0 8px #0000001a; */
}

.product-cart-icon svg {
  height: 21px;
  transition: all 0.2s ease-in-out;
  width: 21px;
  color: var(--color-accent);
}
.product-meta-wrapper {
  display: flex;
  gap: 8px;
  flex-grow: 1;
  justify-content: space-between !important;
  width: 100%;
  text-align: start;
  align-items: start;
  /* color of the category */
  /*background: rgb(var(--cat-rgb-components, var(--oats))); */
  border-radius: 0 0 20px 20px;
  padding: 22px 19px 21px 19px;
  position: relative;
  overflow: visible;
}
.add-to-cart-wrapper .add_to_cart_button.ajax_add_to_cart,
.add-to-cart-wrapper .mw_add_to_cart,
.oab-out-of-stock .add-to-cart-wrapper > a {
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-heading);
  flex-direction: column;
  font-weight: 500;
  z-index: 30;
  background: var(--cat-olive-oils);
  padding: 8px;
  overflow: hidden;
  max-height: 40px;
  display: flex;
  justify-content: center;
  gap: 40px;
  min-width: 65px !important;
  /*width: 90px !important;*/

  height: 40px;
}

/* Turn Add to Cart text into a + */
.woocommerce a.add_to_cart_button,
.oab-out-of-stock .add-to-cart-wrapper > a,
.woocommerce button.add_to_cart_button {
  position: relative;
  font-size: 0; /* hide text safely */
}

.woocommerce a.add_to_cart_button::before,
.woocommerce button.add_to_cart_button::before,
.oab-out-of-stock .button::before {
  content: "+";
  border-bottom-left-radius: 50%;
  padding-top: 6px;
  font-size: 24px;
  position: absolute;
  color: var(--color-text-h4) !important;
}

a.mw_add_to_cart.button.product_type_simple.add_to_cart_button.ajax_add_to_cart::before,
.oab-out-of-stock .add_to_cart_button,
.oab-out-of-stock .ajax_add_to_cart,
.oab-out-of-stock .mw_add_to_cart::before {
  content: "+";
  border-bottom-left-radius: 50%;
  padding-top: 6px;
  font-size: 24px;
  color: var(--color-text-h4) !important;
}
.add-to-cart-wrapper .ajax_add_to_cart > span,
.add-to-cart-wrapper .mw_add_to_cart > span {
  display: none;
}

.product-title a {
  text-align: start;
  color: var(--color-text-body) !important  ;
}
.product-price * {
  color: var(--color-text-h4) !important;
  font-weight: 600 !important;
  font-size: clamp(0.875rem, 0.83rem + 0.19vw, 1rem);
}
.product-price del,
.product-price del * {
  color: var(--color-text-h6) !important;
  font-size: clamp(0.75rem, 0.71rem + 0.19vw, 0.875rem);
}
.product-meta-wrapper > span > del > span > bdi *,
.product-meta-wrapper > span > del > span > bdi,
.product-meta-wrapper > span > del {
  color: var(--color-text-h6) !important;
  font-size: clamp(0.75rem, 0.71rem + 0.19vw, 0.875rem);
}
.product-price:has(del) {
  column-gap: 8px;
}
.product-price {
  flex-direction: row;

  max-width: 95%;
  align-items: center;
  justify-content: center;
  row-gap: 12px;
}
.add-to-cart-wrapper .product-price {
  /*background: white;*/
  /*border-radius: 14px;*/
  /*padding: 10px 21px 10px 10px;*/
  cursor: default;
  justify-content: space-between;
  gap: 32px;
}
.product-price ins {
  text-decoration: none !important;
}

.category-pill {
  outline: none !important;
  user-select: none;
  white-space: nowrap; /* Prevent text from wrapping */
  display: inline-block;
  border-radius: 17px;
  font-size: 16px;
  padding: 4px;
  transition: all 0.3s ease-in-out;
  background-color: transparent;
  border: 1px solid transparent;
  will-change: transform, opacity;
}

.product-category-swiper .category-pill:not(.is-animating):hover {
  transform: translateY(-5px) !important;
}
.product-category-swiper .swiper-slide {
  padding-top: 6px;
}
.category-pill.active {
  background: rgb(var(--cat-rgb-components, var(--oats-fruit)));
  outline: none !important;
  border: 1px solid var(--color-footer-bg);
}

/*
 * Expanding Category Description Styles (GSAP Version)
 */

.category-description {
  --cat-desc-bg: var(
    --color-nutrition-bg
  ); /* IMPORTANT: Change this to your div's background color! */
  --gradient-opacity: 1; /* Variable for GSAP to animate */

  position: relative;
  max-height: 150px; /* The initial collapsed height */
  overflow: hidden;

  /* REMOVED the 'transition' property from here */
}

.category-description > p:last-of-type {
  padding-bottom: 2.5rem;
  margin-bottom: 0;
}

.category-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  background: linear-gradient(to bottom, transparent, var(--cat-desc-bg));
  pointer-events: none;
  opacity: var(--gradient-opacity); /* Use the variable */

  /* REMOVED the 'transition' property from here */
}
.cat-read-more svg {
  stroke: #3b352f;
  transition: transform 0.3s ease-in-out;
}
.cat-read-more:hover {
  background-color: #97b88f;
}
.cat-read-more:hover svg {
  transform: translateY(2px);
}
.cat-read-more {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  background-color: #a9c5a2;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease-in-out;

  /* REMOVED the 'transition' property from here */
}
.category-header {
  margin-bottom: 21px;
  height: fit-content;
  display: flex;
  flex-direction: column;
}
.category-title {
  text-align: center;
  margin-bottom: 21px;
  color: var(--color-badge-bg);
  opacity: 0;
  /* transform: translateY(15px); */
}
.cat-long-description-wrapper {
  border: 1px solid var(--color-nutrition-border);
  overflow: hidden;
  margin-top: 120px;
  background: var(--color-nutrition-bg);
  padding: 48px;
  border-radius: 21px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.cat-long-description-wrapper hr {
  display: none;
}
.cat-long-description-wrapper p {
  margin-bottom: 16px;
}
.cat-long-description-wrapper h2 {
  margin-bottom: 21px;
}
.cat-long-description-wrapper h3 {
  margin-bottom: 12px;
}
.cat-long-description-wrapper h4 {
  margin: 34px 0 10px 0;
  font-size: 19px;
}

.cat-long-description-wrapper ul {
  padding-right: 15px;
  margin: 18px 0;
}
.cat-long-description-wrapper li {
  list-style: disc !important;
  padding: 6px 8px;
}

.category-description-brief {
  max-width: 80%;
  margin: 0 auto;
  text-align: justify;
  opacity: 0;
  /* transform: translateY(15px); */
  margin-bottom: 48px;
}
.category-description h2,
.category-description h2 * {
  color: var(--color-text-h2) !important;
}

.category-description h3,
.category-description h3 * {
  color: var(--color-accent) !important;
}

/* On Nutrition Background */
.category-description h4,
.category-description h4 * {
  color: var(--color-text-h4) !important; /* #6a6159 - Good for small headers */
}

/* AVOID H5 and H6 on this background if possible, or force them darker: */
.category-description h5,
.category-description h5 *,
.category-description h6,
.category-description h6 * {
  color: var(
    --color-text-muted
  ) !important; /* #5c534d - Forces better contrast */
}

/* Hides Swiper sliders until they are initialized */
.swiper.is-loading .swiper-wrapper {
  visibility: hidden;
  opacity: 0;
}

/* Fades sliders in once Swiper is ready */
.swiper.is-ready .swiper-wrapper {
  visibility: visible;
  opacity: 1;
  /* transition: opacity 0.3s ease; */
}

/* --- Grouped Product View Styles --- */

/* Styles for the product sliders */

/* * Hide sliders until initialized to prevent FOUC (Flash of Unstyled Content).
    * A placeholder height prevents the page from "jumping" as sliders load in.
    */
.product-group-swiper.is-loading {
  opacity: 0;
  visibility: hidden;
  height: 400px; /* Adjust this height to roughly match your product card height */
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.03);
}

/* Fade sliders in smoothly once Swiper is ready */
.product-group-swiper.is-ready {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

/* Hides grid products initially for GSAP animation */

.product-category-wrapper {
  width: 100%;
  position: relative;
  border-bottom: none;
  margin: 0 0 54px 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: border-bottom 0.3s ease;
}

.product-category-swiper .category-pill {
  /* Ensure individual pills also start hidden */
  opacity: 0;
  /* transform: translateY(15px); */
}
.filters-wrapper {
  opacity: 0;
  position: relative;
  z-index: 2 !important;
  /* transform: translateY(15px); */
}
.product-category-swiper .swiper-slide {
  width: fit-content; /* fit content */
}
.product-category-swiper .swiper-wrapper {
  width: max-content;
}
.product-group-swiper,
.product-group-swiper .swiper-wrapper {
  border-radius: 24px;
}
.category-name {
  max-width: 95px;
  white-space: pre-wrap;
  justify-content: center;
  align-items: center;
  display: flex;
  text-align: center;
  font-size: 14px;
  margin-top: 5px;
}
.category-pill:focus,
.category-pill:focus-visible,
.category-pill:focus-within {
  outline: none !important;
  border-color: transparent !important;
}
.categroy-swatch {
  background: none;
  height: fit-content;

  font-size: 15px;

  border: none;
}
.categroy-swatch-img {
  background: var(--color-card-overlay-bg);
  aspect-ratio: 1 / 1;
  width: fit-content;
  display: block;
  height: fit-content;
  border-radius: 14px;
  /* Add a subtle border and a drop shadow */
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    /* Soft drop shadow */ 0 2px 4px -1px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8); /* Top inner highlight (The 3D trick) */

  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth spring feel */
  transform: translateY(0);
}
.categroy-swatch-img img {
  border-radius: 14px;
  background: var(--color-top-nav-bg);
  width: 95px;
  height: 95px;
  min-width: 95px;
  min-height: 95px;
  max-width: 95px;
  max-height: 95px;
  transition: all 0.3s ease-in-out;
  will-change: height;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* prevent the loading glitch */
.product-category-swiper .swiper-slide {
  /* This value MUST match the `spaceBetween` in your JS */
  margin-right: 12px;
}
.floating-fab {
  display: none; /* Hidden on desktop */
}

/* FORCE COMPACT SLIDES ON MOBILE */
@media (max-width: 768px) {
  .product-category-swiper .swiper-wrapper {
    /* Ensure wrapper behaves like a flex container */
    display: flex;
  }
  .floating-fab {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Start hidden */
    padding: 12px 24px;
    border-radius: 50px;
    /* Shadow: A soft green-tinted shadow */
    z-index: 999;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    /* CRITICAL: Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    /* Background: Dark warm grey with 85% opacity */
    background-color: rgba(
      59,
      53,
      47,
      0.85
    ) !important; /* Based on --color-text-body */
    color: #fff;

    /* The Blur Effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Border: Subtle light border to define edges */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;

    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }

  .floating-fab.is-visible {
    transform: translateX(-50%) translateY(0);
  }

  /* Hover state (for desktop testing) */
  @media (hover: hover) {
    #mobile-floating-filter-btn:hover {
      background-color: rgba(59, 53, 47, 1) !important; /* Solid on hover */
      transform: translateX(-50%) translateY(-2px);
    }
  }
  /* Active state for mobile (instant feedback) */
  .floating-fab:active {
    transform: translateX(-50%) scale(0.95);
  }
  .product-category-swiper .swiper-slide {
    /* Crucial: Tells the slide to be exactly as wide as its content */
    width: auto !important;
    min-width: 0;
    flex-shrink: 0;
    margin-right: 12px; /* Gap between slides */
  }

  .product-category-swiper .category-pill {
    /* Ensure the pill doesn't try to fill a phantom container */
    width: max-content;
    white-space: nowrap;
  }

  /* Optional: Make the text smaller on mobile to save space */
  .product-category-swiper .category-name {
    font-size: 13px;
  }
}
/* --- Skeleton Placeholder Styles --- */

/* This applies the shimmer animation to any placeholder element.
  The magic is a large gradient that we slide from right to left.
*/

/* Style for the product count placeholder */
.product-result-count .count-placeholder {
  width: 90px;
  height: 24px;
  background-color: #eef0f2; /* A light base color */
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.no-products-found-grouped {
  text-align: center;
  padding: 80px 20px;
  width: 100%;
}
.fav-discount-wrapper {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;

  z-index: 105 !important;
}
.main-image-container .fav-discount-wrapper {
  z-index: 10 !important;
}
.fav-discount-wrapper.discounted {
  direction: rtl;
}
.fav-discount-wrapper {
  direction: ltr;
}
/* Favorite Button Styling */
.favorite-btn {
  background: #fdfdfd85;
  box-shadow: 0 8px 30px rgb(42 42 42 / 15%);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  backdrop-filter: blur(6px);
  /* border: 1px solid #e6ded59c; */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.favorite-btn .heart-icon {
  width: 18px;
  height: 18px;
  stroke: #bcb4b4; /* Icon outline color */
  stroke-width: 2;
  fill: transparent; /* Make the inside transparent by default */
  transition: all 0.2s ease-in-out;
}
.favorite-btn:not(.loading):hover .heart-icon {
  fill: var(--color-primary);
  stroke: var(--color-primary);
}
/* Active state for when a product is a favorite */
.favorite-btn.active .heart-icon {
  fill: var(--color-primary);
  stroke: var(--color-primary);
}

/* Loading state to prevent double-clicks */
.favorite-btn.loading {
  opacity: 0.4;
  cursor: default;
}

/* Make sure your shimmer animation is available */

.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-card-bg) 25%,
    var(--color-content-bg) 50%,
    var(--color-card-bg) 75%
  );
  background-size: 200% 100%;
  /* This is the only line that needs to change */
  animation: shimmer 3s infinite ease-in-out;
}
.product-placeholder {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.placeholder-image {
  width: 100%;
  aspect-ratio: var(--card-aspect-ratio);
  /* Set the base color to your card background color */
  background-color: var(--color-card-bg);
  border-radius: 1rem;
}

.placeholder-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 5px;
}

.placeholder-text {
  height: 18px;
  /* Also set the text base color to your card background color */
  background-color: var(--color-card-bg);
  border-radius: 4px;
}

.placeholder-text.long {
  width: 90%;
}

.placeholder-text.short {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/*
    * Prevents FOUC (Flash of Unstyled Content) for product grid animations.
    * Hides product cards initially; GSAP will animate them to opacity: 1.
    */
/* Hides grid products initially for GSAP animation, but NOT our placeholders */
.products-grid > *:not(.product-placeholder) {
  opacity: 0;
}

.category-group-title {
  font-size: 24px;
  font-weight: 600;
  text-align: right;
  margin-bottom: 14px;
}
/* This wrapper is used as the animation trigger and container */
/* This is the new masking container */
.text-mask {
  overflow: hidden; /* This is the key property for the effect */
}

.category-group-description p {
  color: var(--color-text-h4);
}

.product-category-group {
  margin-bottom: 112px;
  /* Optional: keeps layout stable without breaking GSAP */
  contain: layout;
}
.product-group-swiper {
  padding: 2rem 0 !important;
}
.cat-swiper-nav-wrapper {
  display: flex;
  justify-content: end;
  gap: 20px;
}
.category-group-header-wrapper {
  display: flex;
  align-items: end;
  gap: 50px;
  justify-content: space-between;
}

.cat-swiper-button-prev,
.cat-swiper-button-next {
  align-items: center;
  background-color: rgb(var(--cat-rgb-components, var(--oats)));
  border-radius: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  height: 42px;
  justify-content: center;
  position: relative;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  width: 42px;
}

.icon-arrow {
  stroke: var(--color-text-h5);
}

.cat-swiper-button-prev .icon-arrow {
  transform: rotate(180deg);
}
/* Style for ANY disabled Swiper navigation arrow */
[class*="cat-swiper-button-"].swiper-button-disabled {
  opacity: 0.35; /* Make it look faded */
  cursor: not-allowed; /* Show a 'not-allowed' cursor on hover */
  pointer-events: none; /* Make the button unclickable */
}
/* ===================================================================
 * SHARED DROPDOWN STYLES (For Both Sort & Filter)
 * =================================================================== */

/* A generic wrapper for positioning dropdowns */
.dropdown-menu-wrapper {
  position: relative;
}

/* A generic style for the main trigger buttons */
.dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;

  border-radius: 99px; /* Pill shape */
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;

  border-radius: 10px;
  background: var(--color-card-bg) !important;
  border: 1px solid var(--color-card-border);
}

.dropdown-btn:hover {
  background-color: var(--color-card-border);
}

.dropdown-btn svg {
  flex-shrink: 0; /* Prevents icon from squishing */
}

/* A generic style for the dropdown panels */
.custom-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  min-width: 240px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 50;
  list-style: none; /* Removes bullets from ul */
  margin: 0;
  will-change: opacity, transform;

  /* Initial hidden state for animation */
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  /* Default Origin (Top Left) */
  transform-origin: top left;
  z-index: 800 !important;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
}
#filter-dropdown-panel {
  left: 0;
  right: auto !important;
}
#sort-dropdown-panel.is-open {
  right: 0;
  left: auto !important;
  /* Animate from the right corner so it doesn't drift */
  transform-origin: top right;
}
/* Visible state for any dropdown */
.custom-dropdown-panel.is-open {
  opacity: 1;

  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ===================================================================
 * FILTER MENU SPECIFIC STYLES
 * =================================================================== */

/* Main container for positioning */
.filter-menu {
  margin-left: auto; /* Pushes the filter to the right of the sort */
}

/* The little number badge */
.filter-count {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
}
.product-result-count {
  min-width: 114px;
  color: var(--color-text-body);
}

/* A single filter option row */
.filter-dropdown .filter-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.filter-dropdown .filter-option:hover {
  background-color: var(--color-content-bg);
}

.filter-dropdown .filter-label {
  font-size: 15px;
}

/* The iOS Style Swatch */
.filter-dropdown .filter-swatch {
  position: relative;
  width: 50px;
  height: 27px;
  background-color: var(--color-border-subtle);
  border-radius: 99px;
  transition: background-color 0.3s ease;
}

.filter-dropdown .swatch-indicator {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 26px;
  height: 23px;
  background-color: var(--color-content-bg);
  border-radius: 19px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy ease */
}

/* Active state for the swatch */
.filter-dropdown .filter-option.active .filter-swatch {
  background-color: var(--color-btn-secondary-border);
}

.filter-dropdown .filter-option.active .swatch-indicator {
  transform: translateX(-18px);
}

/* ===================================================================
 * SORT MENU SPECIFIC STYLES
 * =================================================================== */

.sort-dropdown .option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  transition: color 0.3s ease;
  color: var(--color-text-h6);
}

.sort-dropdown .option:hover {
  color: var(--color-text-h2);
}

.sort-dropdown .option .check-icon {
  opacity: 0; /* Hidden by default */
  transform: scale(0.5);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  color: var(--color-btn-secondary-border);
}

/* Style for the currently selected sort option */
.sort-dropdown .option.selected {
  font-weight: 600;
  color: var(--color-btn-secondary-border);
}

.sort-dropdown .option.selected .check-icon {
  opacity: 1; /* Make checkmark visible */
  transform: scale(1);
}

.dropdown-btn svg {
  stroke: var(--color-text-h2);
  height: 19px;
}

/* -- Grouped View Placeholder Styles -- */
.grouped-view-placeholder {
  width: 100%;
}

.placeholder-group {
  margin: 40px 0 80px;
}

/* Mimics the category title */
.placeholder-group-title {
  height: 38px;
  width: 250px;
  max-width: 40%;
  margin-bottom: 28px;
  border-radius: 8px;
}

/* Mimics a single product card */
.placeholder-product-card {
  border-radius: 16px;
  aspect-ratio: var(
    --card-aspect-ratio
  ); /* Use a ratio that matches your real cards */
}

.product-thumb {
  aspect-ratio: var(--card-aspect-ratio);
}

/* Responsive adjustments for the placeholder grid */

/* Mimics a single product card */
.placeholder-product-card {
  border-radius: 16px;
  aspect-ratio: var(
    --card-aspect-ratio
  ); /* Use a ratio that matches your real cards */
}

/* SAFE: Hides outline only on the layout containers */
#product-display-area,
#products-grid-view,
.products-grid {
  outline: none !important;
}

/* SAFE: Hides outline ONLY when focus is programmatic (clicked by script, not keyboard) */
#product-display-area:focus,
#product-display-area:focus-visible,
.products-grid:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* CRITICAL: Ensures links INSIDE the grid still show they are selected */
.products-grid a:focus-visible,
.products-grid button:focus-visible {
  outline: 2px solid var(--color-accent, #000); /* Or your theme color */
  outline-offset: 2px;
}

.swiper-slide:focus-visible,
.swiper-slide:focus-within,
.swiper-slide:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* 1. Ensure the pills default to visible and reset if no JS intervenes */
.product-category-swiper .category-pill {
  /* Set default state to "Reset" */
  transform: translateY(0);
  opacity: 1;
  will-change: transform, opacity;
}

/* 2. Only hide them when the JS specifically adds the animation class */
.product-category-swiper .category-pill.is-animating {
  transition: none !important;
  pointer-events: none;
}

/* 3. Mobile Override: Force reset on small screens if they get stuck */
@media (max-width: 768px) {
  .product-category-swiper .category-pill:not(.is-animating) {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Ensure pills are visible by default unless the JS specifically explicitly hides them for animation */
.product-category-swiper .category-pill {
  opacity: 1;
  transform: none;
}

/* Only hide them when the JS adds this specific class */
.product-category-swiper .category-pill.is-animating {
  opacity: 0;
  transform: translateY(15px);
}

/* Default: HIDE the button (Guests see this) */
.favorite-btn.user-auth-btn {
  display: none !important;
}

/* Logged In: SHOW the button (Users see this instantly) */
body.logged-in .favorite-btn.user-auth-btn {
  display: flex !important;
}

.add_to_cart_button.ajax_add_to_cart,
.oab-out-of-stock .add-to-cart-wrapper > a,
.add_to_cart_button.mw_add_to_cart {
  box-shadow: none !important;
}

@media (max-width: 1024px) {
  .product-meta-wrapper > div {
    align-items: center;
  }
  .add-to-cart-wrapper .product-price {
    padding: 0 !important;
    padding-bottom: 10px !important;
    padding-top: 0 !important;

    gap: 9px !important;
  }
  .product-title {
    text-align: center !important;
    margin-bottom: 0 !important;
  }
  .add-to-cart-wrapper .product-price {
    flex-wrap: wrap-reverse;
    display: flex;
    align-items: center;
    justify-content: center !important;
    box-shadow: none !important;

    padding: 6px;
  }
  .product-price * {
    font-size: 16px !important;
    text-align: center;

    justify-content: center;
  }
  .product-price del,
  .product-price del * {
    font-size: 14px !important;
  }

  .add_to_cart_button.ajax_add_to_cart,
  .oab-out-of-stock .add-to-cart-wrapper > a,
  .add_to_cart_button.mw_add_to_cart {
    box-shadow: inset 0 0 0 1px #6b585838 !important;
    border-radius: 35px;

    width: 150px !important;
    margin-top: 5px;
    width: 57% !important;

    border-radius: 34px !important;
    margin-bottom: 6px;
    background: transparent !important;
  }
  .product-price .add-to-cart {
    box-shadow: inset 0 0 0 1px #6b61584a;
    border-radius: 35px;

    width: 150px !important;
    margin-top: 5px;
  }
  .added_to_cart.wc-forward {
    display: none;
  }
  .add-to-cart-wrapper {
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
  }
  /*
 * =======================================================
 * Professional Add-to-Cart Button Styles
 * =======================================================
 */

  /* 1. The Main Button Container */
  /* This is the "frame" for your button. */
  .add-to-cart {
    /* Sizing & Shape */
    max-height: 40px; /* Crucial: This defines the "window" */
    width: 100% !important;
    min-width: 65px;
    border-radius: 10px;

    /* Appearance */
    /* Uses the background variable from your original file */
    background: transparent !important;
    /* background: rgba(var(--cat-rgb-components), 1); */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

    /* Functional */
    overflow: hidden; /* Crucial: Hides the other state */
    position: relative;

    /* These are from your HTML, just here for clarity */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* 2. The Two Internal States (Icon & Stepper) */
  /* This styles BOTH children to be the same size and ready to slide */
  .product-cart-icon,
  .cart-actions {
    min-height: 40px; /* Match the parent's max-height */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Animation */
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
  }

  /* 3. The Initial "Add" Icon State */
  .product-cart-icon {
    cursor: pointer;
  }
  .product-cart-icon svg {
    height: 22px;
    width: 22px;
    color: var(--color-accent);
    transition: transform 0.2s ease;
  }
  .product-cart-icon:hover svg {
    transform: scale(1.1);
  }

  /* 4. The "Active" Stepper State */
  .cart-actions {
    justify-content: space-between;
    padding: 0 10px; /* Give the +/- buttons some space */
  }

  /* 5. The Stepper Components (+ / - / count) */
  .cart-actions .cart-plus,
  .cart-actions .cart-minus {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex; /* Helps center the SVG */
    align-items: center;
    justify-content: center;
  }

  .cart-actions svg {
    height: 20px;
    width: 20px;
    color: var(--color-accent);
    transition: color 0.2s ease;
  }

  /* Stepper hover effect */
  .cart-actions .cart-plus:hover svg,
  .cart-actions .cart-minus:hover svg {
    color: var(--color-text-h2); /* A darker color on hover */
  }

  .cart-actions .product-cart-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-h2);
    min-width: 20px; /* Prevents jiggle when going from 9 to 10 */
    text-align: center;
  }

  /* 6. The "Out of Stock" / Disabled State */
  .product-cart-icon.disabled,
  .cart-plus.disabled,
  .cart-minus.disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  /*
 * =======================================================
 * THE ANIMATION
 * =======================================================
 */
  /* price default (visible) */
  .add-to-cart-wrapper .product-price {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
    will-change: opacity, transform;
  }

  /* * When you add the "active" class, this slides BOTH elements up.
 * The ".product-cart-icon" slides up and out of view.
 * The ".cart-actions" slides up INTO view.
*/
  .add-to-cart.active .product-cart-icon,
  .add-to-cart.active .cart-actions {
    transform: translateY(-100%);
  }

  .mob-full-price:has(del) {
    column-gap: 12px;
  }
  .product-meta-wrapper {
    padding: 19px 19px 16px 19px !important;
  }
  .products-grid {
    gap: 3rem 1rem;
  }
  .mob-full-price {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 3px;
    display: flex;
  }
  .fav-discount-wrapper {
    top: 14px !important;
    left: 14px !important;
    right: 14px !important;
  }
  .discount-badge {
    border-radius: 48px !important;
    padding: 5px 12px !important;
    user-select: none;
  }
  .mob-full-price del,
  .mob-full-price del * {
    color: var(--color-text-h6) !important;
    font-size: 15px !important;
    font-weight: 500;
  }

  .price-only {
    display: none;
  }
  .add-to-cart-wrapper {
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
  }
  .product-cart-count-badge {
    display: none;
  }
  .product-cart-count-badge.active {
    display: flex;
    color: var(--color-accent);
    background: var(--color-accent-subtle);
    position: absolute;
    left: 18px;
    bottom: 21px !important;
    padding: 7px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    width: 36px !important;
    height: 36px !important;
    display: flex;
    align-items: center !important;
    justify-content: center;
    padding-top: 9px;
  }
  .mob-add-to-cart-btn {
    border-radius: 40px;
    font-size: 0.8rem;
    flex-direction: row-reverse;
    width: 100%;
    box-shadow: inset 0 0 0 1px var(--color-btn-secondary-border);
    color: var(--color-btn-secondary-border);
    padding: 5px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }
  .mob-add-to-cart-btn * {
    color: var(--color-btn-secondary-text);
  }
  .product-price {
    display: none;
  }
  .product-meta-wrapper {
    gap: 6px !important;
  }

  .cart-actions .cart-minus,
  .cart-actions .cart-plus {
    color: var(--color-text-h4) !important;
    font-size: 21px !important;
  }
  .custom-product-card-wrapper .add-to-cart-wrapper {
    transform: translateY(0);
    position: relative;
    flex-grow: 1;
  }
  .product-cart-icon svg {
    height: 17px !important;
  }
  .add-to-cart-wrapper .product-price {
    display: flex;
    max-width: 100% !important;
    background-color: transparent !important;
    border-radius: 40px !important;
    font-size: 0.8rem !important;
    flex-direction: row-reverse;
    width: 100%;
    box-shadow: inset 0 0 0 1px #6b61584a;
    color: var(--color-btn-secondary-border);

    display: flex;
    align-items: stretch !important;
    height: fit-content;
  }

  .product-meta-wrapper {
    flex-direction: column;
  }
  .product-meta-wrapper > div {
    height: auto;
  }

  .product-meta-wrapper {
    padding: 8px !important;
    justify-content: space-between !important;
    padding-bottom: 12px !important;
  }
}
/* Position the badge over the image */
.custom-product-card {
  position: relative;
  overflow: hidden; /* Ensures badge stays inside rounded corners */
}

/* The "Not In Stock" Badge Style */
.oab-badge-out-of-stock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Center it exactly */
  background-color: rgba(100, 100, 100, 0.9); /* Dark Grey background */
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none; /* Let clicks pass through to the product link */
  white-space: nowrap;
}

/* Optional: Grey out the image when out of stock */
.oab-out-of-stock .product-thumb {
  opacity: 0.6;
  filter: grayscale(100%);
}

/* Optional: Hide specific elements when out of stock */
.oab-out-of-stock .add_to_cart_button,
.oab-out-of-stock .ajax_add_to_cart,
.oab-out-of-stock .mw_add_to_cart {
  /* Styles for the button when out of stock */
  opacity: 0.5;
  pointer-events: none; /* Prevent clicking if it didn't change automatically */
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  #respond
  input#submit:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  a.button:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  button.button:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  input.button:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  #respond
  input#submit:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  a.button:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  button.button:hover,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  input.button:hover {
  background-color: var(--color-nutrition-bg) !important;
}
