/* === FIX SECURITY CARD === */
.wd-security-card {
  min-width: 0 !important;
  overflow: hidden !important;
}

.wd-security-card img {
  width: 100% !important;
  max-width: 100% !important;
  height: 110px !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 8px;
  display: block;
}

.wd-security-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
}

/* === FIX BOTTONE AGGIUNGI AL CARRELLO === */
.woocommerce div.product form.cart .button,
.single-product .single_add_to_cart_button {
  background-color: #064020 !important;
  color: #fff !important;
  padding: 14px 20px !important;
  border-radius: 6px !important;
  border: none !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  line-height: normal !important;
  text-align: center !important;
  box-shadow: none !important;
  position: relative !important;
  overflow: hidden !important;
}

.woocommerce div.product form.cart .button::before,
.woocommerce div.product form.cart .button::after,
.single-product .single_add_to_cart_button::before,
.single-product .single_add_to_cart_button::after {
  content: none !important;
  display: none !important;
}

.woocommerce div.product form.cart .button:hover,
.single-product .single_add_to_cart_button:hover {
  background-color: #043018 !important;
  color: #fff !important;
}

/* BLOCCA MOVIMENTO PULSANTE */
.woocommerce div.product form.cart .button,
.single-product .single_add_to_cart_button {
  position: static !important;
  transform: none !important;
  transition: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

/* BLOCCA HOVER STRANI */
.woocommerce div.product form.cart .button:hover,
.single-product .single_add_to_cart_button:hover {
  transform: none !important;
  transition: none !important;
}

/* BLOCCA EVENTUALI SPAN INTERNI */
.woocommerce div.product form.cart .button span,
.single-product .single_add_to_cart_button span {
  position: static !important;
  transform: none !important;
}
.wd-related-card .button {
  background: #111 !important;
  color: #fff !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}
/* === NASCONDI ADD TO CART NEI CORRELATI === */

.wd-related-card .button,
.wd-related-card .add_to_cart_button,
.wd-related-card form.cart {
  display: none !important;
}/* === RIMUOVE ADD TO CART SOLO NEI CORRELATI === */

.wd-related a.button,
.wd-related .add_to_cart_button,
.wd-related form.cart,
.wd-related .product_type_simple,
.wd-related .product_type_variable {
  display: none !important;
}
.related .onsale {
    display: none !important;
}
/* NASCONDE BADGE "IN OFFERTA" NEI PRODOTTI CORRELATI */
.related.products .product-label,
.related.products .product-labels,
.related.products .onsale,
.related.products .wd-product-label,
.related.products .wd-onsale {
  display: none !important;
}

/* SISTEMA I TITOLI NEI PRODOTTI CORRELATI */
.related.products .woocommerce-loop-product__title {
  font-size: 14px !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  text-overflow: ellipsis;
  min-height: 38px !important;
}

/* MOBILE */
@media (max-width: 768px) {
  .related.products .woocommerce-loop-product__title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    min-height: 34px !important;
  }
}
/* RIMUOVE DEFINITIVAMENTE "IN OFFERTA" NEI PRODOTTI CORRELATI */
.related.products span:has(> span),
.related.products .product span.onsale,
.related.products .product .onsale,
.related.products .product-label,
.related.products .product-labels,
.related.products .product-label.onsale,
.related.products .product-labels .onsale,
.related.products .labels-rounded,
.related.products .labels-rectangular,
.related.products .product-labels.labels-rounded,
.related.products .product-labels.labels-rectangular {
  display: none !important;
}
.onsale,
.product-label,
.product-labels {
  display: none !important;
}
/* FIX MOBILE TESTI PRODOTTI CORRELATI */
@media (max-width: 768px) {

  .related.products ul.products li.product,
  .related.products .product {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .related.products .product-wrapper,
  .related.products .product-inner,
  .related.products .product-information,
  .related.products .product-element-bottom {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .related.products .woocommerce-loop-product__title,
  .related.products .product-title,
  .related.products h3 {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    height: auto !important;
    min-height: 64px !important;
    overflow: visible !important;
    white-space: normal !important;
    display: block !important;
    margin-bottom: 8px !important;
  }

  .related.products .price {
    display: block !important;
    clear: both !important;
    margin-top: 6px !important;
    line-height: 1.3 !important;
  }
}
/* FIX DEFINITIVO MOBILE - PRODOTTI CORRELATI */
@media (max-width: 768px) {

  .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 10px !important;
  }

  .related.products ul.products li.product {
    width: auto !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
  }

  .related.products .product-wrapper,
  .related.products .product-inner,
  .related.products .product-element-bottom,
  .related.products .product-information {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .related.products .woocommerce-loop-product__title,
  .related.products .product-title,
  .related.products h3 {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 82px !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 8px 0 10px !important;
    padding: 0 !important;
  }

  .related.products .price {
    position: relative !important;
    display: block !important;
    clear: both !important;
    margin-top: auto !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
  }
}