@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@300;400;500;600&display=swap");
@import url("https://fonts.googleapis.com/css?family=Caveat|Lato:400,700|Patua+One&display=swap");

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}
/* =========================================================
   PÁGINA DE SUBCATEGORÍA
   ========================================================= */

.subcategory-page {
    width: 100%;
    min-height: 100vh;
    padding: 0 5% 70px;
    background: #f8f5f2;
    box-sizing: border-box;
}


/* =========================================================
   ENCABEZADO DE LA SUBCATEGORÍA
   ========================================================= */

.subcategory-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 20px 30px;
    text-align: center;
}


/* Botón volver */

.subcategory-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 22px;

    color: #70234f;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;

    transition: all 0.25s ease;
}


.subcategory-back:hover {
    color: #a45c86;
    transform: translateX(-4px);
}


/* Título */

.subcategory-header h1 {
    margin: 5px 0 12px;

    color: #4f1839;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 600;

    letter-spacing: 0.5px;
}


/* Pequeña línea decorativa debajo del título */

.subcategory-header h1::after {
    content: "";
    display: block;

    width: 70px;
    height: 3px;

    margin: 14px auto 18px;

    background: #9c547d;
    border-radius: 10px;
}


/* Descripción */

.subcategory-header p {
    max-width: 700px;
    margin: 0 auto;

    color: #6f6269;

    font-size: 17px;
    line-height: 1.7;
}

/* =========================================================
   FILTROS DE PRODUCTOS
   ========================================================= */

.product-filters {

    width: 100%;
    max-width: 1250px;

    margin: 10px auto 35px;

    padding: 24px 28px;

    background: #ffffff;

    border: 1px solid #eadfe5;

    border-radius: 20px;

    box-shadow:
        0 6px 20px rgba(82, 38, 63, 0.08);

    box-sizing: border-box;
}


/* =========================================================
   ENCABEZADO DEL FILTRO
   ========================================================= */

.filters-header {

    text-align: center;

    margin-bottom: 20px;
}


.filters-header h2 {

    margin: 0;

    color: #4f1839;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 24px;

    font-weight: 600;

    letter-spacing: 0.4px;
}


/* Línea decorativa */

.filters-header h2::after {

    content: "";

    display: block;

    width: 50px;

    height: 2px;

    margin: 9px auto 0;

    background: #9c547d;

    border-radius: 10px;
}


/* =========================================================
   CONTENEDOR DE LOS FILTROS
   ========================================================= */

.filters-container {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 14px;

    align-items: end;

}


/* =========================================================
   GRUPO INDIVIDUAL
   ========================================================= */

.filter-group {

    display: flex;

    flex-direction: column;

    gap: 6px;

    min-width: 0;
}


/* =========================================================
   ETIQUETAS
   ========================================================= */

.filter-group label {

    color: #6f5262;

    font-family: "Poppins", sans-serif;

    font-size: 13px;

    font-weight: 600;

    letter-spacing: 0.2px;
}


/* =========================================================
   SELECTS
   ========================================================= */

.filter-group select {

    width: 100%;

    height: 43px;

    padding: 8px 12px;

    box-sizing: border-box;

    background: #fcfafb;

    border: 1px solid #dccbd5;

    border-radius: 10px;

    color: #4f1839;

    font-family: "Poppins", sans-serif;

    font-size: 13px;

    cursor: pointer;

    outline: none;

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


/* =========================================================
   SELECT AL PASAR EL MOUSE
   ========================================================= */

.filter-group select:hover {

    border-color: #b985a1;

    background: #ffffff;
}


/* =========================================================
   SELECT ENFOCADO
   ========================================================= */

.filter-group select:focus {

    border-color: #9c547d;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(156, 84, 125, 0.10);
}


/* =========================================================
   BOTÓN LIMPIAR FILTROS
   ========================================================= */

#clear-filters {

    width: 100%;

    height: 43px;

    padding: 8px 14px;

    border: 1px solid #8d4f73;

    border-radius: 10px;

    background: transparent;

    color: #8d4f73;

    font-family: "Poppins", sans-serif;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

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


/* =========================================================
   HOVER BOTÓN
   ========================================================= */

#clear-filters:hover {

    background: #8d4f73;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(141, 79, 115, 0.20);
}


