.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff; /* Colore sfondo pagina */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lds-dual-ring {
  display: inline-block;
  width: 80px;
  height: 80px;
}
.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid #0056b3; /* Usa il blu del logo Centercode */
  border-color: #0056b3 transparent #0056b3 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.post-minimal-figure img {
  width: 115px !important;
}
.titolo-bold {
  font-weight: bold !important;
}

/* Standardizza le immagini nei Prodotti Correlati */
.section-sm .row.row-40 img {
    width: 100%;
    height: 250px; /* Imposta l'altezza che preferisci, ad esempio 250px */
    object-fit: contain; /* Adatta l'immagine senza distorcerla, lasciando bande bianche se necessario */
    background-color: #fff; /* Aggiunge uno sfondo bianco per le bande */
    display: block;
    margin: 0 auto; /* Centra l'immagine */
}

/* Rendi responsive le immagini su mobile */
@media (max-width: 576px) {
    .section-sm .row.row-40 img {
        height: auto; /* Lascia l'altezza automatica sui telefoni */
    }
}

/* Posizionamento dei Badge */
.product-figure, .slick-product-figure {
    position: relative; /* Fondamentale per far stare il badge dentro la foto */
}

.product-badge {
    position: absolute;
    z-index: 9;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 2px;
    color: #fff;
}

.product-badge-new { top: 10px; left: 10px; background: #59ba41; }
.product-badge-sale { top: 10px; right: 10px; background: #f22d2d; }

/* Contenitore immagine relativo per posizionare il badge */
.product-figure, .slick-product-figure {
    position: relative;
    overflow: hidden; /* Taglia il badge se esce dai bordi */
}

/* Base del Ribbon */
.badge-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 10;
}

.badge-ribbon span {
    position: absolute;
    display: block;
    width: 150px;
    padding: 8px 0;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    text-align: center;
    left: -35px;
    top: 20px;
    transform: rotate(-45deg); /* L'inclinazione che vedi nello screenshot */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Colore Rosso per NOVITÀ */
.badge-novita span {
    background-color: #f22d2d;
}

/* Colore Verde per OFFERTA */
.badge-offerta span {
    background-color: #59ba41;
}

/* Se un prodotto ha entrambi, spostiamo il secondo a destra */
.badge-offerta.badge-ribbon {
    left: auto;
    right: 0;
}
.badge-offerta.badge-ribbon span {
    left: auto;
    right: -35px;
    transform: rotate(45deg);
}

/* --- OTTIMIZZAZIONE GRIGLIA PRODOTTI (Catalogo, Offerte, Novità) --- */

/* 1. Standardizza il contenitore della figura */
.product-figure, .slick-product-figure {
    position: relative;
    width: 100%;
    height: 250px; /* Altezza fissa per tutte le anteprime */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #f2f2f2; /* Un leggero bordo per staccare dal fondo */
    border-radius: 4px;
}

/* 2. Gestione Immagini: proporzioni perfette senza distorsioni */
.product-figure img, .slick-product-figure img {
    max-width: 90%; /* Lasciamo un po' di respiro ai bordi */
    max-height: 90%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    transition: transform 0.3s ease; /* Effetto zoom al passaggio del mouse */
}

.product-figure:hover img {
    transform: scale(1.05);
}

/* 3. Allineamento Titoli e Categorie */
.product-title {
    margin-top: 15px;
    font-size: 16px;
    line-height: 1.2;
    min-height: 40px; /* Forza l'altezza per titoli su 1 o 2 righe */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-category {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
}

/* 4. Uniformità dei pulsanti */
.product-button {
    margin-top: 10px;
}

/* 5. Badge Ribbon (Fettucce) - Perfezionamento */
.badge-ribbon {
    width: 85px; /* Leggermente più piccoli per le griglie */
    height: 85px;
}

.badge-ribbon span {
    font-size: 10px;
    padding: 5px 0;
    width: 120px;
}

/* 6. Fix per Mobile */
@media (max-width: 767px) {
    .product-figure {
        height: 200px; /* Più basse sui telefoni per vederne di più */
    }
}

.rd-navbar-corporate.rd-navbar-static .rd-navbar-brand img
 {
    width: auto;
    height: auto;
    max-width: 350px !important;
    max-height: 160px !important;
}
