/* ============================================================
   Custom CSS - Diva Elementor
   Fix: prodotti sempre allineati indipendentemente dalla
   lunghezza del titolo.
   Il titolo viene limitato a massimo 2 righe e gli viene
   riservata un'altezza fissa, cosi' prezzo e pulsanti restano
   allineati su tutte le schede prodotto.
   ============================================================ */

.product-miniature .thumbnail-container .product-title {
  line-height: 1.2;
  min-height: calc(2em * 1.2 + 20px);
}

.product-miniature .thumbnail-container .product-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Combinazioni prodotto (varianti colori/taglia):
   - sempre visibili anche su mobile
   - su una sola riga
   - altezza fissa: non si sovrappongono mai al prezzo
   ============================================================ */

.product-miniature .highlighted-informations {
  display: block !important;
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  height: 32px;
  min-height: 32px;
  overflow: hidden;
  padding: 6px 0 0;
  background: transparent;
  border: 0;
}

.product-miniature .highlighted-informations .variant-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  height: 26px;
  min-height: 26px;
  padding: 0;
  gap: 6px;
  scrollbar-width: thin;
}

.product-miniature .highlighted-informations .variant-links a {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #cccccc;
  margin: 0;
}

.product-miniature .highlighted-informations .variant-links .count {
  flex: 0 0 auto;
  margin-left: 4px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

/* ============================================================
   Schede prodotto stile dreamlove
   ============================================================ */

/* Descrizione breve sempre visibile (massimo 2 righe) */
.product-miniature .thumbnail-container .product-description-short {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
  font-size: 12px;
  line-height: 1.45;
  color: #888888;
  margin: 4px 0 8px;
}

/* Area acquisto in scheda: dropdown combinazione + quantita' + bottone */
.product-miniature .thumbnail-container .leo-product-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin-top: 6px;
}

/* Dropdown combinazione a tutta larghezza */
.product-miniature .leo-product-controls .leo-pro-attr-section {
  flex: 1 1 100%;
  margin: 0;
}

.product-miniature .leo-product-controls .leo-pro-attr-section .leo-bt-select-attr {
  width: 100%;
  text-align: left;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid #dddddd;
  border-radius: 3px;
  background: #ffffff;
  color: #333333;
}

.product-miniature .leo-product-controls .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr {
  width: 100%;
  min-width: 100%;
}

/* Quantita' */
.product-miniature .leo-product-controls .leo-touchspin {
  flex: 0 0 92px;
}

.product-miniature .leo-product-controls .leo-touchspin .input-group .leo_cart_quantity {
  width: 100%;
  height: 38px;
  text-align: center;
}

/* Bottone aggiungi al carrello */
.product-miniature .leo-product-controls .button-container.cart {
  flex: 1 1 auto;
  margin: 0;
  min-width: 130px;
}

.product-miniature .leo-product-controls .button-container.cart .btn-product {
  width: 100%;
  height: 38px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #d31d52;
  border-color: #d31d52;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
}

.product-miniature .leo-product-controls .button-container.cart .btn-product:hover,
.product-miniature .leo-product-controls .button-container.cart .btn-product:focus {
  background: #b01643;
  border-color: #b01643;
  color: #ffffff;
}

/* Altezza fissa area acquisto: schede sempre allineate */
.product-miniature .thumbnail-container .leo-product-controls {
  min-height: 50px;
}

/* Badge sconto con importo, stile dreamlove (es. -$2.000) */
.product-miniature .thumbnail-container .product-flags .product-flag.discount {
  display: inline-block;
  background: #d31d52;
  color: #ffffff;
}

/* Sicurezza: il menu a tendina combinazioni non deve essere
   tagliato dagli overflow dei contenitori (si apre sopra la riga) */
.product-miniature .thumbnail-container .product-meta {
  overflow: visible;
}

.product-miniature .leo-product-controls .leo-pro-attr-section .dropdown-menu {
  z-index: 20;
}

/* ============================================================
   Mobile (lista a 2 colonne): la tendina combinazioni non deve
   uscire dalla scheda prodotto.
   Regole NON legate al wrapper .leo-product-controls: funzionano
   con qualunque struttura (product.tpl e plist leoelements).
   ============================================================ */

.product-miniature .leo-pro-attr-section {
  min-width: 0;
  max-width: 100%;
}

.product-miniature .leo-pro-attr-section .leo-bt-select-attr {
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 28px 6px 10px;
}

.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr .dropdown-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 575px) {
  .product-miniature .leo-product-controls .leo-touchspin {
    flex: 0 0 60px;
  }

  .product-miniature .leo-product-controls .leo-touchspin .input-group .leo_cart_quantity {
    height: 34px;
    font-size: 12px;
  }

  .product-miniature .leo-product-controls .button-container.cart {
    flex: 1 1 auto;
    min-width: 0;
  }

  .product-miniature .leo-product-controls .button-container.cart .btn-product {
    height: 34px;
    font-size: 11px;
    padding: 0 4px;
  }
}

