/**
Theme Name: Book Shop Alfani
Author: tequis
Author URI: https://davidebonetti.com/
Description: Child Theme Book Shop Alfani
Version: 1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: book-shop-alfani
Template: astra
*/

  /* =========================
   *  STILI FONT
   * ========================= */


@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
.poppins-thin {
  font-family: "Poppins", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.poppins-extralight {
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.poppins-light {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.poppins-regular {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.poppins-medium {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.poppins-semibold {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.poppins-bold {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.poppins-extrabold {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.poppins-black {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.poppins-thin-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.poppins-extralight-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: italic;
}

.poppins-light-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.poppins-regular-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.poppins-medium-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.poppins-semibold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: italic;
}

.poppins-bold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.poppins-extrabold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.poppins-black-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-style: italic;
}



.playfair-display-400 {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}


  /* =========================
   * Menu 
   * ========================= */

.main-header-menu > .menu-item > .menu-link, #astra-footer-menu > .menu-item > .menu-link {
 
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    color:#560008;
}

/* Colore Voce Menu Attiva (Pagina Corrente) */
.ast-builder-menu .main-header-menu .current-menu-item > .menu-link,
.ast-builder-menu .main-header-menu .current-menu-ancestor > .menu-link {
    color: #560008 !important; /* Il tuo rosso */
    font-weight: 600!important;          /* Opzionale: lo rende anche grassetto */
}


  /* =========================
   * Footer
   * ========================= */

.ast-footer-copyright {
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-size: 12px;
}



/* FOOTER */
.custom-footer {
    background: #fff;
}

/* CONTENITORE */
.custom-footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    height: 200px;
    text-align: left;
}

.footer-col {
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
}

/* wrapper interno */
.footer-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
}

/* social affiancati */
.social-icons {
    display: flex;
    gap: 5px;
}

/* icone */
.social-link {
    display: inline-flex;
    color: #560008;
    font-size: 24px;
    text-decoration: none;
}

.social-link:hover {
    
    color: #C9A24D!important;
  
}


/* TESTO */
.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
}

/* LINEE VERTICALI (prime 3 colonne) */
.footer-col.with-divider {
    border-right: 1px solid #ccc;
}

/* TABLET */
@media (max-width: 1024px) {
    .custom-footer-inner {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
    }

    .footer-col.with-divider {
        border-right: none;
    }

    .footer-col:nth-child(odd) {
        border-right: 1px solid #ccc;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .custom-footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-col {
        border-right: none !important;
        border-bottom: 1px solid #ccc;
        height: auto;
    }

    .footer-col:last-child {
        border-bottom: none;
    }
}

.site-primary-footer-wrap {
    background-color: #fff!important;
    background-image: none;
    border-style: solid;
    border-width: 0px;
    border-top-width: 0px!important;
    border-top-color: var(--ast-global-color-subtle-background, --ast-global-color-7);
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] {
    background-color: var(--ast-global-color-4);
    background-image: none;
    min-height: 60px;
    border-style: solid;
    border-width: 0px;
    border-top-width: 0px!important;
   
}

/* paddign footer*/ 
.site-primary-footer-wrap {
    padding-top: 30px;
    padding-bottom: 0px;
}

.site-below-footer-wrap {
    padding-top: 0px;
    padding-bottom: 0px;
}


.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row {
    max-width: 1300px!important;
  
}

a.ex5 {
    text-decoration: none !important;
    color:#560008;
}

a.ex5:hover, a.ex5:active {
    text-decoration:underline!important;
    color:#560008;
    
}


a.ex6 {
    text-decoration: none !important;
    color:#fff;
}

a.ex6:hover, a.ex5:active {
    text-decoration:underline!important;
    color:#fff;
    
}


/* STRISCIA */
.full-strip {
    width: 100%;
    min-height: 120px; /* Usiamo min-height invece di height */
    background-color: #560008;
    display: flex;
    align-items: center;
    padding: 20px 0; /* Aggiunge respiro sopra e sotto */
}

/* --- GRID (Passa da 2 colonne a 1 sul mobile) --- */
.strip-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* --- COLONNE --- */
.strip-col {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    color: #fff;
}

/* CONTENUTO TESTO + ICONA */
.strip-col .content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 460px;
}

/* BLOCCO TESTO (2 righe) */
.strip-col .text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}


