/**
 * Card Demo — Diseño de tarjeta para ymk-woo-extra
 *
 * shop-archive-style.css
 * Layout y estilos del archive de tienda WooCommerce.
 *
 * Índice:
 *   1. Header (li.product)
 *   2. Filtros modal openner
 *   3. Grid (ul.products)
 *   4. WC pagination
 *   5. WC notices
 *   6. 
 *   7. 
 *   8. 
 */


.tw-header-bg.woocommerce .site-content {
    padding-top: calc(var(--global--spacing-vertical) * 1);
}

.woocommerce .content-area .site-main {
padding:0
}

/* ── 1. Header ──────────────────────────────────────────────────────── */
body.archive nav.woocommerce-breadcrumb {
    display: none
}

.site-main .woocommerce-products-header
 {
    border:0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding-bottom: var(--global--spacing-vertical);
}

button.material-icons, .material-icons::before, .material-icons::after {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

body.archive a.back-to-prev-cat:before, body.archive a.back-to-shop:before {
    content: "\e5c4";
    font-size: 17px;
    font-weight: 600;
}

body.archive h1.woocommerce-products-header__title.page-title,
body.archive a.back-to-prev-cat
{
    display: flex;
    align-items: center;
    gap: 0.1rem;
    font-size: var(--global--font-size-sm);
    color: var(--global--color-primary);
    text-align: left;
    
}

body.archive a.back-to-shop,
body.archive a.back-to-prev-cat{
    font-size:0 !important;
    text-decoration:none
}

body.archive a.back-to-prev-cat,
body.archive a.back-to-shop {
color: var(--wp--preset--color--buttonback);
}

body.archive a.back-to-prev-cat:before,
body.archive a.back-to-shop:before{
    content: "\e5c4";
    font-size: 15px;
    font-weight: 600;
}

header.woocommerce-products-header .term-description {
    margin-top: var(--global--spacing-vertical)
}

header.woocommerce-products-header .term-description p {
    /* margin-bottom: 0.5rem; */
    font-weight: var(--heading--font-weight-page-title);
    overflow-wrap: break-word;
    font-size: var(--heading--font-size-h1);
    letter-spacing: var(--heading--letter-spacing-h1);
    line-height: 1 !important;
    clear: both;
    font-family: var(--heading--font-family);
    max-width: var(--responsive--alignwide-width);
}

.wp-block-buttons.subcategories {
    margin-top: calc(0 * var(--global--spacing-vertical));
    margin-bottom: calc(1 * var(--global--spacing-vertical));
}

.subcategories .active a {
    background-color: var(--wp--preset--color--buttonacti) !important;
    border-color: var(--wp--preset--color--buttonacti) !important;
    color: var(--wp--preset--color--buttonacti) !important;
}


@media (min-width: 769px) {
    div#carga {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: var(--responsive--alignwide-width);
        display: flex;
        align-items: flex-start;
        gap: var(--global--spacing-vertical) var(--global--spacing-horizontal);
        margin: 0 auto;
        width: 100%;
        max-width: var(--responsive--alignwide-width);
        /* max-width: none; */
        /* padding-left: var(--responsive--alignfull-padding); */
        /* padding-right: var(--responsive--alignfull-padding); */
        margin-bottom: 2rem;
        /* margin-top: 2rem; */
        /* padding-top: calc(var(--global--spacing-vertical) * 1); */
        flex-wrap: wrap;
    }


    .tw-header-full div#carga {
        max-width: var(--responsive--alignwide-full);
    }
    
}
/* ── 2. Filtros ──────────────────────────────────────────────────────── */

/* ── 3. Grid de productos ─────────────────────────────────────────────── */

ul.products.ymk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--global--spacing-vertical) var(--global--spacing-horizontal);
    position: relative;
}

ul.products.ymk-grid::before,
ul.products.ymk-grid::after {
    display: none;
}

.woocommerce ul.products.ymk-grid[class*="columns-"] li.product {
    width: auto !important;
    margin: 0 !important;
}

