/* ===================== RESET ===================== */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Poppins', sans-serif; background:#fae8cc; color:#222; line-height:1.6;padding-top: 85px; }
/* Aggiungi questo in alto nel RESET */
html { scroll-behavior: smooth; }


/* Ottimizzazione Logo Area */
.site-name { 
    font-family: 'Playfair Display', serif; /* Fallback se Victorian non carica */
    font-size: 1.6rem; 
    line-height: 1.1;
    color: #083f5f; /* Blu scuro per leggibilità */
}
.site-name small { font-size: 0.9rem; font-family: 'Poppins'; display: block; color: #333; }

/* Ottimizzazione Immagini */
img {
    max-width: 100%;
    height: auto;
    display: block;
    content-visibility: auto; 
}

/* Griglia Categorie -  */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Si adatta da solo! */
    gap: 15px;
    padding: 20px;
}

/* Effetto Hover Categorie  */
.category-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
/* ===================== HEADER ===================== */
header {
  background:#ffcc00;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.5rem 2rem;
  position:fixed;
  top:0; left:0; width:100%;
  z-index:1000;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}
.cart-link {
  position: relative;
  display: inline-block;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #c00;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  max-width: 30px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-badge.hidden {
  display: none;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #083f5f;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.logo-area { display:flex; align-items:center; gap:0.7rem; }
.nav-logo { width:45px; height:70px; object-fit:contain; }
.site-name { font-family:'Victorian LET', serif; font-size:1.8rem; text-shadow:1px 1px 3px rgba(255,255,255,0.7); }

/* MENU DESKTOP */
.desktop-menu { display:flex; gap:25px; font-weight:600; font-size:16px; }
.desktop-menu a { text-decoration:none; color:#333; position:relative; padding:5px 0; }
.desktop-menu a::after { content:''; position:absolute; left:0; bottom:-3px; width:0; height:2px; background:#333; transition:width 0.3s; }
.desktop-menu a:hover::after { width:100%; }
.desktop-menu a:hover { color:#000; }


/* ===================== HERO SLIDER ===================== */
.hero-slider { position:relative; height:100vh; overflow:hidden; }
.slide { position:absolute; width:100%; height:100%; background-size:cover; background-position:center; opacity:0; transition:opacity 1s ease-in-out; display:flex; justify-content:center; align-items:center; }
.slide.active { opacity:1; z-index:1; }
.slide-overlay { position:absolute; width:100%; height:100%; background:rgba(0,0,0,0.35); top:0; left:0; }
.slide-content { position:relative; text-align:center; color:#fff; z-index:2; }
.slide-content h2 { font-family:'Playfair Display', serif; font-size:3rem; margin-bottom:1rem; text-shadow:2px 2px 10px rgba(0,0,0,0.5); }
.slide-content p { font-size:1.2rem; margin-bottom:2rem; text-shadow:1px 1px 6px rgba(0,0,0,0.5); }
.btn-primary { background:#ffcc00; color:#83b5bf; padding:0.6rem 1.5rem; border-radius:8px; font-weight:bold; text-decoration:none; transition:all 0.3s ease; }
.btn-primary:hover { transform:scale(1.05); box-shadow:0 6px 12px rgba(0,0,0,0.3); }

/* SLIDE INDICATORS */
.slide-indicators { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); display:flex; gap:10px; z-index:3; }
.dot { width:12px; height:12px; background:rgba(255,255,255,0.5); border-radius:50%; cursor:pointer; transition:all 0.3s; }
.dot.active { background:#ffcc00; transform:scale(1.3); }

/* SLIDE ARROWS */
.slide-arrows { position:absolute; width:100%; top:50%; display:flex; justify-content:space-between; transform:translateY(-50%); z-index:3; }
.slide-arrows span { font-size:3rem; color:#fff; cursor:pointer; padding:0 20px; user-select:none; transition:color 0.3s; }
.slide-arrows span:hover { color:#ffcc00; }

/* PALLONCINI E NEVE */
.balloons-container, .snow-container { position:absolute; width:100%; height:100%; pointer-events:none; }
@keyframes rise { 0%{transform:translateY(0) scale(1); opacity:1;} 100%{transform:translateY(-120vh) scale(0.8); opacity:0;} }
@keyframes fall { 0%{transform:translateY(0) rotate(0deg); opacity:1;} 100%{transform:translateY(100vh) rotate(360deg); opacity:0;} }
.balloon { width:90px; height:90px; background-size:contain; background-repeat:no-repeat; position:absolute; }
.snowflake { width:10px; height:10px; background:white; border-radius:50%; position:absolute; opacity:0.7; }

/* MOBILE SLIDE 3 */
@media (max-width:768px){
  .slide:nth-child(3) {
    background-image:url('img/negozio-mobile.jpg');
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
  }
  .slide-content h2 { font-size:2rem; }
  .slide-content p { font-size:1rem; }
  .balloon { width:35px; height:50px; }
}
/* Barra social per mobile */
.mobile-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background:#ffcc00;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  border-top: 3px solid var(--bg);
  z-index: 1001;
}

.mobile-contact-bar a {
  color: #1a1a1a;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.mobile-contact-bar a:hover {
  color: var(--accent);
}

/* Nascondi barra su desktop */
@media (min-width: 769px) {
  .mobile-contact-bar { display: none; }
}

/* Mostra su mobile */
@media (max-width: 768px) {
  .social-icons { display: none; }
  body {
    padding-bottom: 80px;
  }
}



.social-icons {
    display: flex;              /* Allinea le icone in orizzontale */
    gap: 15px;                  /* Spazio tra le icone */
    align-items: center;        /* Centra verticalmente */
}

.social-icons a {
    display: flex;              /* Per centrare SVG dentro il link */
    width: 40px;                /* Larghezza uniforme */
    height: 40px;               /* Altezza uniforme */
    justify-content: center;    /* Centra orizzontalmente */
    align-items: center;        /* Centra verticalmente */
    background-color: #f0f0f0; /* Sfondo uniforme (opzionale) */
    border-radius: 50%;         /* Icone rotonde */
    transition: transform 0.2s; /* Animazione al passaggio del mouse */
}

.social-icons a:hover {
    transform: scale(1.1);      /* Effetto hover leggero */
}

.social-icons svg {
    width: 20px;                /* Dimensione SVG uniforme */
    height: 20px;
    fill: #333;                 /* Colore uniforme, cambia se vuoi */
}
.contact-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease, color 0.2s ease;
}

.contact-item:hover svg {
  transform: scale(1.15);
  color: var(--accent);
}
/* Nascondi su dispositivi con larghezza <= 768px */
@media screen and (max-width: 768px) {
    .social-icons {
        display: none;
    }
}
.product-card {
    background-color: #fdfbf7 !important; /* Un crema leggerissimo invece del bianco latte */
    border: 1px solid #eee; /* Un bordo sottile per definirle */
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

/* Effetto al passaggio del mouse: la card si alza leggermente */
.product-card:hover {
    background-color: #fff; /* Torna bianca solo quando ci passi sopra */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}
/* Impostazioni base per mobile first */
.product-detail-section {
  padding: 20px 10px;
}

.product-card-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Toglie il blu e la sottolineatura dai link dei prodotti */
.product-card, .product-card a {
    text-decoration: none !important;
    color: inherit; /* Prende il colore dal padre, senza diventare blu */
}

.product-card h3 {
    text-decoration: none !important;
    color: #083f5f; /* Il tuo blu scuro del brand */
    margin: 10px 0;
    font-family: 'Playfair Display', serif;
}
.product-card-detail img.product-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: cover;
  margin-bottom: 20px;
}

.product-info {
  width: 100%;
  max-width: 400px;
}

.product-actions a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 0;
  margin-bottom: 10px;
  font-size: 1rem;
  /* puoi usare variabili di colore già definite */
}

#productSearchResults .btn-wa img {
    width: 55px !important;
    height: 55px !important;
    display: inline-block;
    vertical-align: middle;
}

#productSearchResults .actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

#productSearchResults .btn-cart {
    flex: 1; /* Fa occupare al tasto "Richiedi" lo spazio rimanente */
}









/* Griglia prodotti – meno colonne su mobile */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* due colonne su mobile */
  gap: 15px;
  padding: 10px;
}/* Contenitore dei tasti in fondo alla card */
.product-card .actions {
    display: flex;
    justify-content: space-around; /* Distribuisce bene i 3 tasti */
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    margin-top: auto; /* Li spinge sempre in fondo */
}

/* Regola per le icone WhatsApp e Condividi */
.product-card .actions img {
    width: 32px !important;  /* Dimensione fissa per non farle esplodere */
    height: 32px !important; /* Mantiene la proporzione quadrata */
    object-fit: contain !important; /* Forza l'immagine a stare dentro senza tagliarsi */
    display: block;
}

/* Se i tasti sono dei link <a> che contengono le immagini */
.product-card .actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

@media (min-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr); /* tre colonne su tablet/desktop */
  }
}

/*GRIGLIA PRODOTTI RICERCATI*/

/* La griglia per i risultati della ricerca */
#productSearchResults {
    display: grid; /* Verrà attivato dal JS */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Forza 2 colonne sui cellulari piccoli */
@media (max-width: 480px) {
    #productSearchResults {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* Assicuriamoci che le card dentro la ricerca siano belle come le altre */
#productSearchResults .product-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* ===================== FOOTER ===================== */
footer {
    background-color: #83b5bf;    /* Azzurro coerente */
    color: #fff;
    text-align: center;
    padding: 1.5rem 1rem;
    font-family: 'Poppins', sans-serif;
}

/* --- HERO SLIDER & ANIMAZIONI --- */
.hero {
  position: relative;
  width: 100%; /* Meglio di 100vw per evitare scroll bar orizzontali */
  height: 100vh;
  overflow: hidden;
  background-color: #000; /* Fondo nero mentre caricano le immagini */
}

.hero-slide {
  position: absolute;
  inset: 0; /* Scorciatoia per top, left, width, height 100% */
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gestione Immagini Desktop/Mobile */
.hero-img.mobile { display: none; }

@media(max-width:768px) {
  .hero { height: 70vh; } /* Riduciamo un po' l'altezza su mobile */
  .hero-img.desktop { display: none; }
  .hero-img.mobile { 
    display: block; 
    object-fit: cover;
  }
  .hero-content h2 { font-size: 2rem; }
  .hero-content p { font-size: 1.1rem; }
}

/* Contenuto Testuale */
.hero-content {
  position: absolute;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  pointer-events: none;
  padding: 0 20px;
}

.hero-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem); /* Si adatta da solo alla grandezza schermo */
  margin-bottom: 1rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* Bottoni */
.btn {
  pointer-events: auto;
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px; /* Più moderni, a pillola */
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary { 
  background-color: var(--primary); 
  color: #000; 
  border: none; 
}

.btn-primary:hover { 
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Effetto Palloncini */
.balloon {
  position: absolute;
  width: 50px;
  height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  animation: floatUp 6s linear forwards;
}

@keyframes floatUp {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}

/* Navigazione */
.hero-nav {
  position: absolute;
  width: 100%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 3;
  padding: 0 20px;
}

.hero-nav span {
  cursor: pointer;
  font-size: 3rem;
  color: rgba(255,255,255,0.5);
  transition: all 0.3s;
}

.hero-nav span:hover { color: var(--primary); transform: scale(1.2); }

/* --- SEZIONI E TITOLI --- */
.categories-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  color: var(--primary); /* Usiamo la variabile per coerenza */
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  position: relative;
}

/* Una piccola linea sotto il titolo per fare scena */
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin: 10px auto 0;
}

/* --- RICERCA --- */
.category-search {
  width: 100%;
  max-width: 500px;
  display: block;
  margin: 0 auto 30px;
  padding: 12px 20px;
  border: 2px solid #eee;
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.category-search:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- GRIGLIA CATEGORIE (Icone tonde e pulite) --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-card img {
    width: 100%;             /* Prende tutta la larghezza del suo contenitore desktop */
    height: auto !important; /* Calcola l'altezza in base alle proporzioni native, azzerando il Layout Shift */
    border-radius: 50%; /* Le icone tonde sono più moderne */
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f9f9f9;
}
@media (max-width: 768px) {
    /* 1. Ingrandiamo il contenitore dell'icona */
    .category-card {
        flex: 0 0 95px !important; /* Diamo un po' più di larghezza alla card */
    }

   .category-img-wrapper {
        width: 65px !important;       /* Ripristina la dimensione fissa corretta */
        height: 65px !important;      /* Forza l'altezza quadrata/cerchio */
        margin: 0 auto 8px auto;
        background: #fff;
        border: 2px solid #eee;
        border-radius: 50%;           /* Se vuoi mantenere il taglio tondo/ovale */
        overflow: hidden;             /* Taglia l'immagine che esce dallo zoom */
    }

    /* 2. L'immagine dentro si adatta al contenitore senza deformarsi */
    .category-img-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Riempie la cornice senza distorsioni */
        transform: scale(1.1);        /* Il tuo leggero zoom */
    }
}

.category-card:hover img {
  border-color: #ffcc00;
  transform: scale(1.1);
}


.category-name {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis; /* Aggiunge i puntini se è troppo lungo... */
    white-space: nowrap;     /* Impedisce di andare su mille righe */
    font-size: 0.8rem;
    text-align: center;
    padding: 0 5px;
    color: #444;
}
/* --- GRIGLIA PRODOTTI --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}

.product-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-info {
  padding: 15px;
  flex-grow: 1;
}

.product-card h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}

.product-card .price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

/* Pulsanti Azione (Carrello, Info) */
.actions {
  display: flex;
  padding: 15px;
  gap: 10px;
  border-top: 1px solid #f9f9f9;
}

/* Contenitore dei pulsanti */
.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

/* Stile per i link di WhatsApp e Condividi */
.btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;  /* Dimensione del cerchio/area cliccabile */
    height: 55px;
}

/* Stile specifico per le immagini dentro i link */
.btn-wa img {
    width: 100%;   /* L'immagine riempie il contenitore .btn-wa */
    height: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.btn-wa:hover img {
    transform: scale(1.1); /* Effetto ingrandimento al passaggio */
}

/* Assicurati che il pulsante carrello non schiacci gli altri */
.btn-cart {
    flex-grow: 1; /* Prende lo spazio rimanente */
    padding: 8px 12px;
    font-size: 14px;
}



.actions button, .actions a {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #f0f0f0;
  color: #333;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.actions .btn-add-cart:hover {
  background: var(--primary);
  color: white;
}

/* --- GRIGLIA PRODOTTI --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Si adatta da solo: 4, 3, 2 o 1 colonna */
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

@media (max-width: 760px) {
    .products-grid {
        grid-template-columns: 1fr; /* Una colonna pulita su mobile */
        gap: 1.5rem;
    }
}

/* --- CARD PRODOTTO BASE --- */
.product-card {
    position: relative;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forza l'immagine quadrata, molto più ordinato */
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* --- ICONA CATEGORIA SOPRA L'IMMAGINE --- */
.category-icon {
    width: 45px !important;
    height: 45px !important;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px); /* Effetto vetro sfocato */
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- TESTI --- */
.product-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #0c3f5f;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.product-card .price {
    font-family: "Playfair Display", serif;
    font-size: 1.2rem;
    color: #7a5035;
    font-weight: 600;
    margin: 10px auto;
    padding: 4px 15px;
    border-radius: 20px;
    background: rgba(122, 80, 53, 0.1);
    border: 1px solid rgba(122, 80, 53, 0.2);
    display: inline-block;
}

/* --- STILI STAGIONALI (Pattern e Sfondi) --- */
.season-Inverno { 
    border-bottom: 5px solid #83b5bf; /* Azzurro ghiaccio */
    background-color: #f0f8fa; 
}
.season-Primavera { 
    border-bottom: 5px solid #a8d5a2; 
    background-image: radial-gradient(rgba(255,255,255,0.5) 2px, transparent 2px);
    background-size: 15px 15px;
}
.season-Estate { 
    border-bottom: 5px solid #ffcc00; 
    background-color: #fffef2;
}
.season-Autunno { 
    border-bottom: 5px solid #d67277; 
    background-image: linear-gradient(135deg, rgba(214, 114, 119, 0.05) 25%, transparent 25%);
    background-size: 10px 10px;
}

/* --- AZIONI (Carrello/Info) --- */
.product-card .actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto; /* Spinge i bottoni sempre in fondo */
    padding-top: 1rem;
}

.product-card .actions img {
    width: 40px;
    height: 40px;
    transition: transform 0.2s;
}

.product-card .actions img:hover {
    transform: scale(1.2) rotate(5deg);
}
/* --- TOP COLLECTION (Carosello Orizzontale) --- */
.top-collection {
  margin: 50px auto;
  padding: 0 20px;
  max-width: 1200px;
}

.top-collection h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #083f5f;
  margin-bottom: 20px;
  text-align: left;
}

