
/* =========================
   CATEGORÍAS
========================= */

.categories {
    padding: 48px 18px 60px;
    background-color: #f8f4ef;
}

/* =========================
   ENCABEZADO
========================= */

.section-heading {
    text-align: center;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.3;

    color: #211d1a;
}

.section-heading p {
    margin: 12px 0 18px;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;

    letter-spacing: 3px;
    line-height: 1.8;
    text-transform: uppercase;

    color: #71665d;
}

.section-heading::after {
    content: "";

    display: block;
    width: 54px;
    height: 2px;

    margin: 22px auto 0;

    background-color: #2d2723;
}

/* =========================
   GRID
========================= */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

/* =========================
   TARJETA
========================= */

.category-card {
    display: block;
    min-width: 0;

    color: #2d2723;
    text-decoration: none;
    text-align: center;

    transition: transform 0.3s ease;
}

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

.category-card img {
    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 14px 14px 0 0;

    transition:
        filter 0.4s ease,
        transform 0.4s ease;
}

/* =========================
   ETIQUETA
========================= */

.category-card h3 {
    display: grid;

    /*
       Icono | Nombre | Flecha
    */
    grid-template-columns: 12px minmax(0, 1fr) 16px;

    align-items: center;
    justify-content: center;
    gap: 2px;

    width: 100%;
    min-width: 0;
    min-height: 38px;

    box-sizing: border-box;
    margin: 0;
    padding: 5px 5px;

    background-color: #faf7f1;

    border: 1px solid #ded3c7;
    border-top: none;
    border-radius: 0 0 25px 25px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 8px;
    font-weight: 400;

    letter-spacing: -0.1px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;

    color: #29231f;

    overflow: hidden;
}

/* =========================
   ICONOS
========================= */

.category-card h3::before {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 10px;
    min-width: 0;
    height: 16px;

    margin: 0;

    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 400;

    color: #44382f;
}

/* Icono de cada categoría */

.category-card:nth-child(1) h3::before {
    content: "♙";
}

.category-card:nth-child(2) h3::before {
    content: "♧";
}

.category-card:nth-child(3) h3::before {
    content: "♡";
}

.category-card:nth-child(4) h3::before {
    content: "⌁";
}

.category-card:nth-child(5) h3::before {
    content: "⌁";
}

.category-card:nth-child(6) h3::before {
    content: "✧";
}

/* =========================
   FLECHA
========================= */

.category-card h3::after {
    content: "›";

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

    width: 13px;
    min-width: 13px;
    height: 13px;

    box-sizing: border-box;

    border: 1px solid #bdb0a3;
    border-radius: 50%;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 300;

    color: #51443a;
}

/* =========================
   HOVER
========================= */

.category-card:hover {
    transform: translateY(-4px);
}

.category-card:hover img {
    filter: brightness(1.04);
}

.category-card:hover h3 {
    background-color: #eee5da;
    border-color: #c7b8a9;
}

.category-card:hover h3::after {
    background-color: #2d2723;
    border-color: #2d2723;
    color: #ffffff;
}


.category-card-proximamente {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    cursor: default;
}

.category-card-proximamente img {
    filter: brightness(0.45) blur(2px);
    transform: scale(1.03);
}

.category-card-proximamente h3 {
    position: relative;
    z-index: 2;
}

.category-card-proximamente::after {
    content: "MUY PRONTO";
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: clamp(12px, 1.4vw, 17px);
    font-weight: 400;
    letter-spacing: 3px;
    text-align: center;
    pointer-events: none;
}




/* ==========================================
   CARRITO GENERAL
========================================== */

.cart-button {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    top: auto !important;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 52px;
    height: 52px;
    padding: 0;

    box-sizing: border-box;
    border: none;
    border-radius: 50%;

    background-color: #29231f;
    color: #fff;

    cursor: pointer;
    z-index: 100;
    text-decoration: none;
}

.cart-icon {
    font-size: 18px;
    
}

.cart-count {
    position: absolute;
    top: -5px !important;
    right: -5px !important;

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

    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;

    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;

    border: none !important;
    border-radius: 50% !important;

    background-color: #c7a58a !important;
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 10px;
    line-height: 1;

    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}
/* Ocultar el contador del encabezado en categorías */
#cartButton #cartCount {
    display: none !important;
}

/* =========================
   TABLET Y ESCRITORIO
========================= */

@media (min-width: 768px) {

    .categories {
        max-width: 1200px;
        margin: 0 auto;
        padding: 80px 50px;
    }

    .section-heading {
        margin-bottom: 42px;
    }

    .section-heading h2 {
        font-size: 32px;
        letter-spacing: 1.8px;
    }

    .section-heading p {
        font-size: 11px;
        letter-spacing: 4px;
    }

    .categories-grid {
        gap: 28px 24px;
    }

    .category-card h3 {
        grid-template-columns: 19px minmax(0, 1fr) 23px;

        min-height: 58px;
        padding: 10px 14px;

        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .category-card h3::before {
        width: 19px;
        font-size: 19px;
    }

    .category-card h3::after {
        width: 23px;
        min-width: 23px;
        height: 23px;

        font-size: 18px;
    }
}