/* SINISTRA */
.col-left {
    justify-content: flex-end;
    border-right: 1px solid #C9A24D;
}

.col-left .content {
    flex-direction: row;       /* testo → icona */
    text-align: right;
}

/* DESTRA */
.col-right {
    justify-content: flex-start;
}

.col-right .content {
    flex-direction: row;       /* icona → testo */
    text-align: left;
}

/* TESTO */
.strip-col p {
    margin: 0;
    line-height: 1.5;
}

.flw {
  font-size:26px;
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.flf {
  font-size:26px;
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  color: #560008;
}

.flt {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* ICONA */
.icon-book {
    font-size: 45px;
    color: #C9A24D;
    flex-shrink: 0;
}

.icon-info {
    font-size: 45px;
    color: #C9A24D;
    flex-shrink: 0;
}


.site-above-footer-wrap[data-section="section-above-footer-builder"] {
    background-color: #560008;
    background-image: none;
    min-height: 60px;
}

.site-above-footer-wrap {
    padding-top: 10px!important;
    padding-bottom: 20px!important;
}


@media (max-width: 921px) {
    .strip-inner {
        grid-template-columns: 1fr; /* Una colonna sola */
    }

    .col-left {
        justify-content: center; /* Centra il contenuto */
        border-right: none !important; /* Rimuove la riga verticale */
        border-bottom: 1px solid #C9A24D; /* Aggiunge riga orizzontale divisoria */
        text-align: center;
    }

    .col-right {
        justify-content: center; /* Centra il contenuto */
        text-align: center;
    }

    .strip-col .content {
        flex-direction: column !important; /* Icona sopra o sotto il testo */
        text-align: center !important;
        max-width: 100%;
    }

    .col-left .content {
        flex-direction: column-reverse !important; /* Testo sopra, icona sotto */
    }

    .flw {
        font-size: 22px; /* Rimpicciolisce leggermente il titolo */
    }
}

  /* =========================
   *  RICERCA
   * ========================= */
/* ICONA */
/* --- OVERLAY CONTENITORE --- */
/* =========================================
   1. OVERLAY & BACKDROP
   ========================================= */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    visibility: hidden; 
    transition: visibility 0s linear 0.5s; 
}

.search-overlay.active {
    visibility: visible;
    transition-delay: 0s;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    /* Effetto sfocatura sfondo 
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);*/
    opacity: 0;
    transition: opacity 0.5s ease; 
}

.search-overlay.active .search-backdrop {
    opacity: 1;
}

/* =========================================
   2. PANNELLO BIANCO (CONTENITORE)
   ========================================= */

.search-panel {
    background: #fff;
    width: 100%;
    
    /* Altezza dinamica */
    height: auto;
    min-height: 150px;
    max-height: 70vh;
    
    margin: 0; 
    padding: 20px 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    
    /* Animazione Pannello */
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.search-overlay.active .search-panel {
    transform: translateY(0);
}

/* =========================================
   3. INPUT DI RICERCA
   ========================================= */

/* =========================================
   1. OVERLAY & BACKDROP (Nessuna modifica)
   ========================================= */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    visibility: hidden; 
    transition: visibility 0s linear 0.5s; 
}

.search-overlay.active {
    visibility: visible;
    transition-delay: 0s;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.5s ease; 
}

.search-overlay.active .search-backdrop {
    opacity: 1;
}

/* =========================================
   2. PANNELLO BIANCO
   ========================================= */
.search-panel {
    background: #fff;
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 80vh;
    margin: 0; 
    padding: 30px 30px 40px 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.search-overlay.active .search-panel {
    transform: translateY(0);
}

/* Titolo "Cerca un libro" */
.search-panel p.flw {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* =========================================
   3. INPUT E WRAPPER (Il tuo stile integrato)
   ========================================= */

/* WRAPPER: Contiene Input e Icona */
.search-input-wrapper {
    position: relative; 
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    
    
    margin-top: -15px; 
    
    /* Animazione Entrata */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* INPUT: Il tuo stile specifico */
#ajax-search-input {
    display: block;
    width: 100%;
    
    /* Dimensioni e Spazi */
    padding: 15px 60px 15px 25px; 
    flex-shrink: 0;
    
    /* Font e Colori (Tuo codice) */
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #000;
    
    /* Stile Bordo e Sfondo (Tuo codice) */
    background-color: #fff;
    border: 1px solid #560008;
    border-radius: 5px; 
    outline: none;
    
}



/* ICONA LENTE (Tuo codice) */
.search-icon-inside {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    
    font-size: 20px;
    color: #560008;
    pointer-events: none;
    opacity: 0.7;
}

/* =========================================
   4. RISULTATI E SCROLLBAR
   ========================================= */
.search-results {
    width: 100%;
    max-width: 650px; 
    margin: 20px auto 0 auto;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.search-result-item {
    padding: 15px 10px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s, padding-left 0.2s;
}

.search-result-item:hover {
    background: #fafafa;
    padding-left: 15px;
}

.search-result-more {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #560008;
    cursor: pointer;
    border-top: 1px solid rgba(0,0,0,.1);
}

.search-result-more:hover {
    text-decoration: underline;
}


/* =========================================
   5. PULSANTE CHIUDI (X)
   ========================================= */
.search-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
/* Forza background trasparente e toglie bordi */
    background: transparent !important; 
    border: none !important;
    cursor: pointer;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s;
    z-index: 10;
    color:#000;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.0)!important;
}

.search-close:hover {
    opacity: 0.5;
    transform: rotate(180deg); 
    color:#000!important;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.0)!important;
}

/* =========================================
   6. GESTIONE VISIBILITÀ (ANIMAZIONI)
   ========================================= */

/* Attiva tutto quando overlay ha la classe .active */
.search-overlay.active .search-panel p.flw,
.search-overlay.active .search-input-wrapper, 
.search-overlay.active .search-results {
    opacity: 1;
    transform: translateY(0);
}

/* Ritardi a cascata */
.search-overlay.active .search-input-wrapper {
    transition-delay: 0.05s;
}
.search-overlay.active .search-results {
    transition-delay: 0.1s;
}


/* =========================================
   4. RISULTATI (LISTA)
   ========================================= */

.search-results {
    width: 100%;
    max-width: 650px; 
    margin: 20px auto 0 auto;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    
    /* Gestione Scroll */
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    
    /* Animazione Risultati */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Scrollbar Webkit (Chrome/Safari) */
.search-results::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

/* =========================================
   5. ITEMS DEI RISULTATI
   ========================================= */

.search-result-item {
    padding: 15px 10px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s, padding-left 0.2s;
}

.search-result-item:hover {
    background: #fafafa;
    padding-left: 15px;
}

/* =========================================
   6. PULSANTE CHIUDI (X)
   ========================================= */

.search-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.3s;
    z-index: 10;
}

.search-close:hover {
    opacity: 1;
    transform: rotate(90deg); 
}

/* =========================================
   7. GESTIONE STATO ATTIVO (ANIMAZIONI INTERNE)
   ========================================= */

/* Quando l'overlay è attivo, fai apparire input e risultati */
.search-overlay.active #ajax-search-input, 
.search-overlay.active .search-results {
    opacity: 1;
    transform: translateY(0);
}

/* Ritardo leggero per i risultati (Effetto cascata) */
.search-overlay.active .search-results {
    transition-delay: 0.1s;
}

/* miniature */

.search-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(0,0,0,.04);
}

.search-thumb {
    width: 48px;
    height: 72px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-meta {
    display: flex;
    flex-direction: column;
}

.search-meta strong {
    font-size: 14px;
    line-height: 1.2;
}

.search-meta span {
    font-size: 12px;
    opacity: .7;
}



  /* =========================
   *  SHOP
   * ========================= */


/* Limita titolo prodotto a 2 righe SOLO nello shop */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* numero di righe */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  min-height: 2.8em;          /* allinea le card */
  line-height: 1.4em;
  margin-top: 5px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
  color:#560008;
}

/* stile del prezzo nello shop */ 
.woocommerce-js ul.products li.product .price, .woocommerce-page ul.products li.product .price {
    line-height: 1.3;
    margin-bottom: 0;
    font-weight: 700;
    margin-bottom: .5em;
    font-size: .9em;
    font-family: "Poppins", sans-serif;
    text-align: center;
}


/* CONTENITORE IMMAGINE PRODOTTO */
.woocommerce ul.products li.product a img {
  height: 300px;           /* scegli tu: 320–380 */
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  display: block;
}
 /* pagina prodotto spazio orizonatale tra imamgine e dati a lato*/

 @media (min-width: 922px) {
    .woocommerce #content .ast-woocommerce-container div.product div.summary, .woocommerce .ast-woocommerce-container div.product div.summary, .woocommerce-page #content .ast-woocommerce-container div.product div.summary, .woocommerce-page .ast-woocommerce-container div.product div.summary {
        width: 60%;
    }
}

/* woo description */ 

.wc-tabs-wrapper{
   font-family: "Poppins", sans-serif;
    font-weight: 400;
}

.summary {

  font-family: "Poppins", sans-serif;

}
/* Tassonomie */

.book-details {
  font-family: "Poppins", sans-serif;
  font-weight: 400;

}

.book-topics {
    font-family: "Poppins", sans-serif;
    font-weight: 400;

}

.book-topics a {
    color: #560008;
    text-decoration: none;
    text-transform: none
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    
}

.book-topics a:hover {
    text-decoration: underline;

}

.autor-publisher {
    display: flex; gap: 20px;
}

.single-product-category {
    display: none!important;
}

/* FLOATING CART */
.floating-cart {
    position: fixed;
    right: 20px;
    top: 80px; 
    width: 52px;
    height: 52px;
    background-color: #560008;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);

    /* --- NOVITÀ: Transizione fluida --- */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Regola per nascondere il carrello */
/* Si attiva solo quando aggiungiamo la classe "is-hidden" via JS */
@media (max-width: 768px) {
    .floating-cart.is-hidden {
        transform: scale(0); /* Si rimpicciolisce fino a sparire */
        opacity: 0;          /* Diventa trasparente */
        pointer-events: none; /* Non è cliccabile mentre è nascosto */
    }
}

@media (max-width: 768px) {
    .floating-cart {
    right: 18px;
    top: 50px; /* regola altezza */
    }
}

/* ICONA */
.floating-cart i {
    font-size: 22px;
}

/* BADGE NUMERO */
.floating-cart .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;

    background-color: #C9A24D; /* oro */
    color: #000;

    font-size: 12px;
    font-weight: 600;

    min-width: 20px;
    height: 20px;

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cart i {
    color: #fff;
    transition: color 0.2s ease;
}

.floating-cart:hover i {
    color: #C9A24D; /* oro */
}

/* */
/* OVERLAY */
.mini-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    /* Animazione morbida dell'opacità */
    transition: opacity 0.5s ease; 
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 9998;
}

/* DRAWER */
.mini-cart-drawer {
    position: fixed;
    top: 0;
    right: -360px;
    width: 360px;
    height: 100vh;
    background: #fff;
    padding: 20px;
    /*box-shadow: -10px 0 30px rgba(0,0,0,0.2);*/
    transition: right .3s ease;
    z-index: 9999;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .mini-cart-drawer {
    height: 100%;
    }
}

/* --- FIX CARRELLO E CHECKOUT SU MOBILE --- */
@media (max-width: 921px) {

    /* 1. Mette in riga il contenitore principale di Astra */
    .ast-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        overflow-x: hidden; /* Impedisce che la pagina balli a destra/sinistra */
    }

  
    .wp-block-woocommerce-cart,
    .wp-block-woocommerce-checkout {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 3. Sistema l'interno dei blocchi per non avere doppio spazio */
    .wc-block-cart__main, 
    .wc-block-cart__sidebar,
    .wc-block-checkout__main, 
    .wc-block-checkout__sidebar {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 4. Fix specifico per la Tabella del Carrello (che spesso spinge a destra) */
    .wc-block-cart-items, 
    .wc-block-cart-items table {
        table-layout: fixed; /* Forza la tabella a stare nei bordi */
        width: 100%;
    }
    
    /* Riduce un po' l'immagine del prodotto su mobile per dare spazio al testo */
    .wc-block-cart-item__image img {
        max-width: 60px !important; 
    }
}


/* APERTO */
.mini-cart-drawer.active {
    right: 0;
}

.mini-cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mini-cart-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;

    color: #560008;
    line-height: 1;
    padding: 4px;

    transition: color .2s ease, transform .2s ease;
}

.mini-cart-close:hover {
    color: #C9A24D;
    transform: scale(1.1);
}

.mini-cart-close:focus-visible {
    outline: 2px solid #C9A24D;
    outline-offset: 2px;
}


.woocommerce-js .mini-cart-drawer .woocommerce-mini-cart__buttons .button {
    margin-top: 10px;
    margin-right: 5px;
    padding-top: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    padding-left: 15px;
}

.woocommerce-mini-cart__loading {
    display: none !important;
}


/* Nasconde SOLO il messaggio vuoto duplicato di Astra */
.mini-cart-drawer .ast-mini-cart-empty .woocommerce-mini-cart__empty-message {
    display: none;
}

/* Nasconde il separatore tratteggiato */
.wp-block-woocommerce-empty-cart-block .wp-block-separator {
    display: none !important;
}

/* Nasconde il titolo 'Novità in negozio' */
/* Selezioniamo l'H2 che NON è il titolo principale 'Il tuo carrello è vuoto' */
.wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) {
    display: none !important;
}

