/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.6
 Text Domain:  woodmart
*/

:root {
  /* Color used for compare and wishilist buttons */
  --wd-action-color: rgba(26, 132, 88, 1);
}

/* Set the image boundaries in product image gallery single product */
.wd-gallery-thumb .wd-carousel-item {
  aspect-ratio: 4/3;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  position: relative;
  background-color: #f9f9f9;
}
.wd-gallery-thumb .wd-carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--wd-gap) / 2);
  right: calc(var(--wd-gap) / 2);
  border: 2px solid #e6e6e6;
  pointer-events: none;
}
.wd-gallery-thumb .wd-carousel-item img {
  max-width: calc(100% - var(--wd-gap) * 2);
  max-height: calc(100% - var(--wd-gap) * 2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image {
  aspect-ratio: 4/3;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
}
.woocommerce-product-gallery img {
  max-width: calc(100% - var(--wd-gap) * 2);
  max-height: calc(100% - var(--wd-gap) * 2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.wd-product .product-image-link {
  aspect-ratio: 4/3;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
}

.wd-product .product-image-link img {
  max-width: calc(100% - var(--wd-gap) * 2);
  max-height: calc(100% - var(--wd-gap) * 2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

/* Fix aspect ratio on single product image variants */
.product-image-summary [class*="wd-swatches"] {
  --wd-swatch-w: auto !important;
  --wd-swatch-h: auto !important;
}
.product-image-summary [class*="wd-swatches"] img {
  max-width: 7rem !important;
  max-height: 7rem !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Disable quantity in single product */
.product-image-summary .quantity {
  display: none !important;
}

.single_add_to_cart_button,
.wd-product.wd-hover-standard .wd-add-btn > a {
  background-color: #1fb01f !important;
}
.single_add_to_cart_button:hover,
.wd-product.wd-hover-standard .wd-add-btn > a:hover {
  background-color: #108e10 !important;
}
.single_add_to_cart_button {
  padding: 1rem 3rem !important;
  font-size: 1.3rem;
}

p.stock.wd-style-with-bg:is(.available-on-backorder, .in-stock, .out-of-stock)
  span {
  font-size: 1.1rem;
  font-weight: 700;
}
.wd-product-stock.wd-style-default {
  flex: 0;
  width: auto;
  display: inline-block;
}
p.stock.wd-style-with-bg:is(.in-stock) span {
  border: 1px solid #85b951;
}
.wd-product-stock.wd-style-default:is(.in-stock) {
  color: #85b951 !important;
  /* background-color: #f1f7eb; */
}
.wd-product-stock.wd-style-default:is(.in-stock)::before {
  color: #85b951 !important;
}
p.stock.wd-style-with-bg:is(.available-on-backorder) span {
  border: 1px solid #dea412;
  color: #dea412;
  background-color: #f6f1e5;
}
.wd-product-stock.stock.wd-style-default.available-on-backorder {
  color: #dea412;
}
p.stock.wd-style-with-bg:is(.out-of-stock) span {
  border: 1px solid #e04e4e;
  color: #e04e4e;
  background-color: #f9eaea;
}

.summary .summary-inner > .price {
  font-size: 2.3rem;
}
.price .amount {
  font-weight: 900;
}

.woocommerce-price-suffix {
  font-size: 50%;
}

.single-product-shipping-time {
  border: 1px solid #10598e;
  color: #10598e;
  background-color: #ecf3f7;
  font-size: 1.1rem;
  padding: 1rem;
  font-weight: 900;
}
.single-product-shipping-time small {
  font-size: 80%;
  font-weight: 400;
  display: block;
}

.wd-product .price {
  font-size: 1.3rem;
}
.wd-product .amount {
  color: var(--wd-entities-title-color);
}

.wd-sub-menu {
  --sub-menu-color: var(--wd-text-color);
}

@media (min-width: 767px) and (max-width: 1024px) {
  .home-categories-second-row {
    display: flex;
    flex-direction: row !important;
    gap: 20px;
  }
}

/* Home small categories */
@media (min-width: 1024px) {
  #wd-64a8c875.wp-block-wd-row {
    flex-wrap: wrap;
  }
  #wd-64a8c875.wp-block-wd-row > .wp-block-wd-column {
    min-width: 30% !important;
  }
}

@media (max-width: 1024px) {
  .filter-sort-row {
    flex-wrap: nowrap !important;
  }
}
