/* =========================================================
   APHAREL — CATEGORÍAS
   Tarjetas de categorías para la página de inicio
========================================================= */


/* =========================================================
   1. SECCIÓN
========================================================= */

.apharel-categories {
    width: 100%;

    padding: 85px 0 90px;

    background: #fff;
}


/* =========================================================
   2. ENCABEZADO
========================================================= */

.apharel-categories-header {
    width: 100%;
    max-width: 900px;

    margin: 0 auto 45px;
    padding: 0 20px;

    text-align: center;

    background: transparent !important;
}


/* =========================================================
   3. EYEBROW
========================================================= */

.apharel-categories-eyebrow {
    display: block;

    margin: 0 0 16px;
    padding: 0 !important;

    background: transparent !important;
    background-image: none !important;

    color: #777;

    font-family: var(--apharel-font-body);

    font-size: 11px;
    font-weight: 600;

    line-height: 1;

    letter-spacing: 4px;
}


/* =========================================================
   4. TÍTULO
========================================================= */

.apharel-categories-header h2 {
    display: block;

    margin: 0;
    padding: 0 !important;

    background: transparent !important;
    background-image: none !important;

    color: #111;

    /* 🔴 CAMBIO — Bebas Neue Cyrillic Bold para títulos */
    font-family: var(--apharel-font-title);

    font-size: clamp(38px, 4vw, 58px);

    /* 🔴 CAMBIO — título en negrita como el logo APHAREL */
    font-weight: 700;

    line-height: 1.05;

    /* 🔴 CAMBIO — espaciado positivo para evitar letras apretadas */
    letter-spacing: 1.5px;
}


/* =========================================================
   5. DESCRIPCIÓN
========================================================= */

.apharel-categories-header p {
    display: block;

    margin: 20px 0 0;
    padding: 0 !important;

    background: transparent !important;
    background-image: none !important;

    color: #777;

    /* 🔴 CAMBIO — texto normal en Arial */
    font-family: var(--apharel-font-body);

    font-size: 14px;
    font-weight: 400;

    line-height: 1.4;

    letter-spacing: 1px;
}


/* =========================================================
   6. SEGURIDAD CONTRA RESALTADOS
   Evita que otros estilos del tema agreguen fondos.
========================================================= */

.apharel-categories-header mark,
.apharel-categories-header span,
.apharel-categories-header h2,
.apharel-categories-header p {
    background-color: transparent !important;
    background-image: none !important;
}


/* =========================================================
   7. GRID
========================================================= */

.apharel-categories-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    width: calc(100% - 40px);
    max-width: 1050px;

    margin: 0 auto;

    gap: 14px;
}


/* =========================================================
   8. TARJETA
========================================================= */

.apharel-category-card {
    position: relative;

    display: block;

    min-width: 0;

    overflow: visible;

    box-sizing: border-box;

    background: #fff;

    border: 1px solid #222;
    border-radius: 14px;

    text-decoration: none;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================================
   9. MARCO ROJO
========================================================= */

.apharel-category-card::after {
    content: "";

    position: absolute;

    inset: -2px;

    z-index: 20;

    border: 3px solid #d71920;
    border-radius: 16px;

    opacity: 0;

    pointer-events: none;

    transform: scale(1);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* =========================================================
   10. TARJETA ACTIVA
========================================================= */

.apharel-category-card.is-active::after {
    opacity: 1;

    transform: scale(1.012);
}


/* =========================================================
   11. HOVER DE TARJETA
========================================================= */

.apharel-category-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08);
}


.apharel-category-card:hover::after {
    opacity: 1;

    transform: scale(1.012);
}


/* =========================================================
   12. CONTENEDOR DE IMAGEN
========================================================= */

.apharel-category-image-wrap {
    position: relative;

    width: 100%;

    aspect-ratio: 0.78;

    overflow: hidden;

    background: #111;

    border-radius: 13px 13px 0 0;
}


/* =========================================================
   13. IMAGEN
========================================================= */

.apharel-category-image-wrap img.apharel-category-image {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box;

    border: 0;

    object-fit: cover;
    object-position: center;

    transition:
        transform 0.6s ease;
}


/* =========================================================
   14. ZOOM DE IMAGEN
========================================================= */

.apharel-category-card:hover
.apharel-category-image-wrap img.apharel-category-image {
    transform: scale(1.04);
}


