/* ------------------------------------------------------------------- */
/* # Sezione 1: Impostazioni Globali e Variabili
/* ------------------------------------------------------------------- */
:root {
    --primary-color: #009688; /* Teal Intelligente */
    --accent-color: #FFC107;  /* Giallo Solare */
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-gray);
}

/* ------------------------------------------------------------------- */
/* # Sezione 2: Header e Navigazione
/* ------------------------------------------------------------------- */

/* --- Stili Logo --- */
.logo {
    display: flex;
    align-items: center; /* Allinea verticalmente icona e testo */
    font-size: 1.25rem;
    font-weight: 600;
}

/* Stile per l'icona del logo (es. barcode) */
.logo .fas {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-right: 0.5rem; /* Crea lo spazio a destra, più robusto di 'gap' */
}

.logo .logo-text {
    color: var(--dark-color);
}

.logo .logo-text-bold {
    font-weight: 800;
    color: var(--primary-color);
}

/* --- Header Desktop --- */
.header-search {
    width: 100%;
    min-width: 450px;
}

/* --- Header Mobile --- */
.mobile-header {
    display: flex;
    align-items: center;
    position: relative;
    height: 60px;
}

.mobile-header-toggler, 
.mobile-header-search {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    padding: 0.5rem;
    z-index: 10;
}

.mobile-header-toggler {
    left: 15px;
}

.mobile-header-search {
    right: 15px;
}

/* Stile specifico per il logo su mobile */
.mobile-header .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    font-size: 1.1rem;
}
    
/* --- Stili per il Menu Mobile Separato --- */
.mobile-menu-container {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.mobile-menu-container .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.mobile-menu-container .nav-link:hover {
    background-color: #e9ecef;
}


/* Stile per il Mega Menu */
.dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
}

/* Adatta la larghezza del menu su schermi grandi */
@media (min-width: 992px) {
    .dropdown-menu {
        width: 100%;
        left: 0;
        right: 0;
    }
}

.dropdown-menu h5 {
    font-weight: bold;
    color: #0d6efd; /* Colore principale del tuo sito */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.dropdown-menu .dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease-in-out;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    padding-left: 1.8rem; /* Aggiunge un leggero effetto al passaggio del mouse */
}




  
/* --- Overlay di Ricerca Mobile --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--light-gray);
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    margin: 5rem auto 0 auto;
}

.search-overlay-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
    color: var(--secondary-color);
    background: none;
    border: none;
    line-height: 1;
}

    
/* --- Stili per l'Icona Hamburger Animata --- */
.mobile-header-toggler .fas {
    transition: transform 0.3s ease-in-out;
}

.mobile-header-toggler:not(.collapsed) .fas {
    transform: rotate(90deg);
}


/* ------------------------------------------------------------------- */
/* # Sezione 3: Componenti Generali (Pulsanti, Card, etc.)
/* ------------------------------------------------------------------- */

/* --- Pulsanti --- */
.btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color);
    color: var(--dark-color);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #ffca2c;
    border-color: #ffca2c;
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Titoli delle Sezioni --- */
.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* --- Card Prodotto --- */
.product-card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-card .card-img-top {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    height: 220px;
    object-fit: cover;
    width: 100%;
}
.product-card .card-title a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

.product-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Numero massimo di righe */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5em; /* Altezza minima per evitare "salti" di layout */
}

/* ------------------------------------------------------------------- */
/* # Sezione 4: Stili Specifici della Homepage
/* ------------------------------------------------------------------- */

/* --- Carosello --- */
.carousel-item {
    height: 70vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    text-align: center;
}

/* --- Card Categorie --- */
.category-card {
    display: block;
    padding: 2rem 1rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--dark-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.category-card i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    color: var(--primary-color);
}

.category-card:hover i {
    transform: scale(1.1);
}

/* --- Sezione Guida AI --- */
.ai-guide-section {
    background-color: var(--dark-color);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.ai-guide-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: background-pan 30s linear infinite;
}

@keyframes background-pan {
  from { background-position: 0 0; }
  to { background-position: -240px 0; }
}

.ai-visual-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.ai-icon-group {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-icon {
    font-size: 7rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--primary-color);
}

.chat-bubble {
    position: absolute;
    font-size: 2.5rem;
    color: #ffffff;
    opacity: 0;
    animation: float-and-fade 4s ease-in-out infinite;
}

.bubble-1 {
    top: 0;
    right: 80%;
    animation-delay: 0s;
}

