/* Homepage featured products only. Preserve the shared header and commerce UI. */
body.alavus-custom-theme main .alavus-home-products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 32px 24px !important;
  padding: 0;
}

body.alavus-custom-theme main .alavus-home-products ul.products::before,
body.alavus-custom-theme main .alavus-home-products ul.products::after {
  display: none !important;
}

body.alavus-custom-theme main .alavus-home-products ul.products li.product {
  position: relative;
  display: flex !important;
  flex-direction: column;
  float: none;
  width: auto !important;
  min-width: 0;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #dedbd3;
  border-radius: 0 !important;
  background: #faf8f3;
  text-align: center;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 250ms ease;
}

body.alavus-custom-theme main .alavus-home-products li.product > .woocommerce-loop-product__link {
  position: relative;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  height: auto !important;
  margin: 0;
  padding: 0 !important;
  color: #24231f;
  text-decoration: none;
}

body.alavus-custom-theme main .alavus-home-products li.product .woocommerce-loop-product__link > img {
  display: block;
  width: 100% !important;
  max-width: none;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none;
  transform: none !important;
  clip-path: inset(0);
  transition: transform 550ms cubic-bezier(.2, .65, .3, 1), clip-path 550ms cubic-bezier(.2, .65, .3, 1);
}

body.alavus-custom-theme main .alavus-home-products li.product .woocommerce-loop-product__title {
  min-height: 3em;
  margin: 0 0 12px !important;
  padding: 0 18px !important;
  font-family: inherit;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  letter-spacing: 0;
  text-align: center !important;
  text-transform: none;
  color: #24231f;
  overflow-wrap: break-word;
}

body.alavus-custom-theme main .alavus-home-products li.product .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: flex-start;
  justify-content: center !important;
  gap: 5px 8px;
  min-height: 30px;
  margin: auto 0 0 !important;
  padding: 0 18px !important;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 550 !important;
  line-height: 1.5 !important;
  letter-spacing: .01em;
  text-align: center !important;
  color: #75532d;
}

body.alavus-custom-theme main .alavus-home-products li.product .price del {
  font-size: 12px;
  font-weight: 400;
  color: #7b7870;
  opacity: 1;
}

body.alavus-custom-theme main .alavus-home-products li.product .price ins {
  background: transparent;
  color: inherit;
  text-decoration: none;
}

body.alavus-custom-theme main .alavus-home-products ul.products li.product > a.button {
  display: flex !important;
  flex: 0 0 auto;
  align-self: stretch;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-height: 46px !important;
  height: auto !important;
  margin: 16px 0 0 !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: .16em;
  text-align: center;
  white-space: normal;
  color: #faf8f3 !important;
  background: linear-gradient(110deg, #201f1a 0%, #201f1a 50%, #81613c 50%, #81613c 100%) !important;
  background-size: 210% 100% !important;
  background-position: left center !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-position 350ms ease !important;
}

body.alavus-custom-theme main .alavus-home-products ul.products li.product > a.button:focus-visible {
  background-position: right center !important;
  outline-color: #faf8f3;
}

body.alavus-custom-theme main .alavus-home-products li.product .onsale {
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  z-index: 1;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 0 !important;
  font-size: 9px !important;
  font-weight: 650;
  line-height: 1.2 !important;
  letter-spacing: .12em;
  box-shadow: none !important;
}

body.alavus-custom-theme main .alavus-home-products li.product:focus-within {
  border-color: #95744d;
}

body.alavus-custom-theme main .alavus-home-products li.product > a:focus-visible {
  outline: 2px solid #95744d;
  outline-offset: -3px;
}

@media (hover: hover) and (pointer: fine) {
  body.alavus-custom-theme main .alavus-home-products ul.products li.product > a.button:hover {
    background-position: right center !important;
  }

  body.alavus-custom-theme main .alavus-home-products li.product:hover {
    border-color: #95744d;
  }

  body.alavus-custom-theme main .alavus-home-products li.product .woocommerce-loop-product__link:hover > img {
    transform: scale(1.035) !important;
    clip-path: inset(1.7%);
  }
}

@media (max-width: 1100px) {
  body.alavus-custom-theme main .alavus-home-products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  body.alavus-custom-theme main .alavus-home-products ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.alavus-custom-theme main .alavus-home-products li.product,
  body.alavus-custom-theme main .alavus-home-products ul.products li.product > a.button,
  body.alavus-custom-theme main .alavus-home-products li.product .woocommerce-loop-product__link > img {
    transition: none !important;
  }

  body.alavus-custom-theme main .alavus-home-products li.product .woocommerce-loop-product__link:hover > img {
    transform: none !important;
    clip-path: inset(0);
  }
}