.top-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  scrollbar-width: thin; /* Per Firefox */
  scrollbar-color: var(--primary) #f0f0f0;
}

/* Personalizzazione Scrollbar per Chrome/Safari */
.top-slider::-webkit-scrollbar {
  height: 6px;
}
.top-slider::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}
.top-slider::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.top-card {
  min-width: 200px; /* Leggermente più grande per far leggere meglio i titoli */
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  border: 1px solid #f9f9f9;
}

.top-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.top-card img {
  width: 100%;
  height: 280px; /* Un po' più alta per dare slancio al prodotto */
  object-fit: cover;
}

.top-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  padding: 15px;
  margin: 0;
  color: #333;
  line-height: 1.3;
  text-align: center;
}
/* Rimuove la sottolineatura e il blu dai link della Top Collection */
.top-card {
    text-decoration: none !important;
}

.top-card h3 {
    color: #083f5f; /* Il blu scuro del tuo brand */
    text-decoration: none !important;
    margin-top: 10px;
}

/* Evita che il titolo diventi viola dopo averlo cliccato */
.top-card:visited, .top-card:active {
    text-decoration: none;
    color: #083f5f;
}

/* Opzionale: un leggero cambio colore solo al passaggio del mouse */
.top-card:hover h3 {
    color: #ffcc00; /* Il giallo del logo per dare un feedback */
}
/* ======================================================
   STILI MOBILE (Sotto i 768px) 
   ====================================================== */
