/* =========================
   CONFIGURACIÓN GENERAL
========================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: Clip;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #ffffff;
    color: #222;
}

/* =========================
   ENCABEZADO
========================= */

header {
    width: 100%;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 8%;

    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;

    position: sticky;
    top: 0;
    z-index: 1000;
}


/* LOGO */

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-principal {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-secundario {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #777;
    text-transform: uppercase;
}

/* MENÚ */

nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: #777;
}


/* =========================
   MENÚ DE PRODUCTOS
========================= */

.menu-productos {
    position: relative;
}

/* =========================
   MENÚ DESPLEGABLE PRODUCTOS
========================= */

.menu-productos {
    position: relative;
}

.menu-productos > a {
    display: block;
}


/* SUBMENÚ OCULTO */

.menu-productos .submenu {
    position: absolute;
    top: 100%;
    left: 50%;

    transform: translateX(-50%);

    min-width: 220px;

    padding: 10px 0;

    background-color: #ffffff;

    border: 1px solid #e5e5e5;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    z-index: 1100;

    display: block;
}


/* MOSTRAR AL PASAR EL MOUSE */

.menu-productos:hover .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ENLACES */

.menu-productos .submenu a {
    display: block;

    padding: 12px 20px;

    color: #222;

    text-decoration: none;

    font-size: 14px;

    white-space: nowrap;
}

.menu-productos .submenu a:hover {
    background-color: #f3f3f3;
}

.menu-productos > a::after {
    content: "⌄";
    font-size: 12px;
    margin-left: 6px;
}



/* =========================
   SUBMENÚ DE BARANDALES
========================= */

.submenu-barandales {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;

    background-color: #ffffff;

    border-bottom: 1px solid #e5e5e5;

    position: sticky;
    top: 80px;
    z-index: 900;
}

/* OPCIONES */

.submenu-barandales a {
    position: relative;

    width: 260px;

    padding: 22px 30px 20px;

    text-decoration: none;
    text-align: center;

    color: #222;

    transition: 0.3s;
}

/* NÚMERO */

.submenu-barandales a::before {
    content: attr(data-numero);

    display: block;

    margin-bottom: 7px;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2px;

    color: #999;

    transition: 0.3s;
}

/* LÍNEA INFERIOR */

.submenu-barandales a::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    background-color: #222;

    transform: translateX(-50%);

    transition: width 0.3s ease;
}

/* HOVER */

.submenu-barandales a:hover {
    background-color: #fafafa;
}

.submenu-barandales a:hover::before {
    color: #555;
}

.submenu-barandales a:hover::after {
    width: 55px;
}


/* =========================
   BARANDALES INTERIORES
========================= */

.barandales-seccion {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 8%;
}

.barandales-seccion2 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 8%;
}


/* ENCABEZADO */

.barandales-seccion .seccion-encabezado {
    max-width: 750px;
    margin: 0 auto 45px;
    text-align: center;
}

.barandales-seccion .seccion-subtitulo {
    display: block;
    margin-bottom: 12px;

    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;

    color: #777;
}

.barandales-seccion .seccion-encabezado h2 {
    font-size: 40px;
    margin-bottom: 18px;
    color: #222;
}

.barandales-seccion .seccion-encabezado p {
    color: #666;
    font-size: 17px;
    line-height: 1.7;
}


/* GALERÍA */

.barandales-galeria {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.barandales-galeria3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.barandales-galeria2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}


/* TARJETAS */

.barandal-item {
    background-color: #f3f3f3;
    overflow: hidden;
    cursor: pointer;

    transition: 0.3s;
}

.barandal-item:hover {
    transform: translateY(-5px);
}


/* IMAGEN */

.barandal-imagen {
    width: 100%;
    height: 370px;
    overflow: hidden;
    background-color: #d9d9d9;
}

.barandal-imagen img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition: 0.4s;
}

.barandal-item:hover .barandal-imagen img {
    transform: scale(1.04);
}


/* INFORMACIÓN */