.bubble-2 {
    bottom: 10%;
    left: 70%;
    font-size: 2rem;
    animation-delay: 2s;
}

.ai-core {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 150, 136, 0.5) 0%, rgba(0, 150, 136, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float-and-fade {
    0% { transform: translateY(10px); opacity: 0; }
    25% { transform: translateY(0); opacity: 0.8; }
    75% { transform: translateY(-10px); opacity: 0.8; }
    100% { transform: translateY(-20px); opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* --- Sezione Brand con Curva --- */
.curved-section-brands {
    position: relative;
    background-color: var(--primary-color);
    padding: 8rem 0 4rem 0; 
    color: #fff;
}

.curved-section-brands .section-title::after {
    background-color: var(--accent-color);
}

.brand-logo img {
    max-width: 100%;
    filter: brightness(0) invert(1) opacity(0.7);
    transition: all 0.3s ease-in-out;
}

.brand-logo:hover img {
    transform: scale(1.1);
    filter: brightness(0) invert(1) opacity(1);
}

.section-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg); 
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.section-divider .shape-fill {
    fill: var(--light-gray);
}

/* --- Ticker Rivenditori --- */
.retailer-ticker {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.ticker-track {
    display: flex;
    width: calc(250px * 12);
    animation: scroll 40s linear infinite;
}

.retailer-ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 6)); }
}

.ticker-item {
    width: 250px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-item img {
    max-width: 100%;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.3s ease;
}

.ticker-item:hover img {
    filter: grayscale(0) opacity(1);
}

/* --- Card Blog --- */
.blog-card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.blog-card .card-img-top {
    transition: transform 0.4s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .card-body a {
    text-decoration: none;
}

.blog-card .card-body a i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.blog-card:hover .card-body a i {
    transform: translateX(5px);
}

/* ------------------------------------------------------------------- */
/* # Sezione 5: Stili Specifici della Pagina Prodotto
/* ------------------------------------------------------------------- */

/**************** pate alta della pagina prodotto ***********************/
/* ---- STILI GENERALI ---- */
.product-info-reimagined {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- GALLERIA IMMAGINI ---- */
.product-gallery {
  display: flex;
  flex-direction: column;
}
.main-image-container {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}
.main-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  max-height: 350px;
  width: auto;
  margin: 0 auto;
  background-color: white;
}
.main-image:hover {
    transform: scale(1.05);
}
.thumbnail-slider {
  overflow-x: auto;
  padding-bottom: 10px; /* Spazio per la scrollbar */
}
.thumbnails-wrapper {
  display: flex;
  gap: 10px;
}
.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.2s ease;
}
.thumbnail:hover {
  transform: translateY(-3px);
  border-color: #007bff;
}
.thumbnail.active {
  border-color: #0056b3;
  box-shadow: 0 0 8px rgba(0, 86, 179, 0.5);
}
/* Nasconde la scrollbar ma la lascia funzionale */
.thumbnail-slider::-webkit-scrollbar {
  height: 5px;
}
.thumbnail-slider::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 5px;
}
.thumbnail-slider::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}