/* ============================================================
   Bordo 1px attorno alla scheda prodotto (stile classic)
   ============================================================ */

.product-miniature .thumbnail-container {
  border: 1px solid #e5e5e5;
  background: #ffffff;
}

/* Esclusioni: niente bordo sui prodotti nel megamenu e nelle sidebar */
.leo-widget .thumbnail-container,
.sidebar .thumbnail-container {
  border: none;
  background: transparent;
}

/* ============================================================
   Pagina "Marche": griglia dei brand 6-7 per riga
   ============================================================ */

.brand-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
  padding: 0;
  list-style: none;
}

.brand-grid .brand {
  flex: 0 0 calc(100% / 7);
  max-width: calc(100% / 7);
  padding: 10px;
}

.brand-grid .brand-card {
  display: block;
  height: 100%;
  padding: 15px 10px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  transition: all .4s;
}

.brand-grid .brand-card:hover {
  border-color: #d31d52;
  box-shadow: 0 8px 15px rgba(0, 0, 0, .08);
}

.brand-grid .brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.brand-grid .brand-logo img {
  max-height: 60px;
  max-width: 100%;
}

.brand-grid .brand-name {
  margin-top: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-grid .brand-count {
  font-size: 12px;
  color: #999;
}

@media (max-width: 1199px) {
  .brand-grid .brand {
    flex: 0 0 calc(100% / 6);
    max-width: calc(100% / 6);
  }
}

@media (max-width: 991px) {
  .brand-grid .brand {
    flex: 0 0 calc(100% / 4);
    max-width: calc(100% / 4);
  }
}

@media (max-width: 767px) {
  .brand-grid .brand {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
  }
}

@media (max-width: 479px) {
  .brand-grid .brand {
    flex: 0 0 calc(100% / 2);
    max-width: calc(100% / 2);
  }
}

.product-miniature .leo-product-controls .leo-pro-attr-section { flex: 1 1 100%; margin: 0; }
.product-miniature .leo-product-controls .leo-pro-attr-section .leo-bt-select-attr { width: 100%; text-align: left; font-size: 10px; padding: 6px 10px; border: 1px solid #ddd; border-radius: 3px; background: #fff; color: #333; }
.product-miniature .leo-pro-attr-section { min-width: 0; max-width: 100%; }
.product-miniature .leo-pro-attr-section .leo-bt-select-attr { width: 100%; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 28px 6px 10px; }
.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr { left: 0; right: 0; width: 100%; min-width: 0; max-width: 100%; }
.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr .dropdown-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .leo-pro-attr-section .dropdown-menu { z-index: 20; }
.thumbnail-container { padding: 10px; background-color: #fff; }
.products .product-description-short { display: none; }
.product-miniature .product-price-and-shipping { text-align: center; }
@media (max-width: 767px) {
  .product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr {
    position: static;
    width: 100%;
  }
}

.product-miniature .thumbnail-container .product-description-short { display: none !important; }

@media (max-width: 1199px) {
  .product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* ===== Riporta il prezzo nel flusso della scheda ===== */
.thumbnail-container .product-price-and-shipping .price {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  height: auto !important;
  width: auto !important;
  padding: 0 !important;
  display: inline !important;
  text-align: center !important;
}

/* Altezza della parte testo della scheda automatica */
.plist-moderno .thumbnail-container .product-meta {
  height: auto !important;
  padding-bottom: 0 !important;
}
/* ===== Mostra il testo intero nella tendina combinazioni (niente "..." troncato) ===== */
.product-miniature .leo-pro-attr-section .leo-bt-select-attr,
.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr .dropdown-item {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.product-miniature .leo-pro-attr-section .leo-bt-select-attr {
  height: auto !important;
}
/* ===== Tendina combinazioni: compatta sopra la scheda (come SM), non spinge il layout ===== */
.product-miniature .leo-pro-attr-section .dropdown-menu.leo-dropdown-attr {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 130px !important;
  overflow-y: auto !important;
}
/* ===== Nome sotto la foto: su UNA riga e niente stelle recensioni ===== */
.review-moderno .leo-list-product-reviews { display: none !important; }
.review-moderno .category-default a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}
/* ===== Su telefono/tablet la tendina combinazioni è nascosta: resta solo il bottone carrello ===== */
@media (max-width: 1199px) {
  .product-miniature .leo-pro-attr-section {
    display: none !important;
  }
}
/* Nasconde solo la scritta "Nessuna tassa" sotto il prezzo, lasciando i widget (Klarna) */
.tax-shipping-delivery-label {
    font-size: 0;
}
.tax-shipping-delivery-label > div {
    font-size: 1rem;
}
.product-prices .tax-shipping-delivery-label { display: none !important; }