/* BARRA SUPERIOR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 78px;

    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #f5f6f8 55%,
        #eceff2 100%
    );

    border-bottom: 1px solid #d5d9de;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);

    display: flex;
    align-items: center;
    gap: 24px;

    padding: 0 32px;
    z-index: 1000;
}
.brand {
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    color: #1b2430;
    white-space: nowrap;
}
.brand img {
    width: 210px;
    height: auto;
    display: block;
}
.brand span {
    color: #e9a900;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.desktop-nav a {
    text-decoration: none;
    color: #2c3440;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: #d89b00;
}

.search-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: 280px;
    height: 42px;
    background: white;
    border: 1px solid #cfd5dc;
    border-radius: 24px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 14px;
    background: transparent;
    color: #222;
}

.search-btn {
    width: 46px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-action {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #2c3440;
    font-size: 13px;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
}

/* LADO IZQUIERDO */
.menu {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.menu-icon {
    font-size: 27px;
}

/* LOGO */
.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 88px;
    width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* BUSCADOR */
.search-box {
    display: flex;
    align-items: center;
    width: 310px;
    height: 46px;
    margin-left: 35px;
    border: 1.5px solid #b8b8b8;
    border-radius: 30px;
    background: white;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 18px;
    font-size: 14px;
    background: transparent;
}

.search-box button {
    height: 100%;
    width: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

/* LADO DERECHO */
.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
}
.right-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.account-icon,
.cart-icon {
    font-size: 25px;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .search-box {
        width: 230px;
    }

    .logo {
        width: 260px;
    }
}

@media (max-width: 700px) {
    .navbar {
        height: 75px;
        padding: 0 15px;
    }

    .menu {
        font-size: 0;
    }

    .search-box {
        display: none;
    }

    .logo {
        width: 180px;
        height: 60px;
    }

    .right-menu {
        gap: 12px;
    }
}

.mega-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    width: 720px;
    min-height: 500px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.18);

    display: none;
    grid-template-columns: 300px 1fr;

    overflow: hidden;
    z-index: 5000;
}

.products-menu.open .mega-menu {
    display: grid;
}

.mega-categories {
    padding: 18px;
    background: #f5f6f7;
    border-right: 1px solid #e0e0e0;
}

.mega-categories button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background: transparent;
    padding: 13px 15px;
    margin-bottom: 3px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    color: #263238;
    cursor: pointer;
}

.mega-categories button:hover {
    background: #ffffff;
    color: #e5a900;
}

.mega-categories button span {
    font-size: 20px;
    color: #888;
}

.mega-content {
    padding: 35px;
    color: #263238;
}

.mega-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.mega-content p {
    color: #777;
}
/* SUBCATEGORIAS DEL MEGA MENU */

.mega-panel {
    display: none;
}

.mega-panel.active {
    display: block;
}

.mega-panel h3 {
    margin-bottom: 18px;
    font-size: 22px;
    color: #1f2933;
}

.mega-panel a {
    display: block;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 0;
}

.mega-panel a:hover {
    color: #e5a900;
}
/* ===== MEJORAS VISUALES MEGA MENU ===== */

.mega-menu {
    width: 860px;
    min-height: 420px;
    grid-template-columns: 270px 1fr;
}

.mega-categories {
    padding: 16px;
}

.mega-category.active {
    background: #fff8e1;
    color: #d89b00;
    border-left: 4px solid #e5a900;
}

.mega-panel.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    column-gap: 28px;
    row-gap: 2px;
}

.mega-panel h3 {
    grid-column: 1 / -1;
    margin-bottom: 12px;
}

.mega-panel a {
    padding: 7px 0;
}
/* AJUSTE FINAL MEGA MENU */

.mega-menu {
    min-height: 560px;
}

/* Columna izquierda */
.mega-categories {
    width: 330px;
    flex-shrink: 0;
}

/* Zona derecha */
.mega-panel {
    padding: 22px 45px 30px 70px;
}

/* Título */
.mega-panel h3 {
    margin-bottom: 28px;
}

/* Subcategorías */
.mega-panel a {
    padding: 10px 0;
}

/* Fotovoltaica en 2 columnas */
#fotovoltaica {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    column-gap: 70px;
    row-gap: 10px;
}
.products-menu {
    position: relative;
}

.products-btn {
    background: none;
    border: none;
    font: inherit;
    font-weight: 600;
    color: #263238;
    cursor: pointer;
    padding: 12px 8px;
}

.products-btn:hover {
    color: #e5a900;
}