/* =========================================================
   RESULTADOS
   ========================================================= */

.filter-results {

    margin-top: 20px;

    padding-top: 14px;

    border-top: 1px solid #eee3e8;

    color: #756b71;

    font-family: "Poppins", sans-serif;

    font-size: 13px;

    text-align: center;
}


#products-count {

    color: #70234f;

    font-size: 15px;

    font-weight: 700;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .product-filters {

        margin-left: 0;

        margin-right: 0;

        padding: 22px;
    }


    .filters-container {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

}


/* =========================================================
   RESPONSIVE - CELULAR
   ========================================================= */

@media (max-width: 650px) {

    .product-filters {

        margin: 5px 0 28px;

        padding: 18px 15px;

        border-radius: 16px;
    }


    .filters-header {

        margin-bottom: 16px;
    }


    .filters-header h2 {

        font-size: 20px;

    }


    .filters-container {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;

    }


    .filter-group {

        gap: 5px;
    }


    .filter-group label {

        font-size: 12px;

    }


    .filter-group select,
    #clear-filters {

        height: 40px;

        font-size: 12px;

        padding: 7px 9px;

    }


    .filter-results {

        margin-top: 17px;

        padding-top: 12px;

        font-size: 12px;

    }


    #products-count {

        font-size: 14px;

    }

    /* =========================================================
   BOTÓN TOGGLE DE FILTROS (solo móvil)
   ========================================================= */

.toggle-filters-btn {
    display: none; /* oculto en escritorio */
}

.filters-body {
    display: block; /* en escritorio siempre visible */
}

@media (max-width: 650px) {

    .toggle-filters-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 10px 14px;
        background: #fcfafb;
        border: 1px solid #dccbd5;
        border-radius: 10px;
        color: #4f1839;
        font-family: "Poppins", sans-serif;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .toggle-filters-btn.active {
        background: #8d4f73;
        color: #ffffff;
        border-color: #8d4f73;
    }

    .toggle-filters-icon {
        font-size: 16px;
    }

    /* Colapsado por defecto en móvil */
    .filters-body {
        display: none;
        margin-top: 14px;
    }

    .filters-body.open {
        display: block;
        animation: mostrarFiltros 0.25s ease;
    }

    @keyframes mostrarFiltros {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

}

}


/* =========================================================
   CELULARES MUY PEQUEÑOS
   ========================================================= */

@media (max-width: 400px) {

    .product-filters {

        padding: 16px 12px;

    }


    .filters-container {

        gap: 10px;

    }


    .filter-group select,
    #clear-filters {

        font-size: 11px;

        padding-left: 7px;

        padding-right: 7px;

    }


    .filters-header h2 {

        font-size: 19px;

    }

}
/* =========================================================
   CONTENEDOR DE PRODUCTOS
   ========================================================= */

.subcategory-products {
    width: 100%;
    max-width: 1250px;
    margin: 10px auto 0;
}


/* =========================================================
   GRID DE PRODUCTOS
   ========================================================= */

.products-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 30px;

    width: 100%;
}


/* =========================================================
   TARJETA DEL PRODUCTO
   ========================================================= */

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

    background: #ffffff;

    border: 1px solid #eadfe5;
    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 5px 18px rgba(82, 38, 63, 0.08);

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


.product-card:hover {
    transform: translateY(-7px);

    border-color: #d9bfd0;

    box-shadow: 0 14px 30px rgba(82, 38, 63, 0.15);
}


/* =========================================================
   IMAGEN DEL PRODUCTO
   ========================================================= */

.product-card-image {
    width: 100%;
    height: 300px;

    background: #f5f0f2;

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

    overflow: hidden;
}


.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.45s ease;
    box-sizing: border-box;
}


.product-card:hover .product-card-image img {
    transform: scale(1.04);
}


/* =========================================================
   PRODUCTO SIN IMAGEN
   ========================================================= */

.product-no-image {
    width: 100%;
    height: 100%;

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

    color: #b89aaa;

    font-size: 55px;

    background: #f5f0f2;
}