@media screen and (max-width: 768px) {

  /* --- HEADER & LOGO --- */
  .logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
  }

  .nav-logo {
    width: 45px; /* Leggermente più piccolo per lasciare respiro */
    height: auto;
  }

  .site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #083f5f;
    letter-spacing: -0.5px;
  }

  /* --- HERO SLIDER MOBILE --- */
  .hero {
    height: 45vh; /* Più bilanciato per i telefoni moderni */
    margin-top: 60px;
  }

  /* Nascondiamo i testi ingombranti per dare spazio alle immagini del Mercante */
  .hero-content h2, 
  .hero-content p {
    display: none;
  }

  .hero-nav span {
    font-size: 1.8rem;
    padding: 0 10px;
  }

  /* --- CATEGORIE SWIPE (Effetto App) --- */
  .categories-section {
    padding: 15px 10px;
    background: #fff;
  }

  .categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Aggancio perfetto delle icone */
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 5px 20px 5px;
  }

  /* Nascondi la scrollbar brutta su mobile */
  .categories-grid::-webkit-scrollbar {
    display: none;
  }

  .category-card {
    flex: 0 0 85px; /* Dimensione fissa per lo swipe */
    scroll-snap-align: center;
    background: #fdfbf7;
    border: 1px solid #eee;
    padding: 12px 8px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  }

  .category-img-wrapper {
    width: 45px;
    height: 45px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  }

  .category-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #083f5f;
  }
}/* --- HAMBURGER ICON --- */
.hamburger {
  display: none;
  width: 30px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 10000; /* Sempre sopra tutto */
  padding: 0;
  background: none;
  border: none;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: #083f5f; /* Blu scuro coerente col brand */
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Trasformazione in X */
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 7px); background: #fff; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); background: #fff; }