/* Nasconde la griglia dei nuovi prodotti */
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new {
    display: none !important;
}

/* Libri correlati */ 
.related-books-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px;
}

.related-books {
    width: 80vw;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 40px 5vw;
    
}

.related-book img {
    width: 100%;
    height: 260px;         
    object-fit: contain;   
}

.related-book .title {
    display: block;
    font-size: 14px;
    margin-top: 6px;
}

/* Tablet */
@media (max-width: 1024px) {
    .related-books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .related-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-book img {
  width: 100%;
  aspect-ratio: 2 / 3;    
  height: auto;
  object-fit: contain;    
  display: block;
  
}
.related-books h3 {
    text-align: center;
    margin-bottom: 24px;
}

/* FIX francobollo bianco sotto le copertine nei correlati */
.related-books img.wp-post-image {
    display: block;          
    background: transparent; 
    box-shadow: none;        
    border: 0;
    padding: 0;
}


/* heading delle pagine archivio v1*/

.ast-archive-description {
    margin-bottom: 2.5em;
    padding-bottom: 1.3333em;
    border-bottom: 1px solid var(--ast-border-color);
    font-size:26px;
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    color: #560008;
}

/* heading delle pagine archivio v2*/
.ast-archive-entry-banner {
    -js-display: flex;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color:#fff!important;
}

.ast-archive-entry-banner[data-post-type="product"] .ast-container h1 {
    font-size:36px;
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    color: #000;
    text-align: center;
}

/* Ombra dei correlati*/

.ast-article-single figure, .ast-article-single img:not(figure img) {
    box-shadow: none!important;
    -webkit-box-shadow: none!important;
    -moz-box-shadow: none!important;
}

.woocommerce-pagination {

}

 /* =========================
   *  SITE STYLE
   * ========================= */

  h2 {

  font-family: "Poppins", sans-serif;

  }

 h3 {

  font-family: "Poppins", sans-serif;
  font-size: 20px;

  }

.button,
.wp-element-button {
    border-color: #560008 !important;
    background-color: #560008 !important;
    color: #fff !important;
    transition: all 0.25s ease;
    border-radius: 5px;
}

.button:hover,
.wp-element-button:hover {
    background-color: #C9A24D !important;
    border-color: #C9A24D !important; /* oro */
    box-shadow: 0 0 0 2px rgba(201,162,77,0.35);
    border-radius: 5px;
}

body {
     font-family: "Poppins", sans-serif;
     font-size: 15px;
     color:#1e293b;

}

.entry-title, h1 {
    font-size: 32px!important;
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
} 

/* colonne pagine */

   .two-col{
    width: 100%;
  }

  .two-col__wrap{
    display: grid;
    grid-template-columns: 40fr 60fr; /* NON % */
    gap: 24px;
  }

  @media (max-width: 780px){
    .two-col__wrap{
      grid-template-columns: 1fr;
    }
  }

/* form contatti */
  .btn-libreria{
  background:#560008!important;
  color:#fff!important;
  border:0;
  padding:12px 12px!important;
  font-size:15px;
  font-weight:600;
  border-radius:5px;
  cursor:pointer;
  Font-family: "Poppins", sans-serif!important;
  transition:all .2s ease;

}

.btn-libreria:hover{
  background:#C9A24D!important;
}

.btn-libreria:active{
  transform:translateY(1px);
}

@media (max-width: 780px){
  .wpcf7-form .btn-libreria{
    width:100% !important;
    display:block;
  }
}

/* Testo selezionato */ 


::selection{
  background: #560008; /* colore evidenziazione */
  color: #ffffff;      /* colore testo selezionato */
}

::-moz-selection{      /* Firefox */
  background: #560008;
  color: #ffffff;
}

.page-id-61 h1 {
    display: none;
}

.ls-layers, .ls-slide-bgcolor, .ls-slide-backgrounds, .ls-slide-effects, .ls-background-videos, .ls-bg-video-overlay {
    border-radius: 5px;
}

 /* =========================
   *  SIDEBAR
   * ========================= */

/* Applica solo su Desktop (sopra 921px) */
@media (min-width: 921px) {
    
    /* Regola per Pagina Shop (Negozio) e Archivi Categorie/Tag */
    body.woocommerce-shop #primary,
    body.woocommerce.archive #primary {
        width: 78%; /* Lasciamo un 2% di margine di sicurezza */
    }

    body.woocommerce-shop #secondary,
    body.woocommerce.archive #secondary {
        width: 22%; 
    }
}