/* =========================================================
   INFORMACIÓN DEL PRODUCTO
   ========================================================= */

.product-card-info {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 22px 22px 24px;
}


/* Nombre */

.product-card-info h2 {
    margin: 0 0 10px;

    color: #4f1839;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 600;
text-align: center;
    line-height: 1.3;
}


/* Descripción */

.product-description {
    margin: 0 0 16px;

    color: #756b71;

    font-size: 14px;
    line-height: 1.6;

    
}


/* =========================================================
   PRECIO
   ========================================================= */

.product-price {
    margin: auto 0 18px;
    color: #70234f;
    font-size: 21px;
    font-weight: 700;
    text-align: center;
}

/* ==========================================
   PRECIO CON DESCUENTO
   ========================================== */

.product-price-discount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 10px 0 15px;
}

/* Distintivo del descuento */

.discount-badge {
    display: inline-block;
    background-color: #e8a0c5;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 3px;
}

/* Precio original */

.product-price-original {
    font-size: 15px;
    color: #777;
    text-decoration: line-through;
    text-decoration-color:crimson
}

/* Precio con descuento */

.product-price-promotion {
    font-size: 22px;
    font-weight: bold;
    color: #74204f;
}

/* =========================================================
   BOTÓN VER PRODUCTO
   ========================================================= */

.product-detail-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;

    box-sizing: border-box;

    background: #70234f;
    color: #ffffff;

    border: none;
    border-radius: 25px;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

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


.product-detail-button:hover {
    background: #8b3d68;

    transform: translateY(-2px);

    box-shadow: 0 6px 15px rgba(112, 35, 79, 0.25);
}


/* =========================================================
   SUBCATEGORÍA SIN PRODUCTOS
   ========================================================= */

.empty-category {
    max-width: 650px;

    margin: 40px auto 70px;
    padding: 55px 30px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #eadfe5;
    border-radius: 20px;

    box-shadow: 0 8px 25px rgba(82, 38, 63, 0.08);
}


.empty-category > i {
    margin-bottom: 20px;

    color: #a45c86;

    font-size: 55px;
}


.empty-category h2 {
    margin: 10px 0 12px;

    color: #4f1839;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
}


.empty-category p {
    margin: 0 0 25px;

    color: #756b71;

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

/* =========================================================
   BOTONES DE LA TARJETA DE PRODUCTO
========================================================= */

.product-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}


/* =========================================================
   BOTÓN COMPRAR
========================================================= */