/* ---- DETTAGLI PRODOTTO ---- */
.product-details {
}
.brand-badge {
  display: inline-block;
  background-color: #e7f3ff;
  color: #0056b3;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9em;
  text-decoration: none;
  margin-bottom: 15px;
  width: fit-content;
  transition: background-color 0.2s ease;
}
.brand-badge:hover {
  background-color: #d0e7ff;
}
.brand-badge .fa-tag {
  margin-right: 5px;
}
.product-title {
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* ---- BUYBOX CARD ---- */
.buybox-card {
  background-color: #ffffff;
  border: 2px solid #007bff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);
  display: flex;
  flex-direction: column;
}
.buybox-card .badge.buybox{margin-bottom:10px;}
.buybox-header {
  font-weight: 700;
  color: #0056b3;
  margin-bottom: 15px;
  font-size: 1.1em;
}
.buybox-body {
}
.price-section .price {
  font-size: 2.2em;
  font-weight: 800;
  color: #212529;
}
.price-section .shipping {
  display: block;
  font-size: 0.9em;
  color: #28a745;
  font-weight: 600;
}
.seller-info {
  font-size: 0.9em;
  color: #6c757d;
  text-align: right;
}
.buy-button {
  background: linear-gradient(90deg, #007bff, #0056b3);
  color: white;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}
.buy-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

.buybox-body .row.buybox-actions {
  margin-top: 12px;
}

.row.buybox-actions {
  text-align: center;
  margin-top: 10px;
}

/* ---- NUOVO STILE PER PULSANTE OFFERTE ---- */
.all-offers-button {
    display: block;
    text-align: center;
    padding: 12px;
    border: 2px solid #007bff;
    color: #007bff;
    background-color: transparent;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px; /* Spazio dalla buybox */
    margin-bottom: 30px; /* Spazio dalle varianti */
    transition: all 0.3s ease;
}
.all-offers-button:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}
.all-offers-button .fa-tags {
    margin-right: 8px;
}



/* ---- RESPONSIVE DESIGN (MOBILE) ---- */
@media (max-width: 768px) {
  .product-info-reimagined {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .product-title {
    font-size: 1.6em;
  }
   .seller-info {
    text-align: left;
  }
  .price-section .price {
    font-size: 2em;
  }
}





/*********** Elenco Varianti (cerchi) ***************/

/* Contenitore principale per l'effetto sfumatura */
.variant-gallery-container {
    position: relative; /* Necessario per il posizionamento dell'effetto after */
    margin-top:10px;
}

/* Lo scroller orizzontale */
.variant-scroller {
    overflow-x: auto; /* Abilita lo scroll orizzontale */
    padding-bottom: 15px; /* Spazio per la scrollbar se visibile */
    scrollbar-width: none; /* Nasconde la scrollbar su Firefox */
    -ms-overflow-style: none; /* Nasconde la scrollbar su IE/Edge */
}

/* Nasconde la scrollbar su Chrome/Safari/Opera */
.variant-scroller::-webkit-scrollbar {
    display: none;
}

/* Stile per le singole anteprime delle varianti */
.variant-thumbnail {
    flex: 0 0 65px; /* Non si restringe e ha una larghezza fissa */
    width: 65px;
    height: 65px;
    margin-right: 12px;
    border: 2px solid #eee;
    border-radius: 50%; /* Le rende circolari! Usa 15px per angoli smussati */
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    margin-top:3px;
}

.variant-thumbnail:hover {
    transform: scale(1.08); /* Effetto di ingrandimento al passaggio del mouse */
    border-color: #007bff; /* Colore primario di Bootstrap */
}

.variant-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita che le immagini si deformino */
}

/* Stile per la card creativa "Vedi tutte" */
.variant-see-all-card {
    flex: 0 0 65px;
    width: 65px;
    height: 65px;
    margin-right: 12px;
    background-color: #f8f9fa; /* Un grigio chiaro di Bootstrap */
    border: 2px dashed #ccc;
    border-radius: 50%;
    color: #495057;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
    text-align: center;
}

.variant-see-all-card:hover {
    border-color: #007bff;
    color: #007bff;
    background-color: #e9ecef;
}

.variant-see-all-card .plus-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.variant-see-all-card .see-all-text {
    font-size: 0.65rem;
    text-transform: uppercase;
}

/* IL TOCCO FINALE: Effetto sfumatura a destra */
.variant-gallery-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 15px; /* Allineato con il padding-bottom dello scroller */
    width: 40px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1) 80%);
    pointer-events: none; /* Rende la sfumatura non cliccabile */
}

.variant-gallery-container a{text-decoration: none;}
































    
/**************** Schede Prodotto ******************************/


.nav-tabs .nav-link i, .accordion-button i {
    margin-right: 0.6rem; /* Spazio tra icona e testo */
    font-size: 1.1rem;   /* Dimensione dell'icona */
    vertical-align: middle; /* Allinea l'icona meglio con il testo */
}

/* Opzionale: Diamo un colore più deciso all'icona della tab attiva */
.nav-tabs .nav-link.active i {
    color: #0d6efd; /* Colore blu primario di Bootstrap */
}

/* Stile per il contenuto delle tab per dare un po' di respiro */
.tab-content {
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom-left-radius: .375rem;
    border-bottom-right-radius: .375rem;
}





/******** Tab offerte mobile *******/



/* =================================== */
/* STILI PER IL PANNELLO FILTRI MOBILE   */
/* =================================== */




/* Nascondiamo il pulsante di attivazione su schermi grandi */
#filters-panel-offers-mobile .mobile-filters-trigger {
    display: none;
}

/* Stili per l'intestazione del pannello (visibile solo su mobile) */
#filters-panel-offers-mobile .filters-panel-header {
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

#filters-panel-offers-mobile .close-button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    float:right;
}
#filters-panel-offers-mobile h4 {
    float:left;
}


