/**
 * Blessed7
 * Archivo: assets/css/colecciones.css
 *
 * Estilos exclusivos para:
 * - Portada de colecciones.
 * - Resumen de colecciones y productos.
 * - Cuadrícula editorial.
 * - Estados vacíos y errores.
 * - Llamada final al catálogo.
 */

.pagina-colecciones {
    background: #f7f7f8;
    color: #171717;
}

.pagina-colecciones .contenedor {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* ==========================================================================
   Portada
   ========================================================================== */

.colecciones-portada {
    position: relative;
    overflow: hidden;
    padding: 34px 0 78px;
    color: #fff;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(151, 105, 255, 0.3),
            transparent 34%
        ),
        radial-gradient(
            circle at 8% 100%,
            rgba(105, 58, 190, 0.18),
            transparent 34%
        ),
        linear-gradient(135deg, #101010 0%, #1b1920 56%, #292130 100%);
}

.colecciones-portada::before,
.colecciones-portada::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.colecciones-portada::before {
    top: -220px;
    right: -110px;
    width: 480px;
    height: 480px;
}

.colecciones-portada::after {
    right: 215px;
    bottom: -240px;
    width: 390px;
    height: 390px;
}

.colecciones-portada__interior {
    position: relative;
    z-index: 1;
}

.migas {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 46px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
}

.migas a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms ease;
}

.migas a:hover {
    color: #fff;
}

.colecciones-portada__contenido {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 58px;
}

.colecciones-portada__texto {
    min-width: 0;
}

.colecciones-portada__eyebrow {
    margin: 0 0 13px;
    color: #cdb4ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.colecciones-portada h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.25rem, 5vw, 4.55rem);
    font-weight: 800;
    letter-spacing: -0.058em;
    line-height: 0.97;
}

.colecciones-portada__texto > p:last-child {
    max-width: 650px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.75;
}

.colecciones-portada__estadisticas {
    display: flex;
    align-items: stretch;
    min-width: 350px;
    padding: 22px 25px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(12px);
}

.colecciones-portada__estadisticas > div {
    flex: 1;
    min-width: 0;
}

.colecciones-portada__estadisticas > span {
    width: 1px;
    margin: 2px 23px;
    background: rgba(255, 255, 255, 0.14);
}

.colecciones-portada__estadisticas strong,
.colecciones-portada__estadisticas div span {
    display: block;
}

.colecciones-portada__estadisticas strong {
    margin-bottom: 6px;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.colecciones-portada__estadisticas div span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    line-height: 1.35;
}

/* ==========================================================================
   Encabezado y cuadrícula
   ========================================================================== */

.colecciones-seccion {
    padding: 72px 0 88px;
}

.colecciones-encabezado {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 31px;
}

.colecciones-encabezado p {
    margin: 0 0 8px;
    color: #8253df;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.colecciones-encabezado h2 {
    margin: 0;
    color: #171717;
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.colecciones-encabezado > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #d8d3dd;
    color: #29252d;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition:
        gap 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.colecciones-encabezado > a:hover {
    gap: 14px;
    border-color: #8253df;
    color: #7040ce;
}

.colecciones-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.coleccion-tarjeta {
    min-width: 0;
}

.coleccion-tarjeta--principal {
    grid-column: span 2;
    grid-row: span 2;
}

.coleccion-tarjeta__imagen {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 420px;
    border-radius: 22px;
    background: #242127;
    box-shadow: 0 12px 35px rgba(28, 20, 36, 0.1);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

.coleccion-tarjeta--principal .coleccion-tarjeta__imagen {
    min-height: 858px;
}

.coleccion-tarjeta__imagen > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 650ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 300ms ease;
}

.coleccion-tarjeta__sombra {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(10, 9, 11, 0.07) 12%,
            rgba(10, 9, 11, 0.22) 45%,
            rgba(10, 9, 11, 0.92) 100%
        );
    transition: background 300ms ease;
}

.coleccion-tarjeta__imagen:hover > img {
    filter: saturate(1.05);
    transform: scale(1.045);
}

.coleccion-tarjeta__imagen:hover .coleccion-tarjeta__sombra {
    background:
        linear-gradient(
            180deg,
            rgba(10, 9, 11, 0.03) 12%,
            rgba(10, 9, 11, 0.18) 42%,
            rgba(10, 9, 11, 0.95) 100%
        );
}

.coleccion-tarjeta__imagen:focus-visible {
    outline: 4px solid rgba(130, 83, 223, 0.4);
    outline-offset: 4px;
}

