/* ====================================================
   SAN MARINO LIBRI — CSS Principale
   Palette: #1a4a7a (blu scuro), #5bb8d4 (azzurro),
            #e8a020 (oro/CTA), #f8f9fa (sfondo), #111e30 (footer)
==================================================== */

* { box-sizing: border-box; }

body {
    width: 98%;
    margin-left: 1%;
    margin-right: 1%;
    font-family: 'Carlito', 'Segoe UI', Arial, sans-serif;
    background: #f8f9fa;
    color: #222;
}

a { text-decoration: none; color: inherit; }

/* ---- BARRA INFO TOP ---- */

.InfoBar {
    background-color: #1a4a7a;
    color: #cce4f7;
    font-size: 0.78rem;
    text-align: center;
    padding: 6px 10px;
    letter-spacing: 0.03em;
}

.InfoBar a {
    color: #90cef0;
    font-weight: 700;
}

/* ---- HEADER ---- */

.HeaderCont {
    background: #fff;
    border-bottom: 3px solid #5bb8d4;
    padding: 12px 10px 0 10px;
    text-align: center;
}

.HeaderLogo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.LogoLink {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}

.LogoTitolo {
    font-size: 1.9rem;
    font-weight: 900;
    color: #1a4a7a;
    letter-spacing: -1px;
    line-height: 1;
}

.LogoSotto {
    font-size: 0.72rem;
    color: #5bb8d4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* sostituisce il LogoLink quando si usa un'immagine */
.LogoImm {
    max-height: 70px;
    width: auto;
}

.LogoFooter {
    max-height: 50px;
    width: auto;
    display: block;
    margin: 0 auto 12px auto;
    opacity: 0.85;
}


.HeaderIcone {
    display: flex;
    gap: 18px;
    align-items: center;
}

.IconaBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    color: #555;
    cursor: pointer;
    gap: 2px;
    position: relative;
}

.IconaBox:hover { color: #1a4a7a; }

.ArticoliCarrello {
    position: absolute;
    top: -4px;
    right: -8px;
    background: #e8a020;
    color: white;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 900;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- BARRA RICERCA ---- */

.BarraRicercaCont {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 14px 0;
    gap: 0;
}

.BarraRicerca {
    width: 380px;
    max-width: 60vw;
    padding: 9px 14px;
    border: 2px solid #1a4a7a;
    border-right: none;
    border-radius: 20px 0 0 20px;
    font-size: 0.95rem;
    outline: none;
    background: #fff;
}

.BottoneRicerca {
    padding: 9px 20px;
    background: #1a4a7a;
    color: white;
    border: 2px solid #1a4a7a;
    border-left: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.BottoneRicerca:hover { background: #5bb8d4; border-color: #5bb8d4; }

/* ---- BARRA CATEGORIE ---- */

.NavCategorie {
    background: #1a4a7a;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 10px;
}

.NavCat {
    padding: 10px 16px;
    color: #cce4f7;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
}

.NavCat:hover, .NavCat.Attivo {
    background: #5bb8d4;
    color: #fff;
}

/* ---- CONTENUTO ---- */

.ContentCenter {
    padding-top: 20px;
    padding-bottom: 30px;
    width: 98%;
    margin-left: 1%;
    margin-right: 1%;
}

/* ---- WHATSAPP ---- */

.WaButtonWrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
}

.WaButtonWrap:hover {
    filter: brightness(0.82);
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.WaButtonWrap a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
}

/* ---- FOOTER ---- */

footer {
    background: #111e30;
    color: #aac6e0;
    font-size: 0.82rem;
    width: 98%;
    text-align: center;
    padding: 30px 10px 20px 10px;
}

.FooterCont {
    border-bottom: 1px solid #2a4a6a;
    padding-bottom: 20px;
    margin-bottom: 16px;
}

.FooterCol {
    margin-top: 10px;
    padding: 0 10px;
}

.FooterCol h2 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.fItem {
    padding: 5px 0;
    width: 100%;
}

.fItem a {
    color: #aac6e0;
    display: block;
}

.fItem:hover a, .fItem:hover {
    color: #5bb8d4;
    text-decoration: underline;
}

.fCredit {
    color: #557a9a;
    font-size: 0.75rem;
    line-height: 2;
    padding-top: 10px;
    padding-bottom: 20px;
}

/* ---- RESPONSIVE ---- */

@media only screen and (max-width: 499px) {
    .NavCategorie {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .NavCat {
        flex-shrink: 0;
    }
    .LogoTitolo { font-size: 1.4rem; }
    .BarraRicerca { width: 55vw; }
}

@media only screen and (min-width: 500px) {

    .FooterCont {
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .FooterCol {
        display: inline-block;
        width: 22%;
        text-align: center;
    }

    .fItem { text-align: center; }

    .fCredit { text-align: center; }
}
