/* --- RESET E CONFIGURAZIONE BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f4f6f9;
    line-height: 1.6;
}

/* Contenitore principale centrato con larghezza massima */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- CABECERA (HEADER) --- */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e1e4e8;
    padding: 15px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo img {
    max-width: 250px;
    height: auto;
    display: block;
}

.contact-top a {
    color: #0063c6;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-top a:hover {
    text-decoration: underline;
}

/* --- MENÚ DE NAVEGACIÓN & BARRA DI RICERCA --- */
.main-nav {
    background: #0056b3;
    position: relative;
    width: 100%;
    z-index: 9999;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 5px 15px;
}

.menu-toggle {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 3px 7px !important;
    line-height: 1;
    cursor: pointer;
    display: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    margin: 3px 0;
}

.menu-toggle i {
    color: #0056b3;
    font-size: 18px !important;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list li a {
    color: #fff;
    padding: 12px 15px;
    display: block;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list li a:hover {
    background-color: #3385ff;
    color: #fff;
}

.nav-list li a.active {
    background-color: #808080 !important;
    color: #ffffff !important;
    font-weight: 700;
    pointer-events: none;
    cursor: default;
}

/* --- BARRA DI RICERCA MODERNA - DESKTOP (LARGA) --- */
.site-search-form {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-search__container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
    border: 1px solid #cccccc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-search__container:focus-within {
    border-color: #3385ff;
    box-shadow: 0 0 8px rgba(51, 133, 255, 0.5);
}

.site-search__input {
    border: none;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #333;
    width: 320px;
    transition: width 0.3s ease;
}

.site-search__input:focus {
    width: 320px;
}

.site-search__submit {
    background: #ffffff;
    border: none;
    color: #0056b3;
    padding: 0 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
}

.site-search__submit:hover {
    background: #0056b3;
    color: #ffffff;
}

/* --- STILE MENU A TENDINA SUGGERIMENTI (VERTICALE) --- */
.search-suggestions {
    display: none;
    position: absolute;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    max-height: 250px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: block;
    padding: 10px 15px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    white-space: pre-line; /* CORRETTO: Gestisce i ritorni a capo su qualsiasi schermo */
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: #f4f6f9;
    color: #0056b3;
}

/* --- HERO / BANNER PRINCIPAL --- */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('./images/2016-07-274005-23.png') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hero-banner h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.hero-banner p {
    font-size: 1.2rem;
    font-weight: 300;
}

/* --- SECCIÓN DE PRODUCTOS --- */
.main-content {
    margin-bottom: 50px;
}

.products-section h2 {
    text-align: center;
    color: #0063c6;
    margin-bottom: 30px;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card-producto {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-producto img {
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin: 15px 0;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #0063c6;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.card-producto h3 {
    font-size: 1.1rem;
    color: #292929;
    margin-bottom: 10px;
}

.price-label {
    font-size: 0.9rem;
    color: #808080;
}

.price {
    font-size: 1.3rem;
    color: #0063c6;
    font-weight: bold;
}

.price span {
    font-size: 0.9rem;
    font-weight: normal;
}

/* --- STILI DEI PULSANTI --- */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.w-100 {
    display: block !important;
    width: 100% !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 3px;
}

.btn-outline-primary {
    color: #ffffff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #ffffff;
    background-color: #3385ff;
    border-color: #3385ff;
}

.btn-info {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 10px 0;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0;
    transition: background-color 0.2s ease;
}

.btn-info:hover {
    background-color: #3385ff;
    color: #ffffff;
}

.btn-info-custom {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #007bff;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-info-custom:hover {
    background-color: #3385ff;
    color: #ffffff !important;
}

/* --- PIE DE PÁGINA (FOOTER) --- */
.site-footer {
    background-color: #1a1a1a;
    color: #efefef;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3, .footer-col h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 15px;
    border-bottom: 2px solid #0063c6;
    padding-bottom: 5px;
    display: inline-block;
}

.footer-col p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 6px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- MEDIA QUERIES (DISPOSITIVI MOBILI < 991px) --- */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-list {
        display: none; 
        position: absolute !important;
        top: 100% !important;
        left: 10px !important;
        width: 240px !important;
        max-width: 90vw !important;
        box-sizing: border-box !important;
        background: #0056b3 !important;
        flex-direction: column !important;
        border-bottom: 2px solid #004085;
        border-right: 2px solid #004085;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
        padding: 5px 0;
        z-index: 99999;
    }

    .nav-list.active {
        display: flex !important;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list li a {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        display: block;
        width: 100%;
        box-sizing: border-box;
        color: #fff !important;
        border-radius: 0;
    }

    .nav-list li a:hover {
        background: rgba(0, 0, 0, 0.15) !important;
        color: #fff !important;
    }

    .nav-list li a.active {
        background: #808080 !important;
        color: #fff !important;
    }

    .hero-banner h1 {
        font-size: 1.6rem;
    }

    .site-search-form {
        margin-left: auto;
    }

    .site-search__container {
        height: 36px;
    }

    .site-search__input {
        width: 220px;
        font-size: 13px;
        padding: 0 10px;
    }

    .site-search__input:focus {
        width: 220px;
    }

    .site-search__submit {
        padding: 0 12px;
        font-size: 13px;
    }
}