.coleccion-tarjeta__insignia {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(15, 13, 17, 0.58);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.coleccion-tarjeta__contenido {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 27px;
}

.coleccion-tarjeta--principal .coleccion-tarjeta__contenido {
    padding: 38px;
}

.coleccion-tarjeta__subtitulo {
    margin: 0 0 9px;
    color: #d5bfff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.coleccion-tarjeta h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.coleccion-tarjeta--principal h3 {
    max-width: 570px;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.coleccion-tarjeta__descripcion {
    display: -webkit-box;
    overflow: hidden;
    max-width: 580px;
    margin: 13px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.coleccion-tarjeta__pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 23px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.coleccion-tarjeta__pie > span {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.75rem;
}

.coleccion-tarjeta__pie strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.77rem;
    white-space: nowrap;
}

.coleccion-tarjeta__pie strong span {
    transition: transform 180ms ease;
}

.coleccion-tarjeta__imagen:hover .coleccion-tarjeta__pie strong span {
    transform: translateX(4px);
}

/* ==========================================================================
   Estados
   ========================================================================== */

.colecciones-estado {
    max-width: 680px;
    margin: 20px auto 0;
    padding: 58px 30px;
    border: 1px solid #e6e2e9;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(34, 24, 45, 0.06);
    text-align: center;
}

.colecciones-estado > span:first-child {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #f0eaff;
    color: #7543d2;
    font-size: 1.55rem;
    place-items: center;
}

.colecciones-estado--error > span:first-child {
    background: #fff0f0;
    color: #bf3434;
}

.colecciones-estado h2 {
    margin: 0;
    color: #1b191d;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.colecciones-estado p {
    max-width: 500px;
    margin: 13px auto 24px;
    color: #716c75;
    font-size: 0.9rem;
    line-height: 1.7;
}

.colecciones-estado a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 12px;
    background: #181719;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.colecciones-estado a:hover {
    background: #7040ce;
    transform: translateY(-1px);
}

/* ==========================================================================
   Llamada al catálogo
   ========================================================================== */

.colecciones-llamada {
    padding: 0 0 90px;
}

.colecciones-llamada__interior {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 46px 50px;
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(178, 141, 255, 0.22),
            transparent 34%
        ),
        #19171c;
    color: #fff;
}

.colecciones-llamada__interior::after {
    position: absolute;
    right: -70px;
    bottom: -170px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.colecciones-llamada__interior > div,
.colecciones-llamada__interior > a {
    position: relative;
    z-index: 1;
}

.colecciones-llamada p {
    margin: 0 0 8px;
    color: #cbb0ff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.colecciones-llamada h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.colecciones-llamada div > span {
    display: block;
    max-width: 610px;
    margin-top: 11px;
    color: rgba(255, 255, 255, 0.63);
    font-size: 0.87rem;
    line-height: 1.65;
}

.colecciones-llamada__interior > a {
    display: inline-flex;
    min-height: 50px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 22px;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    color: #181719;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        gap 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.colecciones-llamada__interior > a:hover {
    gap: 14px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

/* ==========================================================================
   Adaptación para tablet
   ========================================================================== */

@media (max-width: 980px) {
    .colecciones-portada__contenido {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 34px;
    }

    .colecciones-portada__estadisticas {
        width: min(100%, 410px);
        min-width: 0;
    }

    .colecciones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coleccion-tarjeta--principal {
        grid-column: span 2;
        grid-row: auto;
    }

    .coleccion-tarjeta--principal .coleccion-tarjeta__imagen {
        min-height: 600px;
    }

    .colecciones-llamada__interior {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==========================================================================
   Adaptación para móvil
   ========================================================================== */

@media (max-width: 680px) {
    .pagina-colecciones .contenedor {
        width: min(100% - 28px, 1180px);
    }

    .colecciones-portada {
        padding: 24px 0 54px;
    }

    .migas {
        margin-bottom: 34px;
        font-size: 0.75rem;
    }

    .colecciones-portada h1 {
        font-size: clamp(2.15rem, 12vw, 3.2rem);
    }

    .colecciones-portada__texto > p:last-child {
        margin-top: 18px;
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .colecciones-portada__estadisticas {
        padding: 18px;
        border-radius: 17px;
    }

    .colecciones-portada__estadisticas > span {
        margin-inline: 17px;
    }

    .colecciones-portada__estadisticas strong {
        font-size: 1.7rem;
    }

    .colecciones-seccion {
        padding: 50px 0 64px;
    }

    .colecciones-encabezado {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 24px;
    }

    .colecciones-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .coleccion-tarjeta--principal {
        grid-column: auto;
    }

    .coleccion-tarjeta__imagen,
    .coleccion-tarjeta--principal .coleccion-tarjeta__imagen {
        min-height: 490px;
        border-radius: 18px;
    }

    .coleccion-tarjeta__contenido,
    .coleccion-tarjeta--principal .coleccion-tarjeta__contenido {
        padding: 24px 20px;
    }

    .coleccion-tarjeta--principal h3,
    .coleccion-tarjeta h3 {
        font-size: 1.9rem;
    }

    .coleccion-tarjeta__descripcion {
        font-size: 0.8rem;
    }

    .coleccion-tarjeta__insignia {
        top: 16px;
        left: 16px;
    }

    .coleccion-tarjeta__pie {
        gap: 12px;
    }

    .colecciones-estado {
        padding: 44px 21px;
        border-radius: 20px;
    }

    .colecciones-llamada {
        padding-bottom: 64px;
    }

    .colecciones-llamada__interior {
        gap: 28px;
        padding: 34px 24px;
        border-radius: 20px;
    }

    .colecciones-llamada__interior > a {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .colecciones-portada__estadisticas {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .colecciones-portada__estadisticas > span {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .coleccion-tarjeta__imagen,
    .coleccion-tarjeta--principal .coleccion-tarjeta__imagen {
        min-height: 450px;
    }

    .coleccion-tarjeta__pie {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}

/* ==========================================================================
   Preferencias de movimiento
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .coleccion-tarjeta__imagen > img,
    .coleccion-tarjeta__pie strong span,
    .colecciones-encabezado > a,
    .colecciones-llamada__interior > a,
    .colecciones-estado a {
        transition: none;
    }
}