/* =========================================================
   15. OSCURECIMIENTO DE IMAGEN
========================================================= */

.apharel-category-image-wrap::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 2;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02) 45%,
            rgba(0, 0, 0, 0.45) 100%
        );

    pointer-events: none;
}


/* =========================================================
   16. NÚMERO
========================================================= */

.apharel-category-number {
    position: absolute;

    top: 10px;
    left: 10px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 27px;

    box-sizing: border-box;

    background: #111;

    border-radius: 5px;

    color: #fff;

    /* 🔴 CAMBIO — texto normal */
    font-family: var(--apharel-font-body);

    font-size: 10px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: 1px;
}


/* =========================================================
   17. PLACEHOLDER — SIN IMAGEN
========================================================= */

.apharel-category-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background: #111;

    color: #fff;

    font-family: var(--apharel-font-body);

    font-size: 15px;
    font-weight: 500;

    letter-spacing: 4px;
}


/* =========================================================
   18. INFORMACIÓN DE LA CATEGORÍA
========================================================= */

.apharel-category-info {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 76px;

    padding: 13px 14px;

    box-sizing: border-box;

    background: #fff;

    border-top: 1px solid #222;
    border-radius: 0 0 13px 13px;
}


/* =========================================================
   19. TEXTO DE LA CATEGORÍA
========================================================= */

.apharel-category-info-text {
    min-width: 0;
}


.apharel-category-info-text h3 {
    margin: 0 0 7px;

    color: #111 !important;

    /* 🔴 CAMBIO — nombre de categoría en Arial */
    font-family: var(--apharel-font-body);

    font-size: 15px;

    /* 🔴 CAMBIO — menos pesado */
    font-weight: 600;

    line-height: 1;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}


.apharel-category-info-text span {
    display: block;

    color: #111 !important;

    font-family: var(--apharel-font-body);

    font-size: 8px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: 1px;
}


/* =========================================================
   20. FLECHA
========================================================= */

.apharel-category-arrow {
    flex: 0 0 auto;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 29px;
    height: 29px;

    margin-left: 8px;

    box-sizing: border-box;

    border: 1px solid #222;
    border-radius: 50%;

    background: #fff;

    color: #111 !important;

    font-family: var(--apharel-font-body);

    font-size: 14px;

    line-height: 1;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   21. FLECHA — HOVER
========================================================= */

.apharel-category-card:hover
.apharel-category-arrow {
    background: #d71920;

    border-color: #d71920;

    color: #fff !important;

    transform: translateX(3px);
}


/* =========================================================
   22. TABLET
========================================================= */

@media (max-width: 900px) {

    .apharel-categories {
        padding: 70px 0 75px;
    }


    .apharel-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        width: calc(100% - 30px);

        gap: 12px;
    }

}


/* =========================================================
   23. MÓVIL
========================================================= */

@media (max-width: 600px) {

    .apharel-categories {
        padding: 60px 0 65px;
    }


    .apharel-categories-header {
        margin-bottom: 28px;

        padding: 0 15px;
    }


    .apharel-categories-eyebrow {
        margin-bottom: 14px;

        font-size: 10px;

        letter-spacing: 2.5px;
    }


    .apharel-categories-header h2 {
        font-size: 34px;

        /* 🔴 CAMBIO — sin espaciado negativo */
        letter-spacing: 1px;

        /* 🔴 CAMBIO — mantener título en negrita en móvil */
        font-weight: 700;
    }


    .apharel-categories-header p {
        margin-top: 12px;

        font-size: 11px;

        letter-spacing: 0.7px;
    }


    .apharel-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        width: calc(100% - 24px);

        gap: 9px;
    }


    .apharel-category-info {
        min-height: 64px;

        padding: 11px;
    }


    .apharel-category-info-text h3 {
        margin-bottom: 6px;

        font-size: 12px;
    }


    .apharel-category-info-text span {
        font-size: 7px;

        letter-spacing: 0.7px;
    }


    .apharel-category-arrow {
        width: 25px;
        height: 25px;

        font-size: 12px;
    }


    .apharel-category-number {
        top: 8px;
        left: 8px;

        width: 29px;
        height: 24px;

        font-size: 9px;
    }

}


/* =========================================================
   24. ACCESIBILIDAD
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .apharel-category-card,
    .apharel-category-card::after,
    .apharel-category-image-wrap img.apharel-category-image,
    .apharel-category-arrow {
        transition: none;
    }

}