/* ── Breakpoints con límite de columnas (ymk-grid-max-N en body) ─────────────── */
/*
 * Cada breakpoint solo se activa si el máximo configurado >= ese número de cols.
 * ymk-grid-max-1 → máximo 1 col (sin breakpoints extra)
 * ymk-grid-max-2 → máximo 2 cols
 * ...
 * ymk-grid-max-6 → máximo 6 cols (sin límite efectivo)
 */

/* 3 columnas — mínimo 769px — activo desde max >= 3 */
@media (min-width: 769px) {
    body:is(.ymk-grid-max-3, .ymk-grid-max-4, .ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 4 columnas — mínimo 1025px — activo desde max >= 4 */
@media (min-width: 1025px) {
    body:is(.ymk-grid-max-4, .ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 5 columnas — mínimo 1441px — activo desde max >= 5 */
@media (min-width: 1441px) {
    body:is(.ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 6 columnas — mínimo 1921px — activo solo con max == 6 */
@media (min-width: 1921px) {
    body.ymk-grid-max-6 ul.products.ymk-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ── Modo side: sidebar abierto → -1 columna en el grid ──────────────────── */

@media (min-width: 769px) {
    body.ymk-sidebar-open:is(.ymk-grid-max-3, .ymk-grid-max-4, .ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    body.ymk-sidebar-open:is(.ymk-grid-max-4, .ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1441px) {
    body.ymk-sidebar-open:is(.ymk-grid-max-5, .ymk-grid-max-6) ul.products.ymk-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1921px) {
    body.ymk-sidebar-open.ymk-grid-max-6 ul.products.ymk-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* v2 */

/* ── Card con patrón: cover ocupa el ancho completo del li ─────────────────── */

ul.products.ymk-grid li.product > .wp-block-cover {
    width: 100%;
}

/* ── 4. Paginación ──────────────────────────────────────────────────────────── */

/* Ocultar paginación numérica en modos infinite y loadmore */
body:is(.ymk-pagination-infinite, .ymk-pagination-loadmore) nav.woocommerce-pagination {
    display: none;
}

/* Loader de puntos */
.page-load-status {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.page-load-status .infinite-scroll-request[style="display: block;"] ~ .ymk-loadmore-button {
    display: none;
}

.infinite-scroll-request {
    display: flex;
    justify-content: center;
}

.loader-ellips {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.loader-ellips__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: ymk-ellips 1s infinite ease-in-out both;
}

.loader-ellips__dot:nth-child(1) { animation-delay: -0.32s; }
.loader-ellips__dot:nth-child(2) { animation-delay: -0.16s; }
.loader-ellips__dot:nth-child(3) { animation-delay:      0s; }
.loader-ellips__dot:nth-child(4) { animation-delay:  0.16s; }

@keyframes ymk-ellips {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40%           { transform: scale(1); opacity: 1;   }
}


/* ── 5. Info notice ─────────────────────────────────────────────────────────── */

p.woocommerce-info {
    width: 100%;
}

/* ── 6. Vista agrupada por categorías ───────────────────────────────────────── */

.ymk-grouped-cat-header {
    margin: 2rem 0 0.75rem;
}

.ymk-grouped-cat-top {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.ymk-grouped-cat-title {
    margin: 0;
    flex: 1;
}

.ymk-grouped-cat-title a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
}

span.ymk-grouped-cat-icon {
    width: 28px;
    height: 28px;
    background: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

.ymk-grouped-cat-title a:hover {
    opacity: 0.7;
}

mark.count,
.ymk-grouped-cat-link {
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ymk-grouped-cat-link:hover {
    opacity: 1;
}

.ymk-grouped-cat-desc {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    opacity: 0.65;
}

mark.count::after {
    content: "Articulos";
}

.icon a::before {
    content: "\ea77";
    content: "\e87c";
}

.icon a::before {
    font-family: 'Material Icons Outlined';
    font-size: 24px;
    position: inherit;
    line-height: normal;
}
