/* =========================================
HEADER
========================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background-color: var(--color-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}


/* =========================================
PÁGINA INTERNA
========================================= */

.internal-page {
    min-height: 100vh;
    background-color: #f5f7fb;
}

.internal-header {
    padding: 125px 5% 40px;
}

.internal-header__content {
    margin-top: 25px;
    width: 90%;
    max-width: 1400px;
}

.back-link {
    display: inline-block;
    margin-bottom: 28px;

    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;

    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary);
}

.internal-header__eyebrow {
    display: block;
    margin-bottom: 10px;

    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.internal-header h1 {
    margin: 0 0 14px;

    color: #17365d;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
}

.internal-header p {
    max-width: 680px;
    margin: 0;

    color: #667085;
    font-size: 18px;
    line-height: 1.6;
}


/* =========================================
CATÁLOGO
========================================= */

.catalogo {
    width: 100%;
    padding: 15px 0 90px;
    background: #ffffff;
}

.productos-grid {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}


/* =========================================
TARJETAS
========================================= */

.producto-card {
    display: flex;
    flex-direction: column;

    background-color: #ffffff;
    border: 1px solid #e8ebf0;
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);

    transition:
            transform 0.3s ease,
            box-shadow 0.3s ease,
            border-color 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-6px);
    border-color: rgba(10, 93, 184, 0.25);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1);
}

.producto-card__imagen {
    height: 190px;
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #f8f9fb;
}

.producto-card__imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.producto-card__contenido {
    flex: 1;
    padding: 20px;

    display: flex;
    flex-direction: column;

    color: #101828;
}

.producto-card__contenido h3 {
    margin-bottom: 10px;

    color: #17365d;
    font-size: 20px;
    line-height: 1.3;
}

.producto-card__contenido p {
    margin-bottom: 20px;

    color: #667085;
    font-size: 15px;
    line-height: 1.5;
}

.producto-card__contenido .btn {
    margin-top: auto;
}


/* =========================================
BOTONES
========================================= */

.btn {
    width: 100%;
    padding: 13px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
            background-color 0.3s ease,
            transform 0.3s ease,
            box-shadow 0.3s ease;
}

.btn--primary {
    border: none;
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn--primary:hover {
    background-color: #003c82;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(10, 93, 184, 0.2);
}

.btn--secondary {
    border: none;
    background-color: #6c757d;
    color: #ffffff;
}

.btn--secondary:hover {
    background-color: #565e64;
}


/* =========================================
POPUP PRODUCTO
========================================= */

.popup {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background-color: rgba(0, 0, 0, 0.55);
}

.popup.activo {
    display: flex;
}


/* Popup con tamaño fijo */

.popup__box {
    position: relative;

    width: 100%;
    max-width: 1050px;
    height: 500px;

    display: grid;
    grid-template-columns: 42% 58%;

    overflow: hidden;

    background-color: #ffffff;
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);

    animation: mostrarPopup 0.3s ease;
}


@keyframes mostrarPopup {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
IMAGEN POPUP
========================================= */

.popup__imagen {
    height: 100%;
    padding: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #f5f7fb;
}

.popup__imagen img {
    width: 100%;
    height: 100%;
    max-height: 360px;

    object-fit: contain;
}


/* =========================================
CONTENIDO POPUP
========================================= */

.popup__contenido {
    height: 100%;
    min-height: 0;

    padding: 38px 50px;

    display: flex;
    flex-direction: column;
}

.popup__categoria {
    flex-shrink: 0;

    color: #0a5db8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.popup__contenido h2 {
    flex-shrink: 0;

    margin-top: 15px;
    margin-bottom: 0;

    color: #1a2d4a;
    font-size: 38px;
    line-height: 1.2;
}


/* =========================================
DESCRIPCIÓN SCROLLEABLE
========================================= */

.popup__contenido p {
    height: 175px;

    margin-top: 22px;
    margin-bottom: 0;
    padding-right: 14px;

    overflow-y: auto;
    overflow-x: hidden;

    color: #5d6775;
    font-size: 18px;
    line-height: 1.8;
}


/* Scroll */

.popup__contenido p::-webkit-scrollbar {
    width: 6px;
}

.popup__contenido p::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.popup__contenido p::-webkit-scrollbar-thumb {
    background: #c2c8d0;
    border-radius: 10px;
}

.popup__contenido p::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}


