/* =========================================================
   WOODMART PRODUCT CARDS — GRID / CAROUSEL / CATEGORY SAME
   ========================================================= */

/* -------------------------
   Global card cleanup
   ------------------------- */
.wd-product .wd-compare-btn,
.wd-product .wd-wishlist-btn,
.wd-product .quick-view,
.wd-product .wd-action-btn,
.wd-product .wd-quick-view-icon,
.wd-product .wd-compare-icon,
.wd-product .wd-wishlist-icon{
  display:none !important;
}

/* Center all main content */
.wd-product .product-wrapper,
.wd-product .wd-product-header,
.wd-product .wd-product-cats,
.wd-product .wrap-price,
.wd-product .price,
.wd-products .wd-product .product-wrapper,
.wd-products .wd-product .wd-product-header,
.wd-products .wd-product .wd-product-cats,
.wd-products .wd-product .wrap-price,
.wd-products .wd-product .price{
  text-align:center !important;
}

.wd-product .product-image-link img,
.wd-product .hover-img img{
  display:block;
  margin-inline:auto;
}

.wd-product .wd-entities-title,
.wd-product .wd-entities-title a{
  text-align:center !important;
  line-height:1.25 !important;
}

/* Stack price + button */
.wd-product .swap-elements,
.wd-products .wd-product .swap-elements,
.products .wd-product .swap-elements{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:16px !important;
}

.product-element-bottom,
.wd-product .product-element-bottom{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
}

/* Price */
.wd-product .price .woocommerce-Price-amount{
  font-size:14px !important;
  font-weight:500 !important;
  color:#535359 !important;
}

/* -------------------------
   Labels
   ------------------------- */
.product-labels.labels-rounded .product-label{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:3px 23px 2px !important;
  min-height:20px !important;
  border-radius:0 !important;
  font-size:10px !important;
  position:absolute !important;
  top:24px !important;
  left:8px !important;
  border:1px solid rgb(153,115,65) !important;
  background:transparent !important;
}

.product-label.new{
  background-color:transparent !important;
}

.product-label{
  padding:5px 10px !important;
  text-align:center !important;
  text-transform:uppercase !important;
  word-break:normal !important;
  font-weight:600 !important;
  font-size:12px !important;
  line-height:20px !important;
  letter-spacing:1px !important;
  color:rgb(153,115,65) !important;
  width:auto !important;
  height:auto !important;
}

/* -------------------------
   Desktop: make add to cart always visible
   and same on category/archive/shop/carousel
   ------------------------- */
