/*
   Categorías de producto Revelado24
   Ubicación recomendada: /wp-content/themes/revelado24-theme/assets/css/categoria.css
*/

/* =========================
   PÁGINA CATEGORÍA PRODUCTO
========================= */

body.tax-product_cat,
body.post-type-archive-product {
    background: #f6f6f6;
}

body.tax-product_cat .site-main,
body.post-type-archive-product .site-main,
body.tax-product_cat .content-area,
body.post-type-archive-product .content-area,
body.tax-product_cat #primary,
body.post-type-archive-product #primary {
    width: 100% !important;
    max-width: 100% !important;
}

body.tax-product_cat .storefront-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.post-type-archive-product .storefront-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb {
    display: none !important;
}

/* Contenedor general */
body.tax-product_cat .site-main,
body.post-type-archive-product .site-main {
    max-width: 1180px !important;
    margin: 42px auto 70px !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

/* Título de categoría / tienda */
body.tax-product_cat .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header {
    margin: 0 0 24px !important;
    padding: 30px 28px !important;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
    text-align: center;
}

body.tax-product_cat .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .page-title,
body.post-type-archive-product .page-title {
    margin: 0 !important;
    color: #303030;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.4px;
}

/* Ocultar descripción si WooCommerce la pinta arriba por defecto */
body.tax-product_cat .woocommerce-products-header .term-description,
body.post-type-archive-product .woocommerce-products-header .page-description {
    display: none !important;
}

/* Resultado / ordenación */
body.tax-product_cat .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering,
body.post-type-archive-product .woocommerce-ordering {
    margin: 0 0 22px !important;
}

body.tax-product_cat .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count {
    color: #666666;
    font-size: 14px;
    line-height: 42px;
}

body.tax-product_cat .woocommerce-ordering select,
body.post-type-archive-product .woocommerce-ordering select {
    height: 42px;
    min-height: 42px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
    color: #303030;
    padding: 0 36px 0 13px;
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   LISTADO PRODUCTOS ARRIBA
========================= */

body.tax-product_cat ul.products,
body.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px !important;
    margin: 0 0 34px !important;
    padding: 0 !important;
}

body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
    display: none !important;
    content: none !important;
}

body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 16px 16px 20px !important;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
    text-align: center;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    box-sizing: border-box;
}

body.tax-product_cat ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
    transform: translateY(-3px);
    border-color: #e7cf83;
    box-shadow: 0 14px 32px rgba(0,0,0,.09);
}

body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    color: inherit !important;
}

body.tax-product_cat ul.products li.product img,
body.post-type-archive-product ul.products li.product img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 0 16px !important;
    border-radius: 14px;
    background: #f2f2f2;
}

body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product h2,
body.post-type-archive-product ul.products li.product h2 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #303030;
    font-size: 17px !important;
    line-height: 1.3;
    font-weight: 800;
}

body.tax-product_cat ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
    display: block;
    margin: 0 0 14px !important;
    color: #c9a227 !important;
    font-size: 18px !important;
    line-height: 1.2;
    font-weight: 800;
}

body.tax-product_cat ul.products li.product .price del,
body.post-type-archive-product ul.products li.product .price del {
    color: #999999 !important;
    font-size: 14px;
    opacity: .75;
}

body.tax-product_cat ul.products li.product .price ins,
body.post-type-archive-product ul.products li.product .price ins {
    color: #c9a227 !important;
    text-decoration: none !important;
}

/* Botones de producto */
body.tax-product_cat ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product a.button,
body.post-type-archive-product ul.products li.product a.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 43px;
    width: 100%;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 2px solid #d8bd69 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #222222 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
    letter-spacing: .25px;
    transition: all .22s ease !important;
}

body.tax-product_cat ul.products li.product .button:hover,
body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product a.button:hover,
body.post-type-archive-product ul.products li.product a.button:hover {
    background: #e7cf83 !important;
    border-color: #d8bd69 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(216,189,105,.35) !important;
}

/* Eliminar valoraciones si aparecen y rompen la tarjeta */
body.tax-product_cat ul.products li.product .star-rating,
body.post-type-archive-product ul.products li.product .star-rating {
    display: none !important;
}

/* =========================
   RESUMEN / DESCRIPCIÓN ABAJO
========================= */

body.tax-product_cat .term-description,
body.post-type-archive-product .page-description {
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    float: none !important;
    margin: 8px 0 0 !important;
    padding: 34px !important;
    background: #eeeeee;
    border-radius: 18px;
    color: #444444;
    font-size: 15px;
    line-height: 1.75;
    box-sizing: border-box;
}

body.tax-product_cat .term-description h1,
body.tax-product_cat .term-description h2,
body.tax-product_cat .term-description h3,
body.post-type-archive-product .page-description h1,
body.post-type-archive-product .page-description h2,
body.post-type-archive-product .page-description h3 {
    margin: 0 0 18px !important;
    color: #303030;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    text-align: center;
}