.alfani-sidebar {
  margin-top: -43px;
  /*background-color:#eaeaea;*/
  padding: 10px;
  border-radius: 2px;


}


.alfani-sidebar-title {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size: 32px;
  padding-bottom: 29px;
  border-bottom: 1px solid #d3d7dc;


}

/* Categoria attiva */
.alfani-product-categories li.is-current > a {
    font-weight: 600;
    color: #560008;
}

/* opzionale: indicatore */
.alfani-product-categories li.is-current > a::before {
    content: "›";
    margin-right: 6px;
    color: #560008;
}

@media (min-width: 922px) {
    .ast-left-sidebar #primary {
        border-left: 1px solid #ffffff;
    }
}

@media (min-width: 922px) {
    .ast-left-sidebar #secondary {
        border-right: 1px solid #ffffff;
        margin-right: -1px;
    }
}

/* ===============================
   SIDEBAR SHOP – ALFANI
================================ 

.shop-sidebar-block {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e5e5;
}

.shop-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111;
}
*/

@media (min-width: 922px) {
    .ast-container {
        max-width: 1366px;
    }
}


/* --- CUSTOM TOP BAR --- */

.custom-top-bar {
    background-color: #560008; /* Il tuo rosso scuro */
    color: #fff;
    padding: 5px 0;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 999; /* Sta sopra a tutto */
}