/* =================================== */
/*           MEDIA QUERY PER MOBILE    */
/* (es. per schermi sotto i 768px)   */
/* =================================== */
@media (max-width: 767.98px) {
    
    /* Mostriamo il pulsante di attivazione mobile */
    .mobile-filters-trigger {
        display: block;
        margin-bottom: 1rem;
        position: sticky;
        top: 0;
        background: white;
        padding: 10px;
        z-index: 100;
    }

    /* Nascondiamo i filtri che prima erano visibili su desktop */
    #filters-container {
        display: block; /* Rimuoviamo il flex di .row */
    }

    /* Stili per il pannello principale quando è in modalità mobile */
    #filters-panel-offers-mobile {
        position: fixed; /* Si fissa sulla viewport */
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        z-index: 1050;
        padding: 1rem;
        border-top: 1px solid #ccc;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);

        /* Lo nascondiamo fuori dallo schermo e prepariamo la transizione */
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }

    /* Quando il pannello è attivo, lo portiamo in vista */
    #filters-panel-offers-mobile.is-visible {
        transform: translateY(0);
    }
    
    /* Mostriamo l'intestazione del pannello */
    .filters-panel-offers-mobile {
        display: flex;
    }
}

.offer-card{
    border-left: 5px solid #e0e0e0;
}
#productAccordionMobile .accordion-body{padding: 10px;}

.offer-card .card-body{padding:10px;}
.offer-card .card-header{padding:10px;}

    
.offer-card .seller-logo {
    max-height: 25px;
    margin-bottom: 8px;
}
.offer-card .price-big {
    font-size: 1.75rem;
    font-weight: bold;
    color: #333;
}
.offer-card-top {
    border: 2px solid #0d6efd; /* Blu primario di Bootstrap */
    border-left: 5px solid #0d6efd;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.best-deal-badge {
    font-size: 0.8rem;
}

.single-offer .seller-info{text-align: center;}
.single-offer .offer-info{text-align: right;}


/********** Tab varianti mobile ***************/

/* Stile base per le card delle varianti */
.variant-card {
    /* PREPARIAMO LO SPAZIO PER L'INDICATORE */
    border: 1px solid #e0e0e0;
    border-left: 5px solid #e0e0e0; /* Spazio per l'indicatore, inizialmente trasparente */
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    background-color: #fff;
}

/* Header di default, pulito e semplice */

/* Effetto al passaggio del mouse: un'ombra per sollevare la card */
.variant-card:not(.active):hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

/* --- IL NUOVO STILE ATTIVO: SOTTILE ED ELEGANTE --- */
.variant-card.active {
    border: 2px solid #0d6efd /* Bordo coordinato */
}

.variant-card.active .card-header {
    /* 3. Il testo dell'header richiama il colore dell'indicatore */
    /*color: #0d6efd;*/ 
    border-bottom-color: rgba(13, 110, 253, 0.3);
}

/* Stili per immagine e prezzo rimangono invariati */
.variant-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.variant-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.price-variant {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

/**************** Tab offerte Desktop ***********************************/
/* Stile generale per la tabella (invariato) */
.offer-table-desktop {
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0 10px;
    table-layout: fixed;
    width: 100%; 
}
.offer-table-desktop td:first-child {
    /* Assicura che la cella stessa non si espanda in modo anomalo */
    max-width: 0;
}
.offer-table-desktop th, .offer-table-desktop td { border: none; }
.offer-table-desktop thead th {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    border-bottom: 2px solid #dee2e6;
}
.offer-table-desktop tbody tr {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
}
.offer-table-desktop tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.offer-table-desktop .text-wrapper {
    flex:1;
    min-width: 0;
}

/* Stile per la riga "Miglior Offerta" (invariato) */
.best-offer-row {
    border-left: 5px solid #0d6efd; 
}

/* Stile per la thumbnail (invariato) */
.offer-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 4px;
}


/* Stile per la cella del prezzo */
.price-cell .price-big {
    font-size: 1.8rem; /* PREZZO PIÙ GRANDE */
    font-weight: 700;
    line-height: 1.2;
}

/* Stile per il logo del venditore nella cella azione */
.seller-logo-desktop {
    max-height: 30px; /* Altezza massima per il logo */
    max-width: 100px; /* Larghezza massima per evitare loghi troppo grandi */
    padding: 0 !important;
}

