/**
 * Mega-menu CSS - Desktop e Mobile
 */

/* ============================================================================
   MEGA-MENU DESKTOP
   ============================================================================ */

.mega-menu-container {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100vw;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

/* Calcola la posizione top dinamicamente via JS */

.mega-menu-panel {
    max-width: 100%;
    width: 100%;
}

.mega-menu-container.active {
    display: block;
}

/* Tabs rimossi - sono già nella navbar */

.mega-menu-panel {
    display: none;
    padding: 0 2rem;
}

.mega-menu-panel.active {
    display: block;
}

/* Pannello SPORT */
.mega-menu-sport {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2rem;
}

.mega-menu-sport-column {
    display: flex;
    flex-direction: column;
}

.mega-menu-sport-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.mega-menu-sport-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.mega-menu-sport-title a:hover {
    color: #BED031;
}

.mega-menu-sport-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-sport-categories li {
    margin-bottom: 0.5rem;
}

.mega-menu-sport-categories a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.mega-menu-sport-categories a:hover {
    color: #BED031;
}

.mega-menu-show-more {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #BED031;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.mega-menu-show-more:hover {
    text-decoration: underline;
}

.mega-menu-hidden {
    display: none;
}

/* Pannello UOMO/DONNA/BAMBINO */
.mega-menu-sex {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
}

.mega-menu-cluster {
    display: flex;
    flex-direction: column;
}

.mega-menu-cluster-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.mega-menu-cluster-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-cluster-categories li {
    margin-bottom: 0.5rem;
}

.mega-menu-cluster-categories a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.mega-menu-cluster-categories a:hover {
    color: #BED031;
}

/* Pannello MARCHI */
.mega-menu-brands {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}

.mega-menu-brands-column {
    display: flex;
    flex-direction: column;
}

.mega-menu-brands-letter {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.mega-menu-brands-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-brands-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-brands-list a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.mega-menu-brands-list a:hover {
    color: #BED031;
}

.mega-menu-brands-search {
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.mega-menu-brands-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ============================================================================
   MENU MOBILE FULLSCREEN
   ============================================================================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    visibility: hidden;
}

.mobile-menu-overlay.active {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

body.menu-mobile-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mobile-menu-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-menu-page.active {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    z-index: 2 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.mobile-menu-page.prev {
    transform: translateX(-100%);
    -webkit-transform: translateX(-100%);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    flex: 1;
    text-transform: uppercase;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-item a,
.mobile-menu-item button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 550;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.05em;
}

.mobile-menu-item a:hover,
.mobile-menu-item button:hover {
    background: #f5f5f5;
}

.mobile-menu-arrow {
    color: #999;
    font-size: 1.8rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    font-weight: 300;
    transform: scaleX(1.5);
    transform-origin: center;
}

/* Lista categorie mobile */
.mobile-menu-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-categories li {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-categories a {
    display: block;
    padding: 0.75rem 1rem 0.75rem 2rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 550;
    text-transform: uppercase;
    transition: background 0.2s;
    letter-spacing: 0.05em;
}

.mobile-menu-categories a:hover {
    background: #f5f5f5;
}

/* Ricerca marchi mobile */
.mobile-menu-search {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Box footer mobile (BLOG - CONTATTI - CHI SIAMO) */
.mobile-menu-footer-boxes {
    display: flex;
    width: 100%;
}

.mobile-menu-footer-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 550;
    text-transform: uppercase;
    transition: background 0.2s;
}

.mobile-menu-footer-box:last-child {
    border-right: none;
}

.mobile-menu-footer-box:hover {
    background: #f5f5f5;
    border-bottom-color: #BED031;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1200px) {
    .mega-menu-sport {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .mega-menu-sex {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mega-menu-brands {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .mega-menu-container {
        display: none !important;
    }
}

