body {
    overflow-x: hidden;
    /* Evita el scroll horizontal */
}

/* Estilo para la imagen de portada */
.portada-container {
    position: relative;
    width: 100vw;
    height: 539px;
    /* Ajusta según necesites */
    margin-top: 40px;
    /* Para que no se solape con la barra de navegación */
}

.portada-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mantiene la imagen sin deformarse */
}

.texto-en-portada {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) scaleX(1.05); /* mueve al centro */
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 51px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.7);
    z-index: 10;
}

/* CENTRADO EN PANTALLAS PEQUEÑAS */
@media screen and (max-width: 768px) {
    .portada-container {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .texto-en-portada {
        position: absolute;
        bottom: auto;
        left: auto;
        top: 70%;
        /*Ajustalaposición*/
        transform: translate(-52%, -50%) scaleX(1.05);
        left: 50%;
        width: 90%;
        font-size: 45px;
    }
}


/* Productos */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 320px); /* 3 columnas */
    grid-template-rows: repeat(2, 340px); /* 2 filas */
    gap: 24px;
    justify-content: center;
    margin-top: 60px; /* <-- Espacio superior */
}

.gallery-item {
    border: 3px solid #888;
    border-radius: 10px;
    background-color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
    height: 100%;
}

.gallery-item:hover {
    background-color: orange;
    border-color: orange;
}

.img-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: unser;
}

.caption {
    width: 100%;
    background-color: #888;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
    border-top: 2px solid #777;
}

.gallery-item:hover .caption {
    background-color: orange;
    border-top-color: orange;
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    .gallery {
        gap: 50px;
    }
}

/* Pantallas medianas */
@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(2, 280px); /* También aumentado */
        grid-template-rows: auto;
    }
}

/* Pantallas pequeñas */
@media (max-width: 576px) {
    .gallery {
        grid-template-columns: 280px; /* Aumentado */
        grid-template-rows: auto;
        justify-content: center;
    }

    .gallery-item {
        width: 280px; /* Aumentado */
        height: auto;
    }

    .img-wrapper {
        height: 220px; /* Aumentado un poco */
    }
}


/* Animación fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplicar animación a cada .gallery-item */
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

/* Retrasos para que no aparezcan todas a la vez */
.gallery-item:nth-child(1) { animation-delay: 0.2s; }
.gallery-item:nth-child(2) { animation-delay: 0.4s; }
.gallery-item:nth-child(3) { animation-delay: 0.6s; }
.gallery-item:nth-child(4) { animation-delay: 0.8s; }
.gallery-item:nth-child(5) { animation-delay: 1s; }
.gallery-item:nth-child(6) { animation-delay: 1.2s; }

/*Para el cuadro de nuestro catálogo*/
.catalogo-box {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.cuadro-naranja {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    height: 60px;
    background-color: #EC9D2E;
    border-radius: 35px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    padding: 0 20px;
}

/*Para los iconos de contacto*/

.contact-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
    border-radius: 8px;
    padding: 10px;
}

.contact-icon-text {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.contact-item img {
    width: 40px;   /* Aumentado */
    height: 40px;
    margin-right: 8px;
}

.contact-item span {
    font-weight: bold;
    color: #EC9D2E;
    font-size: 30px; /* Antes 25px → más grande */
}

.contact-item p {
    margin: 8px 0 0 0;
    font-size: 14.5px; /* Antes 14px → más grande */
}

/* Estilo para el enlace de teléfono */
.phone-link {
    color: #EC9D2E; /* o el color que usas normalmente */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 30px; /* Aumentado para que se vea bien con el icono */
}


/* Estilo para el enlace de correo electrónico */
.email-link {
    color: #EC9D2E; /* color original */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 30px;
}

/* Pantallas medianas y pequeñas: 1 por fila */
@media (max-width: 992px) {
    .contact-info {
        flex-wrap: wrap;
    }

    .contact-item {
        flex: 0 0 100%;
    }
}

/* Ajustes para móviles */
@media (max-width: 576px) {
    .contact-item img {
        width: 30px; /* Aumentado ligeramente para que siga viéndose bien con texto grande */
        height: 30px;
    }

    .contact-item span {
        font-size: 24px; /* Aumentado de 20px */
    }

    .contact-item p {
        font-size: 16px; /* Aumentado de 12px */
    }
}



/* Estilos para los logos debajo de contactos y correo*/
.icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* separación entre íconos */
    justify-content: center;
    margin: 30px 0;
}

.icon-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px; /* ajusta según necesites */
    text-align: center;
    gap: 5px;
}

.icon-cell img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

@media (max-width: 576px) {
    .icon-grid {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .icon-cell {
        flex: 0 0 100%;
        width: auto; /* que no quede restringido a 100px si quieres que se adapte */
    }

    .icon-cell img {
        width: 50px;
        height: 50px;
    }
}
