/* REDECOMSA-PUBLIC-CATALOGS-1.0.0 START */

.rdc-public-catalogs {
    width: min(100%, 92rem);
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 4rem;
    color: #102f55;
}

.rdc-public-catalogs-hero {
    margin-bottom: 2rem;
    padding: clamp(1.5rem, 4vw, 2.8rem);
    border-bottom: 0.3rem solid #f05a00;
    border-radius: 1.1rem;
    background:
        linear-gradient(
            120deg,
            #032d68,
            #0579bd
        );
    color: #ffffff;
    box-shadow: 0 1rem 2.5rem rgba(0, 45, 98, 0.12);
}

.rdc-public-catalogs-eyebrow {
    display: block;
    margin-bottom: 0.45rem;
    color: #b9e5ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rdc-public-catalogs-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.rdc-public-catalogs-hero p {
    max-width: 54rem;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.65;
}

.rdc-public-catalogs-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(min(100%, 19rem), 1fr)
        );
    gap: 1.5rem;
}

.rdc-public-catalog-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9e5ee;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 0.8rem 2rem rgba(0, 48, 100, 0.08);
}

.rdc-public-catalog-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eef5fa;
}

.rdc-public-catalog-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.rdc-public-catalog-featured {
    position: absolute;
    z-index: 2;
    top: 0.8rem;
    left: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f05a00;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.rdc-public-catalog-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.25rem;
}

.rdc-public-catalog-company {
    margin-bottom: 0.4rem;
    color: #0873ad;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rdc-public-catalog-content h2 {
    margin: 0;
    color: #05346c;
    font-size: 1.25rem;
    line-height: 1.3;
}

.rdc-public-catalog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    margin-top: 0.9rem;
    color: #536b84;
    font-size: 0.9rem;
}

.rdc-public-catalog-file {
    margin: 1rem 0 0;
    color: #60758a;
    font-size: 0.9rem;
}

.rdc-public-catalog-actions {
    margin-top: auto;
    padding-top: 1.2rem;
}

.rdc-public-catalog-button {
    display: inline-flex;
    width: 100%;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-sizing: border-box;
    padding: 0.72rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.rdc-public-catalog-button.is-primary {
    background: #006fb5;
    color: #ffffff;
}

.rdc-public-catalog-button.is-primary:hover,
.rdc-public-catalog-button.is-primary:focus-visible {
    background: #f05a00;
    color: #ffffff;
    transform: translateY(-0.08rem);
}

.rdc-public-catalogs-empty {
    padding: 3rem 1.25rem;
    border: 1px dashed #b8cfdf;
    border-radius: 1rem;
    background: #f5f9fc;
    text-align: center;
}

.rdc-public-catalogs-empty .fa {
    color: #0877ba;
    font-size: 2.5rem;
}

.rdc-public-catalogs-empty h2 {
    margin: 1rem 0 0;
    color: #05346c;
}

.rdc-public-catalogs-empty p {
    margin: 0.65rem auto 0;
    color: #60758a;
}

@media (max-width: 47.99rem) {
    .rdc-public-catalogs {
        padding-top: 0.75rem;
    }

    .rdc-public-catalogs-hero {
        margin-bottom: 1.25rem;
        border-radius: 0.8rem;
    }

    .rdc-public-catalogs-grid {
        gap: 1rem;
    }
}

/* REDECOMSA-PUBLIC-CATALOGS-1.0.0 END */

/* REDECOMSA-PUBLIC-CATALOGS-COMPACT-1.0.0 START */

/*
 * Escritorio:
 * - máximo 3 tarjetas por fila;
 * - ancho mínimo 320 px;
 * - ancho máximo 380 px;
 * - tarjetas centradas cuando haya pocos catálogos.
 */
.rdc-public-catalogs-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 20rem),
                23.75rem
            )
        );
    grid-auto-rows: 1fr;
    justify-content: center;
    align-items: stretch;
}

.rdc-public-catalog-card {
    width: 100%;
    max-width: 23.75rem;
    height: 100%;
}

/*
 * La página completa del PDF se mantiene visible
 * mediante object-fit: contain.
 */
.rdc-public-catalog-cover {
    height: 17.5rem;
    aspect-ratio: auto;
}

/*
 * Tableta:
 * el ancho disponible permitirá normalmente
 * dos tarjetas por fila.
 */
@media (
    min-width: 48rem
) and (
    max-width: 69.99rem
) {
    .rdc-public-catalogs-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    18rem,
                    23.75rem
                )
            );
    }
}

/*
 * Celular:
 * una sola tarjeta, centrada y sin desbordamiento.
 */
@media (max-width: 47.99rem) {
    .rdc-public-catalogs-grid {
        grid-template-columns:
            minmax(0, 1fr);
        justify-items: center;
    }

    .rdc-public-catalog-card {
        max-width: 25rem;
    }

    .rdc-public-catalog-cover {
        height: 15rem;
    }
}

/* REDECOMSA-PUBLIC-CATALOGS-COMPACT-1.0.0 END */

/* REDECOMSA-CATALOG-PUBLIC-SPACING-1.3.0 START */

/*
 * Misma separación que las páginas interiores:
 *
 * menú
 *   ↓ 48 px en escritorio
 * hero
 *
 * La hoja solo se carga en Catálogos.
 */

#g-main {
    padding-top: 0 !important;
}

#g-main
> .g-container
> .g-grid:first-child {
    display: none !important;
}

#g-main
> .g-container
> .g-grid:nth-child(2)
.g-content {
    padding-top: 3rem !important;
}

.rdc-public-catalogs {
    padding-top: 0 !important;
}

@media (max-width: 59.99rem) {
    #g-main
    > .g-container
    > .g-grid:nth-child(2)
    .g-content {
        padding-top: 1.5rem !important;
    }
}

/* REDECOMSA-CATALOG-PUBLIC-SPACING-1.3.0 END */