/************ Tab varianti desktop ********************/
.variant-desktop-thumb{width: 60px; height: 60px; object-fit: contain;  margin-right: 0.5rem;}
/* Stile per un feedback visivo migliore sulle righe non attive */
.list-group-item-action:not(.active):hover {
    background-color: #f8f9fa; /* Un grigio molto chiaro, tipico di Bootstrap */
}
.variant-hidden {
    display: none !important;
}

/* ------------------------------------------------------------------- */
/* # Sezione 7: Stili per Offcanvas Filtri Mobile
/* ------------------------------------------------------------------- */
.offcanvas-body .filter-card {
    box-shadow: none; /* Rimuoviamo l'ombra dentro l'offcanvas, è superflua */
    border: 1px solid #dee2e6;
}

.offcanvas-header {
    border-bottom: 1px solid #dee2e6;
}


/* ------------------------------------------------------------------- */
/* # Sezione 8: Filtri nella pagina di ricerca
/* ------------------------------------------------------------------- */
/* Contenitore principale dei filtri */
.filters-container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Stile personalizzato per l'accordion */
.filters-container .accordion-button {
    font-weight: 600;
    color: var(--dark-color);
    background-color: #fff;
    box-shadow: none;
    padding: 1rem 1.25rem;
}

.filters-container .accordion-button:not(.collapsed) {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.filters-container .accordion-button::after {
    /* Sostituisce la freccia di default con una più moderna */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.filters-container .accordion-item {
    border-bottom: 1px solid #f0f0f0;
}
.filters-container .accordion-item:last-child {
    border-bottom: none;
}

.filters-container .accordion-body {
    padding: 0 1.25rem 1rem 1.25rem;
}

/* Area di ricerca interna ai filtri (es. Brand) */
.filter-search-box input {
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' class='bi bi-search' viewBox='0 0 16 16'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

/* Area scrollabile per liste lunghe di opzioni */
.filter-options-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Stile per i sottotitoli interni (es. 'Sconto', 'Condizione') */
.filter-subtitle {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Stile per il conteggio dei risultati accanto a un'opzione */
.filter-count {
    color: var(--secondary-color);
    font-size: 0.85em;
}

/* Migliora la leggibilità delle label dei form */
.form-check label {
    display: block;
    width: 100%;
    cursor: pointer;
}

/* Stili per l'offcanvas (già presenti, ma assicurati che ci siano) */
.offcanvas-body .filters-container {
    box-shadow: none;
    border: 1px solid #dee2e6;
}
.offcanvas-header {
    border-bottom: 1px solid #dee2e6;
}

.products.grid .badge.variants{position: absolute; right:10pt; top:10px;}


/*************** Utility ******************/
.badge{
    font-size: 0.8rem;
    --bs-bg-opacity: 1;
    background-color: #f8f9fa;
    --bs-text-opacity: 1;
    color: rgba(var(--bs-dark-rgb),var(--bs-text-opacity));
    border: 1px solid #dee2e6;
}

.badge a{
  color: rgba(var(--bs-dark-rgb),var(--bs-text-opacity));
  text-decoration: none;
}
.badge a:hover{
  text-decoration: underline;
}
.badge.new{}
.badge.used{}
.badge.refurbished{}
.badge.collect{}

.badge.eco {background-color: #4CAF50;border-color: #4CAF50; color: white;}
.badge.smaller-price {background-color: var(--accent-color); border-color: var(--accent-color);}
.badge.smaller-price-new {background-color: var(--accent-color); border-color: var(--accent-color);}
.badge.fast {background-color: var(--accent-color); border-color: var(--accent-color);}
.badge.seller-top {background-color: var(--accent-color); border-color: var(--accent-color);}

.tag {
    display: inline-flex; /* Per allineare icona e testo e adattarsi al contenuto */
    align-items: center;
    
    padding: 0.25rem 0.6rem; /* Spaziatura interna per renderlo arioso */
    
    background-color: #f8f9fa; /* Sfondo grigio molto chiaro (Bootstrap 'light') */
    border: 1px solid #dee2e6; /* Bordo sottile coordinato */
    border-radius: 50rem; /* Lo rende un "pill" perfettamente arrotondato */
    
    font-size: 0.8rem; /* Testo piccolo e discreto */
    font-weight: 500;
    color: #6c757d; /* Colore testo secondario (Bootstrap 'secondary') */
}
.thumb img {
  max-width: 80px;
  margin-right: 10px;
}

.amz-logo-container {
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    color: #00aaff;
    margin-bottom: 0;
}

.checkmark {
    color: #ffaa00;
    margin-right: 2px;
    font-weight: bold;
}
.clearer{clear:both;}