/* --- MOBILE MENU OVERLAY --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* Nascosto a destra */
  width: 100%;
  height: 100vh;
  background: rgba(8, 63, 95, 0.98); /* Blu profondo con leggera trasparenza */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  z-index: 9998;
  transition: right 0.4s ease; /* Entrata fluida da destra */
}

.mobile-menu.show {
  right: 0; /* Appare! */
}

.mobile-menu a {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  text-decoration: none;
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--primary);
}

/* --- MEDIA QUERY RECOVERY --- */
@media (max-width: 768px) {
  .desktop-menu { display: none; }
  .hamburger { display: flex; }
  
  /* Blocca lo scroll della pagina quando il menu è aperto */
  body.menu-open {
    overflow: hidden;
  }
}
/* ===================== MENU MOBILE DEFINITIVO ===================== */
@media (max-width: 768px) {
    .desktop-menu { display: none !important; }
    
    .hamburger {
        display: flex !important;
        width: 30px; height: 22px;
        flex-direction: column; justify-content: space-between;
        cursor: pointer; z-index: 10001; position: relative;
    }

    .hamburger span {
        height: 3px; width: 100%; background: #083f5f;
        border-radius: 10px; transition: all 0.3s ease;
    }

    /* Trasformazione in X */
    .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 7px); background: #fff; }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); background: #fff; }

    .mobile-menu {
        position: fixed; top: 0; right: -100%; /* Parte da fuori schermo */
        width: 100%; height: 100vh;
        background: rgba(8, 63, 95, 0.98);
        display: flex !important; /* Sempre flex, ma spostato a destra */
        flex-direction: column; align-items: center; justify-content: center;
        gap: 25px; z-index: 10000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu.show {
        right: 0; /* Entra in campo */
    }

    .mobile-menu a {
        color: #fff; font-family: 'Playfair Display', serif;
        font-size: 1.8rem; text-decoration: none;
    }
    
    body.menu-open { overflow: hidden; }
}


