:root {
    --primary-color: #364C8A;
    --secondary-color: #D09E11;
    --tertiary-color: #ffffff;
}

@font-face {
    font-family: 'AvenirNextLight';
    src: url('../fonts/AvenirNext-UltraLight-11.ttf')   format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AvenirNextRegular';
    src: url('../fonts/AvenirNext-Regular-08.ttf')   format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AvenirNextBold';
    src: url('../fonts/AvenirNext-Bold-01.ttf')   format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}


body {
    background: var(--primary-color);
}

.mexpress-navbar {
    background: var(--tertiary-color);
    box-shadow: -2px 6px 12px #0000004D;
    padding: 0.5rem 1rem;
    height: 100px;
}
.mexpress-logo {
    width: 150px;
}
.search-bar-wrapper {
    flex: 1 1 0%;
    display: flex;
    justify-content: center;
}
.search-bar {
    position: relative;
    width: 60%;
    max-width: 820px;
    min-width: 140px;
}
.search-bar input {
    border-radius: 30px !important;
    padding-left: 1.5rem;
    padding-right: 2.5rem;
    box-shadow: none;
    border: 1px solid #000;
}
.search-bar .search-icon {
    position: absolute;
    right: 16px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-size: 1.3rem;
    pointer-events: none;
}
.menu-icon {
    font-size: 2rem;
    color: #222;
}
.section-title {
    color: var(--secondary-color);
    font-size: 2.5rem;
    font-weight: 300;
    margin-top: 1rem;
    font-family: 'AvenirNextLight', Arial, sans-serif;
}
.highlight-card{
    border-radius: 10px;
    overflow: hidden;
    min-height: 300px;
    background: #000;
    color: var(--tertiary-color);
    position: relative;
}

.highlight-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    /* background-image: url('../images/van.png'); */
    opacity: 1;           
    z-index: 0;            
  }
  
  .highlight-card > * {
    position: relative;
    z-index: 1;
  }

.selling-card {
    position: relative;    
    border-radius: 10px;
    overflow: hidden;
    min-height: 300px;
    background: black;      
    color: var(--tertiary-color);
  }
  
  .selling-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url(../images/family.jpg);
    background-size: cover;
    background-position: center;
    opacity: 0.44;           
    z-index: 0;            
  }
  
  .selling-card > * {
    position: relative;
    z-index: 1;
  }

.highlight-card img, .selling-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}
.highlight-content {
    position: absolute;
    top: 50%;
    left: 30px;
    z-index: 2;
    max-width: 35%;
    transform: translateY(-50%);
    line-height: 36px;
}
.selling-content {
    position: absolute;
    top: 50%;
    left: 30px;
    z-index: 2;
    max-width: 75%;
    transform: translateY(-50%);
    line-height: 36px;
}
.highlight-content h2, .selling-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.highlight-content p, .selling-content p {
    font-size: 2rem;
    font-weight: 300;
    font-family: 'AvenirNextRegular', Arial, sans-serif;
}
.highlight-content span, .selling-content span {
    font-size: 2rem;
    font-family: 'AvenirNextBold', Arial, sans-serif;
}
.highlight-content .btn, .selling-content .btn {
    background: var(--secondary-color);
    color: #222;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.category-title {
    color: #e0c24a;
    font-size: 2.5rem;
    font-weight: 300;
    margin-top: 1rem;
    font-family: 'AvenirNextLight', Arial, sans-serif;
}
.category-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 0;
    text-align: center;
    margin-bottom: 2rem;
    transition: transform 0.2s;
    /* min-height: 185px; */
    min-height: 150px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.category-card .category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.category-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.category-img {
    width: 90px;
    height: 90px;
    margin-bottom: 1rem;
    object-fit: contain;
}
.category-label {
    color: var(--secondary-color);
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}
.list-group-item{
    background: transparent;
}

.list-group-item.active{
    background: transparent;
    color: #fff
}