body.tax-product_cat .term-description p,
body.post-type-archive-product .page-description p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body.tax-product_cat .term-description p:last-child,
body.tax-product_cat .term-description ul:last-child,
body.tax-product_cat .term-description ol:last-child,
body.post-type-archive-product .page-description p:last-child,
body.post-type-archive-product .page-description ul:last-child,
body.post-type-archive-product .page-description ol:last-child {
    margin-bottom: 0 !important;
}

body.tax-product_cat .term-description ul,
body.tax-product_cat .term-description ol,
body.post-type-archive-product .page-description ul,
body.post-type-archive-product .page-description ol {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 22px;
}

body.tax-product_cat .term-description li,
body.post-type-archive-product .page-description li {
    margin-bottom: 8px;
}

/* Paginación */
body.tax-product_cat .woocommerce-pagination,
body.post-type-archive-product .woocommerce-pagination {
    margin: 8px 0 28px !important;
    text-align: center;
}

body.tax-product_cat .woocommerce-pagination ul.page-numbers,
body.post-type-archive-product .woocommerce-pagination ul.page-numbers {
    border: none !important;
    display: inline-flex;
    gap: 8px;
    margin: 0 !important;
}

body.tax-product_cat .woocommerce-pagination ul.page-numbers li,
body.post-type-archive-product .woocommerce-pagination ul.page-numbers li {
    border: none !important;
}

body.tax-product_cat .woocommerce-pagination .page-numbers,
body.post-type-archive-product .woocommerce-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffffff !important;
    color: #303030 !important;
    font-weight: 700;
}

body.tax-product_cat .woocommerce-pagination .page-numbers.current,
body.post-type-archive-product .woocommerce-pagination .page-numbers.current,
body.tax-product_cat .woocommerce-pagination .page-numbers:hover,
body.post-type-archive-product .woocommerce-pagination .page-numbers:hover {
    background: #e7cf83 !important;
    color: #ffffff !important;
}

/* =========================
   RESPONSIVE CATEGORÍA
========================= */

@media (max-width: 980px) {
    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px !important;
    }
}

@media (max-width: 768px) {
    body.tax-product_cat .site-main,
    body.post-type-archive-product .site-main {
        margin: 24px auto 45px !important;
        padding: 0 14px !important;
    }

    body.tax-product_cat .woocommerce-products-header,
    body.post-type-archive-product .woocommerce-products-header {
        padding: 24px 20px !important;
        border-radius: 15px;
    }

    body.tax-product_cat .woocommerce-products-header__title,
    body.post-type-archive-product .woocommerce-products-header__title,
    body.tax-product_cat .page-title,
    body.post-type-archive-product .page-title {
        font-size: 28px;
    }

    body.tax-product_cat .woocommerce-result-count,
    body.post-type-archive-product .woocommerce-result-count,
    body.tax-product_cat .woocommerce-ordering,
    body.post-type-archive-product .woocommerce-ordering {
        float: none !important;
        width: 100% !important;
        text-align: center;
        margin-bottom: 12px !important;
    }

    body.tax-product_cat .woocommerce-result-count,
    body.post-type-archive-product .woocommerce-result-count {
        line-height: 1.4;
    }

    body.tax-product_cat .woocommerce-ordering select,
    body.post-type-archive-product .woocommerce-ordering select {
        width: 100%;
        max-width: 360px;
    }

    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px !important;
    }

    body.tax-product_cat ul.products li.product,
    body.post-type-archive-product ul.products li.product {
        padding: 12px 12px 15px !important;
        border-radius: 15px;
    }

    body.tax-product_cat ul.products li.product img,
    body.post-type-archive-product ul.products li.product img {
        border-radius: 12px;
        margin-bottom: 12px !important;
    }

    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_cat ul.products li.product h2,
    body.post-type-archive-product ul.products li.product h2 {
        font-size: 14px !important;
    }

    body.tax-product_cat ul.products li.product .price,
    body.post-type-archive-product ul.products li.product .price {
        font-size: 15px !important;
    }

    body.tax-product_cat ul.products li.product .button,
    body.post-type-archive-product ul.products li.product .button,
    body.tax-product_cat ul.products li.product a.button,
    body.post-type-archive-product ul.products li.product a.button {
        min-height: 40px;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    body.tax-product_cat .term-description,
    body.post-type-archive-product .page-description {
        padding: 26px 20px !important;
        border-radius: 15px;
    }

    body.tax-product_cat .term-description h1,
    body.tax-product_cat .term-description h2,
    body.tax-product_cat .term-description h3,
    body.post-type-archive-product .page-description h1,
    body.post-type-archive-product .page-description h2,
    body.post-type-archive-product .page-description h3 {
        font-size: 24px;
    }
}

@media (max-width: 520px) {
    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: 1fr;
    }
}
/* =====================================================
   OCULTAR ORDENACIÓN Y CONTADOR EN CATEGORÍAS
===================================================== */

body.archive.woocommerce .woocommerce-ordering,
body.archive.woocommerce .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_cat .woocommerce-result-count,
body.post-type-archive-product .woocommerce-ordering,
body.post-type-archive-product .woocommerce-result-count {
    display: none !important;
}