/*FOOTER*/ 
.main-footer {
    background-color: #083f5f; /* Il tuo blu brand */
    color: #ffffff;
    padding: 40px 20px 20px;
    margin-top: 50px;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px; /* Si impila su mobile automaticamente */
}

.footer-column h4 {
    color: #ffcc00; /* Giallo brand per i titoli */
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 1rem;
}

.footer-column p {
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #ccc;
}

/* La fascia dei servizi sotto le colonne */
.footer-services {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 30px;
    background-color: rgba(0,0,0,0.2); /* Scurisce leggermente lo sfondo per staccare */
}

.service-box {
    text-align: center;
}

.service-box h5 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Badge Indabox: ora ha uno sfondo bianco per non perdersi sul blu */
.indabox-footer-link {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 5px 15px;
    border-radius: 5px;
    text-decoration: none !important;
}

.indabox-footer-link img {
    height: 25px;
    margin-right: 10px;
}

.indabox-footer-link span {
    color: #083f5f; /* Testo blu scuro sullo sfondo bianco del badge */
    font-weight: bold;
    font-size: 0.85rem;
}

/* Icone Pagamenti */
.payment-icons {
    font-size: 1.8rem;
    color: white;
    display: flex;
    gap: 15px;
    align-items: center;
}

.cash-text {
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid white;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .footer-services {
        flex-direction: column;
        gap: 25px;
    }
}
/* Fix per mobile */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
.payment-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    color: #ffffff;
}