@media (min-width:1025px){

  /* Kill WoodMart hover offset */
  .wd-product{
    --wd-trans-h: 0px !important;
  }

  .wd-product .wrap-price,
  .wd-product .wd-product-footer,
  .wd-product .wd-add-btn,
  .products .wd-product .wrap-price,
  .products .wd-product .wd-product-footer,
  .products .wd-product .wd-add-btn,
  .wd-products .wd-product .wrap-price,
  .wd-products .wd-product .wd-product-footer,
  .wd-products .wd-product .wd-add-btn{
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
  }

  /* IMPORTANT: category / archive / shop / product category */
  .tax-product_cat .wd-product .wrap-price .wd-add-btn,
  .post-type-archive-product .wd-product .wrap-price .wd-add-btn,
  .woocommerce-shop .wd-product .wrap-price .wd-add-btn,
  .archive .wd-product .wrap-price .wd-add-btn,
  .products .wd-product .wrap-price .wd-add-btn,
  .wd-products .wd-product .wrap-price .wd-add-btn,
  .wd-product .wrap-price .wd-add-btn{
    display:block !important;
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
    pointer-events:auto !important;
    height:auto !important;
    width:100% !important;
    margin-top:0 !important;
  }

  .tax-product_cat .wd-product .add_to_cart_button.add-to-cart-loop,
  .post-type-archive-product .wd-product .add_to_cart_button.add-to-cart-loop,
  .woocommerce-shop .wd-product .add_to_cart_button.add-to-cart-loop,
  .archive .wd-product .add_to_cart_button.add-to-cart-loop,
  .products .wd-product .add_to_cart_button.add-to-cart-loop,
  .wd-products .wd-product .add_to_cart_button.add-to-cart-loop,
  .wd-product .add_to_cart_button.add-to-cart-loop{
    display:block !important;
    width:100% !important;
    min-height:36px !important;
    padding:6px 12px !important;
    background:#fff !important;
    color:#535359 !important;
    border:1px solid #dfdfdf !important;
    border-radius:0 !important;
    text-transform:uppercase !important;
    letter-spacing:1px !important;
    line-height:1.25rem !important;
    box-shadow:none !important;
    transition:none !important;
    text-align:center !important;
    position:relative !important;
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
  }

  /* Same style in all states */
  .tax-product_cat .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .tax-product_cat .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .tax-product_cat .wd-product .add_to_cart_button.loading,
  .tax-product_cat .wd-product .add_to_cart_button.added,
  .post-type-archive-product .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .post-type-archive-product .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .post-type-archive-product .wd-product .add_to_cart_button.loading,
  .post-type-archive-product .wd-product .add_to_cart_button.added,
  .woocommerce-shop .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .woocommerce-shop .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .woocommerce-shop .wd-product .add_to_cart_button.loading,
  .woocommerce-shop .wd-product .add_to_cart_button.added,
  .archive .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .archive .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .archive .wd-product .add_to_cart_button.loading,
  .archive .wd-product .add_to_cart_button.added,
  .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .wd-product .add_to_cart_button.loading,
  .wd-product .add_to_cart_button.added{
    background:#fff !important;
    color:#535359 !important;
    border-color:#dfdfdf !important;
    box-shadow:none !important;
    transform:none !important;
  }

  /* Remove icons / ajax pseudo elements */
  .wd-product .add_to_cart_button.add-to-cart-loop::before,
  .wd-product .add_to_cart_button.add-to-cart-loop::after,
  .wd-product .add_to_cart_button.loading::before,
  .wd-product .add_to_cart_button.loading::after,
  .wd-product .add_to_cart_button.added::before,
  .wd-product .add_to_cart_button.added::after,
  .wd-product .add_to_cart_button.add-to-cart-loop span::before,
  .wd-product .add_to_cart_button.add-to-cart-loop span::after{
    content:none !important;
    display:none !important;
  }

  /* Keep text always visible */
  .wd-product .add_to_cart_button.add-to-cart-loop > span,
  .wd-product .add_to_cart_button.loading > span,
  .wd-product .add_to_cart_button.added > span{
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
    color:inherit !important;
    text-indent:0 !important;
    display:inline !important;
  }

  /* Hide view cart link */
  .wd-product a.added_to_cart.wc-forward{
    display:none !important;
  }

  /* Underline on hover */
  .wd-product .add_to_cart_button.add-to-cart-loop:hover,
  .wd-product .add_to_cart_button.add-to-cart-loop:focus,
  .wd-product .add_to_cart_button.add-to-cart-loop:focus-visible,
  .wd-product .add_to_cart_button.add-to-cart-loop:hover > span,
  .wd-product .add_to_cart_button.add-to-cart-loop:focus > span{
    text-decoration:underline !important;
    text-underline-offset:.4rem !important;
    text-decoration-thickness:1px !important;
    text-decoration-color:var(--mfk-cta-underline, #c2b2a0) !important;
  }

  .wd-product .add_to_cart_button.add-to-cart-loop,
  .wd-product .add_to_cart_button.add-to-cart-loop > span{
    text-decoration:none !important;
  }

  /* Make footer full width everywhere */
  .wd-product .wd-product-footer,
  .wd-product.wd-hover-buttons-on-hover .wd-product-footer,
  .tax-product_cat .wd-product .wd-product-footer,
  .post-type-archive-product .wd-product .wd-product-footer,
  .woocommerce-shop .wd-product .wd-product-footer,
  .archive .wd-product .wd-product-footer{
    width:100% !important;
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
    position:static !important;
  }

  /* Prevent archive/category hover hiding */
  .tax-product_cat .wd-product:hover .wd-product-footer,
  .post-type-archive-product .wd-product:hover .wd-product-footer,
  .woocommerce-shop .wd-product:hover .wd-product-footer,
  .archive .wd-product:hover .wd-product-footer,
  .tax-product_cat .wd-product:hover .wd-add-btn,
  .post-type-archive-product .wd-product:hover .wd-add-btn,
  .woocommerce-shop .wd-product:hover .wd-add-btn,
  .archive .wd-product:hover .wd-add-btn{
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
  }
}

/* -------------------------
   Mobile
   ------------------------- */
@media (max-width:576px){
  .product-labels.labels-rounded .product-label{
    min-height:16px !important;
    font-size:9px !important;
    background-color:transparent !important;
    border:1px solid rgb(153,115,65) !important;
    border-radius:0 !important;
  }

  .wd-product.wd-hover-buttons-on-hover .add-to-cart-loop span{
    color:#535359 !important;
  }

  .wd-product .wd-add-btn .button:hover{
    background-color:transparent !important;
    border-color:#333 !important;
    color:#535359 !important;
  }
}

/* -------------------------
   Hover image desktop
   ------------------------- */
@media (hover:hover) and (min-width:1025px){
  .wd-product .product-element-top{
    position:relative !important;
  }

  .wd-product .product-element-top .hover-img{
    opacity:0;
    transition:opacity .25s ease;
    pointer-events:none;
  }

  .wd-product:hover .product-element-top .hover-img{
    opacity:1;
  }
}