.product-code {
    font-size: 0.7rem;
    font-family: 'AvenirNextBold', Arial, sans-serif;
    color: var(--primary-color);
    line-height: 0.8rem;
}
.product-description {
    font-size: 1.1rem;
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    color: var(--primary-color);
    text-transform: uppercase;
    line-height: 1.2rem;
}

.pagination.custom-paginator {
    gap: 0.5rem;
}
.pagination.custom-paginator .page-item .page-link {
    color: #2d3860;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.pagination.custom-paginator .page-item .page-link.active,
.pagination.custom-paginator .page-item .page-link:focus {
    background: var(--secondary-color);
    color: #fff;
}
.pagination.custom-paginator .page-item .page-link:hover:not(.active) {
    background: #e0e0e0;
}
.pagination.custom-paginator .page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
    background: transparent;
}
@media (max-width: 991px) {
    .highlight-content, .selling-content {
        max-width: 90%;
    }
    .section-title, .category-title {
        font-size: 2rem;
    }
    .search-bar-wrapper {
        margin: 1rem 0;
    }
}

@media only screen and (min-width: 992px) {
    .max-width-desk {
      max-width: 1340px;
    }
}

.prodotti-lista-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 18px;
    padding: 18px 16px;
    border: 1px solid #f0f0f0;
    min-height: 120px;
}
.prodotti-lista-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-right: 28px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
}
.prodotti-lista-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.prodotti-lista-codice {
    font-size: 1rem;
    color: #2d3a4a;
    font-weight: 500;
    margin-bottom: 6px;
}
.prodotti-lista-nome {
    font-size: 1.15rem;
    color: #1a2233;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.3;
}
.prodotti-lista-card {
    flex-direction: row !important;
    align-items: center !important;
    min-height: 90px;
    background: #fff;
}
.prodotti-lista-card .card-img-left {
    width: 50%;
    height: 100%;
    object-fit: contain;
    margin-right: 16px;
    background: #fff;
}
.product-link {
    display: block;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.product-link .card:hover, .product-link:focus .card {
    box-shadow: 0 4px 16px rgba(54,76,138,0.13), 0 1.5px 6px rgba(54,76,138,0.09);
    border-color: var(--secondary-color);
}
.detail-field{
    font-family: 'AvenirNextBold', Arial, sans-serif;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 1rem;
}
.detail-field-value{
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    color: var(--primary-color);
    font-size: 1rem;
    text-transform: uppercase;
    line-height: 1rem;
}
.hr-detail{
    color: var(--secondary-color);
    border-top: 2px solid;
    opacity: 1;
}
.arrow-back{
    color: #fff;
    background: var(--secondary-color);
    border-radius: 50px;
    display: inline-block;
    width: 28px;
    height: 28px;
    font-size: 18px
}
.prod-view.active{
    color: var(--secondary-color);
}

.contact-page {
    background: var(--primary-color);
    min-height: calc(100vh - 100px);
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-top: 3rem;
    overflow: hidden;
}

.contact-page::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    /* background-image: url('../images/van.png'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Stili per il video background nella pagina contatti */
.contact-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.contact-content {
    position: relative;
    z-index: 2;
    background: transparent;
    padding-left: 3rem;
}

.contact-title {
    color: var(--secondary-color);
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    font-family: 'AvenirNextLight', Arial, sans-serif;
}

.contact-address {
    color: var(--tertiary-color);
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-piva {
    color: var(--tertiary-color);
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    font-size: 1.3rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .contact-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .contact-title {
        font-size: 2.5rem;
        text-align: left;
    }
    
    .contact-address, .contact-piva {
        font-size: 1.1rem;
    }
}

/* Menu Mobile Burger */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--tertiary-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
}

.mobile-menu-logo {
    height: 50px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--tertiary-color);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

.mobile-menu-nav {
    padding: 2rem 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'AvenirNextRegular', Arial, sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.mobile-menu-link:hover {
    background: #f8f9fa;
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    text-decoration: none;
}

.mobile-menu-link i {
    margin-right: 1rem;
    font-size: 1.3rem;
    width: 20px;
    text-align: center;
}

@media (max-width: 300px) {
    .mobile-menu-content {
        width: 100%;
    }
}

/* Overlay opzionale per migliorare la leggibilità del testo */
.highlight-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Overlay scuro al 30% */
    z-index: 1;
    pointer-events: none;
}

/* Stili per il video background nella highlight-card */
.highlight-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Overlay per la pagina contatti */
.contact-page::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay scuro al 40% per migliore leggibilità */
    z-index: 1;
    pointer-events: none;
}