.barandal-info {
    padding: 18px;
    
}

.barandal-info span {
    display: block;

    margin-bottom: 8px;

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;

    color: #888;
}

.barandal-info h3 {
    margin: 0;

    font-size: 18px;
    font-weight: 600;

    color: #222;
}

/* Seciones/////////////////////// */










/* =========================
   FOOTER
========================= */

footer {
    background-color: #181818;
    color: white;
    padding: 70px 8% 0;
}


.footer-contenido {

    max-width: 1250px;

    margin: auto;

    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    gap: 80px;

    padding-bottom: 60px;

}


/* COLUMNAS */

.footer-columna {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

}


.footer-columna h3 {

    font-size: 24px;

    margin-bottom: 20px;

}


.footer-columna h4 {

    font-size: 16px;

    margin-bottom: 20px;

}


.footer-columna p {

    color: #aaa;

    line-height: 1.7;

    margin-bottom: 8px;

    max-width: 350px;

}


.footer-columna a {

    color: #aaa;

    text-decoration: none;

    font-size: 14px;

    margin-bottom: 12px;

    transition: 0.3s;

}


.footer-columna a:hover {

    color: white;

}


/* PARTE INFERIOR */

.footer-inferior {

    border-top: 1px solid #444;

    padding: 25px 0;

    text-align: center;

}


.footer-inferior p {

    color: #888;

    font-size: 13px;

}


/* =========================
   FOOTER RESPONSIVE
========================= */

@media (max-width: 700px) {

    footer {

        padding: 50px 8% 0;

    }


    .footer-contenido {

        grid-template-columns: 1fr;

        gap: 40px;

        padding-bottom: 40px;

    }

}


/* =========================
   SUBMENU RESPONSIVE

@media (max-width: 600px) {

    .submenu-barandales {
        width: 100%;
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

    .submenu-barandales a {
        width: 33.333%;
        min-width: 0;
        flex: 1;

        padding: 18px 5px;

        font-size: 12px;
        line-height: 1.3;
    }

    .submenu-barandales a::before {
        font-size: 9px;
        letter-spacing: 1px;
        margin-bottom: 5px;
    }
}
    ========================= */