/* Icona Satispay fatta a mano */
.satispay-icon {
    background-color: #e52e2d; /* Il rosso Satispay */
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px; /* Leggermente arrotondata come il loro logo */
    line-height: 1;
}

/* PayPal di solito ha il suo azzurro, ma bianche sono più eleganti. 
   Se le vuoi colorate al passaggio del mouse: */
.fa-cc-paypal:hover { color: #003087; }
.fa-cc-visa:hover { color: #1a1f71; }
.fa-cc-mastercard:hover { color: #eb001b; }

.cash-text {
    font-size: 10px;
    font-weight: bold;
    border: 1px solid #ffffff;
    padding: 3px 6px;
    border-radius: 4px;
}
/* Badge GoWelfare stilizzato */
.gowelfare-icon {
    background-color: #00a1e4; /* Il tipico azzurro dei circuiti welfare */
    color: white;
    font-family: 'Arial Black', sans-serif;
    font-size: 10px;
    font-weight: bold;
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Un piccolo effetto hover coordinato */
.gowelfare-icon:hover {
    background-color: #0081b8;
    transform: scale(1.1);
    transition: 0.2s;
}


/*pagina prodotto.php*/

.product-page-container {
    padding: 40px 5%;
    background: #f9f9f9;
}

.product-wrapper {
    display: flex;
    gap: 50px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Galleria */
.product-gallery { flex: 1.2; }
.main-image-container img {
    width: 100%;
    border-radius: 10px;
    object-fit: contain;
    max-height: 500px;
}
.thumb-grid { display: flex; gap: 10px; margin-top: 15px; }
.thumb { 
    width: 80px; height: 80px; object-fit: cover; 
    cursor: pointer; border-radius: 5px; opacity: 0.6; transition: 0.3s;
}
.thumb.active, .thumb:hover { opacity: 1; border: 2px solid #083f5f; }

/* Dettagli */
.product-details-info { flex: 1; display: flex; flex-direction: column; }
.product-title { font-family: 'Playfair Display', serif; color: #083f5f; font-size: 2rem; margin-bottom: 10px; }
.product-sku { color: #888; font-size: 0.9rem; margin-bottom: 20px; }
.price-tag { margin-bottom: 25px; color: #d32f2f; font-weight: 700; }
.price-tag .amount { font-size: 2.5rem; }

.product-badge {
    background: #e8f5e9; color: #2e7d32; padding: 8px 15px;
    border-radius: 50px; display: inline-block; width: fit-content; margin-bottom: 30px;
}

/* Bottoni */
.btn-main-cart {
    background: #083f5f; color: white; border: none; padding: 18px;
    width: 100%; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: 0.3s; margin-bottom: 15px;
}
.btn-main-cart:hover { background: #0a5682; transform: translateY(-2px); }

.secondary-actions { display: flex; gap: 10px; }
.btn-wa-outline {
    flex: 1; border: 1px solid #25D366; color: #25D366; text-align: center;
    padding: 10px; border-radius: 8px; text-decoration: none; transition: 0.3s;
}
.btn-wa-outline:hover { background: #25D366; color: #fff; }

.store-features { margin-top: 40px; border-top: 1px solid #eee; padding-top: 20px; }
.feature-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; color: #555; }

/* Mobile */
@media (max-width: 768px) {
    .product-wrapper { flex-direction: column; padding: 15px; }
    .product-page-container { padding: 10px; }
}
/* Contenitore principale */
.breadcrumb-container {
    margin-bottom: 20px;
    padding: 10px 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap; /* Fondamentale per il mobile */
}

/* Elementi e Link */
.breadcrumb-item a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px; /* Spazio tra icona home e testo */
}

.breadcrumb-item a:hover {
    color: #083f5f; /* Il tuo blu principale */
}

/* Separatore */
.breadcrumb-separator {
    margin: 0 12px;
    color: #ccc;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
}

/* Pagina Attiva (non cliccabile) */
.breadcrumb-item.active span {
    color: #083f5f;
    font-size: 0.85rem;
    font-weight: 600;
    background: #eef4f7; /* Un leggero sfondo azzurrino per evidenziarlo */
    padding: 4px 12px;
    border-radius: 20px;
}

/* Ottimizzazione Mobile */
@media (max-width: 600px) {
    .breadcrumb-item:not(.active):not(:first-child) {
        display: none; /* Nascondiamo i passaggi intermedi su schermi molto piccoli per evitare confusione */
    }
}

/* Il contenitore bianco che vediamo nello screenshot */
.product-wrapper {
    display: flex;
    flex-direction: column; /* Mette gli elementi uno sotto l'altro */
    align-items: center;    /* Centra orizzontalmente tutti i figli */
    justify-content: center;
    max-width: 800px;       /* Stringiamo un po' per non disperdere i testi */
    margin: 40px auto;      /* Centra il blocco nella pagina e dà respiro sopra/sotto */
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* La galleria/immagine */
.product-gallery {
    width: 100%;
    max-width: 350px;       /* Dimensione ideale per una copertina centrata */
    margin-bottom: 30px;    /* Spazio tra foto e titolo */
}

.main-image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Info del prodotto */
.product-details-info {
    width: 100%;
    text-align: center;     /* Centra i testi, il prezzo e i bottoni */
}

/* Centriamo anche il Breadcrumb (Home > Libri...) */
.breadcrumb-list {
    justify-content: center;
    display: flex;
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

/* Centriamo i tasti azione */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}