/* Reset completo dello stile Bootstrap per il range slider */
#search-date-slider {
    /* Reset di tutti gli stili Bootstrap */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    
    /* Nostri stili personalizzati */
    width: 100% !important;
    height: 3px !important;
    border-radius: 4px !important;
    border: none !important;
    outline: none !important;
    margin: 15px 0 !important;
    padding: 0 !important;
    
    /* Gradiente dinamico: giallo fino al pallino, blu dopo */
    background: linear-gradient(to right, 
        var(--secondary-color) 0%, 
        var(--secondary-color) var(--value, 67%), 
        #fff var(--value, 67%), 
        #fff 100%) !important;
    
    /* Rimuovi tutti i box-shadow di Bootstrap */
    box-shadow: none !important;
}

/* Thumb per WebKit (Chrome, Safari, Edge) - MASSIMA PRIORITÀ */
#search-date-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: var(--primary-color) !important;
    cursor: pointer !important;
    border: 1px solid #fff !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2) !important;
    transition: all 0.15s ease !important;
}

#search-date-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

#search-date-slider::-webkit-slider-thumb:active {
    transform: scale(1.05) !important;
}

/* Rimuovi lo stile focus di Bootstrap */
#search-date-slider:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 111, 165, 0.25) !important;
    outline: none !important;
}

/* Thumb per Firefox */
#search-date-slider::-moz-range-thumb {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: white !important;
    cursor: pointer !important;
    border: 3px solid #4a6fa5 !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2) !important;
    transition: all 0.15s ease !important;
    /* Rimuovi il background di default di Firefox */
    -moz-appearance: none !important;
}

#search-date-slider::-moz-range-thumb:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* Track per Firefox */
#search-date-slider::-moz-range-track {
    width: 100% !important;
    height: 8px !important;
    cursor: pointer !important;
    background: #4a6fa5 !important;
    border-radius: 4px !important;
    border: none !important;
}

/* Progress per Firefox (parte gialla) */
#search-date-slider::-moz-range-progress {
    background: var(--secondary-color) !important;
    height: 8px !important;
    border-radius: 4px !important;
}

/* HACK: forza la rimozione di tutti gli stili Bootstrap */
input[type="range"]#search-date-slider.form-range {
    background: linear-gradient(to right, 
        var(--secondary-color) 0%, 
        var(--secondary-color) var(--value, 67%), 
        #fff var(--value, 67%), 
        #fff 100%) !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

.close-modal:hover {
    color: #666;
    transform: scale(1.1);
}

#share-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.container-hp {
    height: calc(100vh - 100px);
}

@media (max-width: 992px) {
    .container-hp {
        height: 100%;
    }

    .mexpress-logo {
        width: 120px;
    }
}

@media (min-width: 769px) {
    .mobile-subcats {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .mega-submenu {
        display: none !important;
    }
    .sidebar-cat-wrapper {
        position: static !important;
    }
    .mobile-subcats {
        display: none;
        padding-left: 32px;
        background: #f8f9fa;
        border-radius: 0 0 8px 8px;
        margin-bottom: 8px;
    }
    .sidebar-cat-wrapper.active .mobile-subcats {
        display: block;
    }
    .categoria-item {
        min-height: 60px;
        font-size: 1.1rem;
        padding: 10px 8px;
    }
    .mobile-subcats .submenu-item {
        padding: 10px 8px;
        font-size: 1rem;
        border-radius: 4px;
        margin: 3px 0;
        text-decoration: none !important;
        display: block;
    }
}