.menu-toggle {
    display: none;
    font-size: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333333; /* Asegura que el icono sea oscuro y visible */
    z-index: 1000;  /* Asegura que esté por encima de otros elementos */
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {

    .barandales-galeria {
        grid-template-columns: repeat(3, 1fr);
    }

}


@media (max-width: 700px) {

    .barandales-seccion {
        padding: 70px 20px;
    }

    .barandales-galeria {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 500px) {

    .barandales-galeria {
        grid-template-columns: 1fr;
    }

}

/* =========================
   MODAL DE BARANDALES
========================= */

.modal-barandal {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 25px;

  

    background-color: rgba(0, 0, 0, 0.78);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease,
                visibility 0.25s ease;

    z-index: 2000;
}


.modal-barandal.activo {
    opacity: 1;
    visibility: visible;
}


/* =========================
   CONTENEDOR
========================= */

.modal-barandal-contenido {

    position: relative;

    width: min(1200px, 95vw);

    max-height: 90vh;

    display: grid;

    grid-template-columns: 1.2fr 0.8fr;

    background-color: #ffffff;

    border-radius: 7px;

    overflow: hidden;
    
}


/* =========================
   IMAGEN
========================= */

.modal-barandal-imagen {

    width: 100%;
    height: 90vh;

    max-height: 90vh;

    background-color: #222222;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}


.modal-barandal-imagen img {

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
}


/* =========================
   INFORMACIÓN
========================= */

.modal-barandal-info {

    padding: 55px 45px;

    overflow-y: auto;

    display: flex;

    flex-direction: column;

    justify-content: center;
}


/* CATEGORÍA */

.modal-barandal-categoria {

    display: block;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: 2px;

    color: #666666;

    margin-bottom: 14px;
}


/* TÍTULO */

.modal-barandal-info h2 {

    margin: 0;

    font-size: 32px;

    line-height: 1.2;

    color: #222222;
}


/* SEPARADOR */

.modal-barandal-separador {

    width: 100%;

    height: 1px;

    margin: 28px 0;

    background-color: #dddddd;
}


/* DESCRIPCIÓN */

.modal-barandal-descripcion {

    margin: 0 0 30px;

    font-size: 16px;

    line-height: 1.7;

    color: #666666;
}


/* =========================
   CARACTERÍSTICAS
========================= */

.modal-barandal-caracteristicas h3 {

    margin: 0 0 15px;
    

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;

    color: #777777;
}


.modal-barandal-lista {

    width: 100%;
}


.modal-barandal-caracteristica {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 14px 0;

    border-bottom: 1px solid #eeeeee;
    
}


.modal-barandal-caracteristica span {

    color: #777777;

    font-size: 15px;
    
}


.modal-barandal-caracteristica strong {

    color: #222222;

    font-size: 15px;

    font-weight: 600;

    text-align: right;
}


/* =========================
   BOTÓN CERRAR
========================= */

.modal-barandal-cerrar {

    position: absolute;

    top: 15px;
    right: 15px;

    width: 40px;
    height: 40px;

    border: none;

    border-radius: 50%;

    background-color: #ffffff;

    color: #222222;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

    z-index: 10;
}


.modal-barandal-cerrar:hover {

    background-color: #eeeeee;

    transform: none;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 850px) {

    .modal-barandal-contenido {

        grid-template-columns: 1fr;

        max-height: 92vh;

        overflow-y: auto;
    }


    .modal-barandal-imagen {

        height: 50vh;

        max-height: 50vh;

        min-height: 280px;
    }


    .modal-barandal-info {

        padding: 30px 25px;
    }


    .modal-barandal-info h2 {

        font-size: 28px;
    }

}


@media (max-width: 500px) {

    .modal-barandal {

        padding: 10px;
    }


    .modal-barandal-imagen {

        height: 40vh;

        max-height: 40vh;
    }


    .modal-barandal-info {

        padding: 25px 20px;
    }


    .modal-barandal-cerrar {

        top: 10px;
        right: 10px;
    }

}


.modal-barandal-lista {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espacio entre cada característica */
    margin-top: 15px;
}

.caracteristica-item {
    display: grid;
    grid-template-columns: 120px 1fr; /* El nombre toma 120px, el valor toma el resto */
    gap: 15px;
    align-items: start;
    padding-bottom: 8px;
    border-bottom: 1px solid #eeeeee; /* Línea separadora sutil */
}

/* Oculta la línea en el último elemento */
.caracteristica-item:last-child {
    border-bottom: none; 
}

.caracteristica-nombre {
    font-weight: 600;
    color: #333333;
}

.caracteristica-valor {
    color: #555555;
    line-height: 1.4;
}
/* =========================================
   MEDIA QUERY PARA CELULARES (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Mostrar el botón hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* 2. Ocultar y reestructurar el menú principal */
    .menu-encabezado {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Se coloca justo debajo del header */
        left: 0;
        width: 100%;
        background-color: #ffffff; /* Cambia esto al color de tu fondo */
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 15px 0;
    }

    /* 3. Clase que usará JavaScript para mostrar el menú */
    .menu-encabezado.activo {
        display: flex;
    }

    /* 4. Acomodar los enlaces para que sean fáciles de tocar */
    .menu-encabezado a {
        padding: 15px 20px;
        display: block;
        text-align: left;
    }

    /* 5. Ajustar el submenú para que se despliegue hacia abajo en lugar de flotar */
    .menu-productos .submenu {
        position: static;
        display: none;
        flex-direction: column;
        background-color: #f9f9f9; /* Un tono un poco más oscuro para diferenciarlo */
        padding-left: 15px; /* Sangría para los sub-elementos */
    }

    .menu-productos:hover .submenu {
        display: flex;
    }
}