/* Contenitore interno per allineare al resto del sito */
.custom-top-bar-container {
    max-width: 1366px; /* Larghezza standard di Astra, adattala se serve */
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between; /* Spinge sinistra e destra agli opposti */
    align-items: center;
}

/* Link e Icone */
.custom-top-bar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    transition: opacity 0.3s;
}

.custom-top-bar a:hover {
    opacity: 0.8;
}

/* Icone Social */
.custom-top-bar i {
    font-size: 15px;
    vertical-align: middle;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .custom-top-bar-container {
        flex-direction: column; /* Impila verticalmente su cellulare */
        gap: 5px;
        text-align: center;
    }
    
    .top-bar-right {
        margin-top: 5px;
    }
}


/* ===============================
   RICERCA LIBRI
================================ */

.alfani-search {
    display: flex;
    gap: 6px;
}

.alfani-search input.search-field {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.alfani-search button {
    padding: 8px 12px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.alfani-search button:hover {
    background: #333;
}

/* ===============================
   CATEGORIE / ARGOMENTI
================================ */

.alfani-product-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;


}

.alfani-product-categories > li {
    margin-bottom: 6px;
}

.alfani-product-categories a {
    text-decoration: none;
    font-size: 16px;
    color: #560008
}

.alfani-product-categories a:hover {
    text-decoration: underline;
}

/* Sottocategorie */
.alfani-product-categories ul {
    list-style: none;
    padding-left: 12px;
    margin-top: 6px;
}

.alfani-product-categories ul li {
    margin-bottom: 4px;
}

.alfani-product-categories ul a {
    font-size: 13px;
    color: #555;
}

/* ===============================
   AUTORI RICERCA
================================ */

/* ALFABETO */
.alfani-autori-alfabeto {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    text-decoration: none;
}

.alfani-autori-alfabeto a {
    padding: 6px 12px 6px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    font-weight: 600;
    color: #333;

}

.alfani-autori-alfabeto a.active,
.alfani-autori-alfabeto a:hover {
    background: #560008;
    color: #fff;
}

/* RICERCA */
.alfani-autori-search {
    margin-bottom: 25px;
}

.alfani-autori-search input {
    padding: 6px;
    width: 250px;
    border: 1px solid;
    border-color:#560008;
    color:#000;
}

.alfani-autori-search button {
    padding: 11px 11px;
    background: #560008;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}

/* LISTA AUTORI */
.alfani-autori-lista ul {
    columns: 3;
    column-gap: 40px;
}

.alfani-autori-lista li {
    break-inside: avoid;
    margin-bottom: 6px;
}

.no-bullets {
  list-style-type: none;
  padding: 0;          
  margin: 0;           
}

.entry-content ul, .entry-content ol {
  padding-left: 0;
}

@media (max-width: 768px) {
    .alfani-autori-lista ul {
        columns: 1;
    }
}


/* ===============================
   ASTRA – SPAZIATURE SHOP
================================ */

.ast-woocommerce-container {
    gap: 40px;
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {
    .shop-sidebar-block {
        margin-bottom: 20px;
    }


    .alfani-search {
        flex-direction: column;
    }

    .site-logo-img {
        width:260px!important;
    }

    .alfani-search button {
        width: 100%;
    }
}

@media (max-width: 768px) {
.ast-header-button-1 .ast-custom-button {
margin: 10px;
margin-left:15px;
  }
}


/* --- FIX HEADER MOBILE --- */
@media (max-width: 921px) {
    
    /* 1. Forza il Logo perfettamente al centro */
    .site-branding {
        text-align: center;
        margin: 0 auto; 
    }

    /* 2. Spazia le icone a destra (Cerca e Carrello) */
    .ast-header-break-point .ast-builder-layout-element {
        gap: 15px; /* Spazio tra lente e carrello */
    }

    /* 3. Assicura che il Burger a sinistra sia ben visibile */
    .ast-mobile-menu-trigger-fill {
        justify-content: flex-start;
    }
}