/* =========================================
BOTONES POPUP
========================================= */

.popup__botones {
    margin-top: auto;

    display: flex;
    gap: 15px;

    flex-shrink: 0;
}


/* =========================================
BOTÓN CERRAR X
========================================= */

.popup__cerrar {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background-color: #0a5db8;
    color: #ffffff;

    font-size: 18px;
    cursor: pointer;

    transition:
            background-color 0.2s ease,
            transform 0.2s ease;
}

.popup__cerrar:hover {
    background-color: #003c82;
    transform: scale(1.05);
}
/* =========================================
   DESCARGAR CATÁLOGO
========================================= */

.catalogo__actions {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto 32px;

    display: flex;
    justify-content: flex-end;
}


/* BOTÓN */

.btn-download-catalog {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 13px 20px;

    background-color: #ffffff;

    color: var(--color-text-blue);

    border: 1px solid rgba(59, 122, 224, 0.25);
    border-radius: 9px;

    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 650;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
            0 4px 14px rgba(15, 23, 42, 0.04);

    transition:
            background-color 0.25s ease,
            color 0.25s ease,
            border-color 0.25s ease,
            transform 0.25s ease,
            box-shadow 0.25s ease;
}


/* ICONO */

.btn-download-catalog svg {
    width: 18px;
    height: 18px;

    stroke-width: 2;

    transition: transform 0.25s ease;
}


/* HOVER */

.btn-download-catalog:hover {
    background-color: var(--color-text-blue);

    color: #ffffff;

    border-color: var(--color-text-blue);

    transform: translateY(-2px);

    box-shadow:
            0 8px 22px rgba(59, 122, 224, 0.18);
}


.btn-download-catalog:hover svg {
    transform: translateY(2px);
}


/* CLICK */

.btn-download-catalog:active {
    transform: translateY(0);
}


/* FOCUS */

.btn-download-catalog:focus-visible {
    outline: 3px solid rgba(59, 122, 224, 0.20);
    outline-offset: 3px;
}


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

@media (max-width: 650px) {

    .catalogo__actions {
        justify-content: stretch;

        margin-bottom: 24px;
    }

    .btn-download-catalog {
        width: 100%;
    }
}


@media (max-width: 1200px) {

    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}


@media (max-width: 900px) {

    .internal-header {
        padding: 110px 5% 35px;
    }

    .internal-header h1 {
        font-size: 44px;
    }

    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* En tablet/mobile dejamos de forzar
       los 500px de desktop */

    .popup__box {
        height: auto;
        max-height: 90vh;

        grid-template-columns: 1fr;

        overflow-y: auto;
    }

    .popup__imagen {
        height: 240px;
        padding: 25px;
    }

    .popup__imagen img {
        height: 100%;
        max-height: 220px;
    }

    .popup__contenido {
        height: auto;
        padding: 30px;
    }

    .popup__contenido h2 {
        font-size: 32px;
    }

    .popup__contenido p {
        height: auto;
        max-height: 180px;
        overflow-y: auto;
    }

    .popup__botones {
        margin-top: 25px;
        flex-direction: column;
    }

}


@media (max-width: 600px) {

    .internal-header {
        padding: 105px 20px 30px;
    }

    .internal-header__content {
        width: 100%;
    }

    .internal-header h1 {
        font-size: 38px;
    }

    .internal-header p {
        font-size: 16px;
    }

    .back-link {
        margin-bottom: 24px;
    }

    .catalogo {
        padding: 10px 20px 70px;
    }

    .productos-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .popup {
        padding: 15px;
    }

    .popup__contenido {
        padding: 25px 22px;
    }

    .popup__contenido h2 {
        font-size: 27px;
    }

    .popup__contenido p {
        max-height: 160px;

        font-size: 16px;
        line-height: 1.65;
    }

    .popup__cerrar {
        width: 40px;
        height: 40px;

        top: 12px;
        right: 12px;
    }

}