.product-buy-button {

    width: 100%;

    min-height: 46px;

    padding: 10px 18px;

    border: none;

    border-radius: 12px;

    background: linear-gradient(
        135deg,
        #8d4f73,
        #a9688e
    );

    color: #ffffff;

    font-family: inherit;

    font-size: 0.95rem;

    font-weight: 600;

    letter-spacing: 0.2px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    box-shadow:
        0 4px 10px rgba(141, 79, 115, 0.18);

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


/* ICONO */

.product-buy-button i {

    font-size: 0.95rem;

    transition:
        transform 0.2s ease;

}


/* HOVER */

.product-buy-button:hover {

    background: linear-gradient(
        135deg,
        #75405f,
        #965d7d
    );

    transform: translateY(-2px);

    box-shadow:
        0 7px 16px rgba(141, 79, 115, 0.28);

}


/* MOVIMIENTO DEL CARRITO */

.product-buy-button:hover i {

    transform:
        translateX(2px)
        scale(1.08);

}


/* CLICK */

.product-buy-button:active {

    transform: translateY(0);

    box-shadow:
        0 3px 7px rgba(141, 79, 115, 0.18);

}


/* =========================================================
   BOTÓN VER PRODUCTO
========================================================= */

.product-detail-button {

    width: 100%;

    min-height: 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 9px 18px;

    border-radius: 12px;

    border: 1.5px solid #8d4f73;

    background: transparent;

    color: #8d4f73;

    text-decoration: none;

    font-family: inherit;

    font-size: 0.92rem;

    font-weight: 600;

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


.product-detail-button:hover {

    background: #f7edf3;

    color: #75405f;

    transform: translateY(-1px);

}
/* ========================================================================
                                  MODAL PRODUCTO AGREGADO AL CARRITO
============================================================================= */

.cart-added-modal {

    border: none;

    padding: 0;

    background: transparent;

    width: min(92%, 450px);

}


.cart-added-modal::backdrop {

    background: rgba(40, 20, 35, 0.55);

    backdrop-filter: blur(4px);

}


.cart-added-content {

    position: relative;

    background: #fff;

    border-radius: 24px;

    padding: 32px 28px;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);

    animation:
        cartModalAppear 0.3s ease;

}


@keyframes cartModalAppear {

    from {

        opacity: 0;

        transform:
            translateY(20px)
            scale(0.96);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* =========================================================
   CERRAR
========================================================= */

.cart-added-close {

    position: absolute;

    top: 12px;
    right: 16px;

    width: 34px;
    height: 34px;

    border: none;

    background: transparent;

    font-size: 28px;

    color: #7a5269;

    cursor: pointer;

}


.cart-added-close:hover {

    color: #61234a;

}


/* =========================================================
   ICONO
========================================================= */

.cart-added-icon {

    font-size: 48px;

    color: #8d4f73;

    margin-bottom: 8px;

}


.cart-added-content h2 {

    margin: 5px 0 8px;

    color: #61234a;

    font-family: "Poppins", sans-serif;

}


.cart-added-message {

    margin-bottom: 22px;

    color: #666;

}


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

.cart-added-product {

    display: flex;

    align-items: center;

    gap: 18px;

    text-align: left;

    background: #faf6f8;

    border-radius: 16px;

    padding: 14px;

    margin-bottom: 24px;

}


.cart-added-product img {

    width: 90px;

    height: 90px;

    object-fit: cover;

    border-radius: 12px;

}


.cart-added-product-info {

    flex: 1;

}


.cart-added-product-info h3 {

    margin: 0 0 8px;

    color: #61234a;

    font-size: 1rem;

}


.cart-added-product-info p {

    margin: 0;

    font-weight: 700;

    color: #8d4f73;

}


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

.cart-added-buttons {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.cart-btn-continue,
.cart-btn-view {

    width: 100%;

    min-height: 48px;

    border-radius: 12px;

    font-family: "Poppins", sans-serif;

    font-weight: 600;

    font-size: 0.95rem;

    cursor: pointer;

    text-decoration: none;

    display: flex;

    align-items: center;

    justify-content: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.cart-btn-continue {

    border: 2px solid #8d4f73;

    background: white;

    color: #8d4f73;

}


.cart-btn-view {

    border: 2px solid #8d4f73;

    background: #8d4f73;

    color: white;

}


.cart-btn-continue:hover,
.cart-btn-view:hover {

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(
            97,
            35,
            74,
            0.18
        );

}


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

@media (max-width: 480px) {

    .cart-added-content {

        padding: 28px 20px;

    }


    .cart-added-product img {

        width: 75px;

        height: 75px;

    }


    .cart-added-content h2 {

        font-size: 1.25rem;

    }

}

/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .subcategory-page {
        padding-left: 4%;
        padding-right: 4%;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }

    .subcategory-header h1 {
        font-size: 36px;
    }

}


/* =========================================================
   RESPONSIVE - CELULAR
   ========================================================= */

@media (max-width: 650px) {

    .subcategory-page {
        padding: 0 20px 50px;
    }


    .subcategory-header {
        padding: 25px 5px 25px;
    }


    .subcategory-header h1 {
        font-size: 31px;
    }


    .subcategory-header p {
        font-size: 15px;
    }


    .products-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }


    .product-card-image {
        height: 280px;
    }


    .product-card-info {
        padding: 20px;
    }


    .product-card-info h2 {
        font-size: 21px;
    }


    .product-price {
        font-size: 20px;
    }

}


/* =========================================================
   CELULARES MUY PEQUEÑOS
   ========================================================= */

@media (max-width: 400px) {

    .subcategory-page {
        padding-left: 15px;
        padding-right: 15px;
    }


    .subcategory-header h1 {
        font-size: 28px;
    }


    .product-card-image {
        height: 250px;
    }

}