/* ==========================================================================
   WooCommerce Shop / Catalog / Archive Styles (Papelarte)
   v2.0.0 - Clean Native Architecture (Zero Elementor Bloat)
   ========================================================================== */

/* Variables de tema para catálogo y tarjetas */
:root {
    --pa-red: #bc3838;
    --pa-red-dark: #8c262b;
    --pa-red-deep: #69191e;
    --pa-blue: #98d3e3;
    --pa-ink: #25282c;
    --pa-muted: #59636a;
    --pa-line: #e2e6e8;
    --ppa-red-btn: #9E2A2A;
    --ppa-red-dark: #7E1212;
}

body.woocommerce.archive,
body.woocommerce-page.archive {
    background-color: #F7F8FA;
}

/* ==========================================================================
   1. GRILLA DE PRODUCTOS RESPONSIVA
   ========================================================================== */

.woocommerce ul.products,
.woocommerce-page ul.products,
.woocommerce ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 22px !important;
    margin: 0 0 32px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Neutralizar pseudoelementos ::before/::after y floats de WooCommerce */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
.woocommerce ul.products.columns-4::before,
.woocommerce ul.products.columns-4::after {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products li.product.first,
.woocommerce ul.products li.product.last,
.woocommerce-page ul.products li.product.first,
.woocommerce-page ul.products li.product.last {
    clear: none !important;
    float: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.woocommerce ul.products .clear,
.woocommerce-page ul.products .clear {
    display: none !important;
}

/* Breakpoints de Grilla */
@media (min-width: 1041px) and (max-width: 1399px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (min-width: 768px) and (max-width: 1040px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }
}

@media (max-width: 767px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-bottom: 24px !important;
    }
}

@media (max-width: 380px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products.columns-4 {
        gap: 6px !important;
    }
}

/* ==========================================================================
   2. TARJETA DE PRODUCTO UNIFICADA (.pa-product-card)
   ========================================================================== */

.woocommerce ul.products li.product.pa-product-card,
.woocommerce-page ul.products li.product.pa-product-card,
.pa-product-card {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    text-align: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    border: 1px solid var(--pa-line, #e2e6e8) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    position: relative !important;
    transform: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.woocommerce ul.products li.product.pa-product-card:hover,
.woocommerce-page ul.products li.product.pa-product-card:hover,
.pa-product-card:hover {
    border-color: #c9d4d8 !important;
    box-shadow: 0 7px 18px rgba(33, 53, 61, 0.08) !important;
    transform: none !important;
}

/* Badge de Oferta */
.pa-product-card__badge,
.woocommerce ul.products li.product.pa-product-card span.onsale {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    border-radius: 4px !important;
    background: var(--pa-red, #bc3838) !important;
    color: #FFFFFF !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    box-shadow: none !important;
    z-index: 5 !important;
}

/* ==========================================================================
   3. IMAGEN DEL PRODUCTO (Aspect Ratio 1:1)
   ========================================================================== */

.pa-product-card__media,
.woocommerce ul.products li.product.pa-product-card a.woocommerce-LoopProduct-link {
    position: relative !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    border-bottom: 1px solid #edf0f2 !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.pa-product-card__media img,
.woocommerce ul.products li.product.pa-product-card a.woocommerce-LoopProduct-link img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.woocommerce ul.products li.product.pa-product-card a.woocommerce-LoopProduct-link::after {
    display: none !important;
}

/* ==========================================================================
   4. CUERPO DE LA TARJETA (Body, SKU, Titulo, Precio)
   ========================================================================== */

.pa-product-card__body {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    padding: clamp(9px, 1vw, 12px) !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* SKU */
.pa-product-card__sku,
.product-sku-badge {
    margin: 0 auto 5px !important;
    color: var(--pa-muted, #59636a) !important;
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
    letter-spacing: 0.3px !important;
}

/* Titulo con line-clamp 2 */
.pa-product-card__title,
.woocommerce ul.products li.product.pa-product-card .woocommerce-loop-product__title {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 auto 9px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.28 !important;
    text-align: center !important;
    color: var(--pa-ink, #25282c) !important;
    min-height: auto !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.pa-product-card__title a,
.woocommerce ul.products li.product.pa-product-card .woocommerce-loop-product__title a {
    color: var(--pa-ink, #25282c) !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.pa-product-card__title a:hover,
.woocommerce ul.products li.product.pa-product-card .woocommerce-loop-product__title a:hover {
    color: var(--pa-red, #bc3838) !important;
}

/* Precio */
.pa-product-card__price,
.woocommerce ul.products li.product.pa-product-card .price {
    color: var(--pa-red, #bc3838) !important;
    font-size: 19px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    margin: auto auto 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    width: 100% !important;
}

.pa-product-card__price del,
.woocommerce ul.products li.product.pa-product-card .price del {
    color: #9aa2a8 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    margin-right: 4px !important;
}

.pa-product-card__price ins,
.woocommerce ul.products li.product.pa-product-card .price ins {
    text-decoration: none !important;
    color: var(--pa-red, #bc3838) !important;
    font-weight: 850 !important;
}

.pa-product-card__price .woocommerce-Price-currencySymbol,
.woocommerce ul.products li.product.pa-product-card .price .woocommerce-Price-currencySymbol {
    font-size: inherit !important;
    font-weight: inherit !important;
    vertical-align: baseline !important;
    opacity: 1 !important;
    line-height: inherit !important;
}

/* Leyenda Precio Unitario / sin IVA */
.pa-product-card__tax,
.precio-unitario {
    margin: 3px auto 0 !important;
    color: #7c878f !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    width: 100% !important;
}

/* ==========================================================================
   5. FILA DE COMPRA (STEPPER + BOTON AGREGAR)
   ========================================================================== */

.pa-product-card .pa-product-card__buy.cart.papelarte-shop-qty-form,
.woocommerce ul.products li.product.pa-product-card form.cart {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    display: grid !important;
    grid-template-columns: 86px minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 7px !important;
    margin: 11px 0 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.pa-product-card .pa-product-card__buy::before,
.pa-product-card .pa-product-card__buy::after,
.woocommerce ul.products li.product.pa-product-card form.cart::before,
.woocommerce ul.products li.product.pa-product-card form.cart::after {
    content: none !important;
    display: none !important;
}

/* Stepper [-] [ 1 ] [+] */
.pa-product-card .pa-product-card__buy .pa-qty,
.woocommerce ul.products li.product.pa-product-card .quantity.papelarte-stepper-wrap {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 38px !important;
    margin: 0 !important;
    flex: none !important;
    display: grid !important;
    grid-template-columns: 27px minmax(24px, 1fr) 27px !important;
    border: 1px solid #d7dde0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.pa-product-card .pa-product-card__buy .pa-qty__button,
.woocommerce ul.products li.product.pa-product-card .papelarte-stepper-btn {
    width: 27px !important;
    height: 36px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--ppa-red-btn, #9E2A2A) !important;
    color: #FFFFFF !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color 0.15s ease !important;
}

.pa-product-card .pa-product-card__buy .pa-qty__button:hover,
.woocommerce ul.products li.product.pa-product-card .papelarte-stepper-btn:hover {
    background: var(--ppa-red-dark, #7E1212) !important;
    color: #FFFFFF !important;
}

.pa-product-card .pa-product-card__buy .pa-qty__input,
.woocommerce ul.products li.product.pa-product-card .quantity input.qty {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    text-align: center !important;
    line-height: 36px !important;
    color: #25282c !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    -moz-appearance: textfield !important;
    box-shadow: none !important;
}

.pa-product-card .pa-product-card__buy .pa-qty__input::-webkit-outer-spin-button,
.pa-product-card .pa-product-card__buy .pa-qty__input::-webkit-inner-spin-button,
.woocommerce ul.products li.product.pa-product-card .quantity input.qty::-webkit-outer-spin-button,
.woocommerce ul.products li.product.pa-product-card .quantity input.qty::-webkit-inner-spin-button {
    margin: 0 !important;
    -webkit-appearance: none !important;
}

/* Boton "Agregar" */
.pa-product-card .pa-product-card__buy button.pa-product-card__add.button.add_to_cart_button,
.woocommerce ul.products li.product.pa-product-card form.cart button.add_to_cart_button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    white-space: nowrap !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--pa-red, #bc3838) !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.pa-product-card .pa-product-card__buy button.pa-product-card__add.button.add_to_cart_button:hover,
.woocommerce ul.products li.product.pa-product-card form.cart button.add_to_cart_button:hover {
    background: var(--pa-red-dark, #8c262b) !important;
}

/* Boton para productos variables o sin stock */
.pa-product-card a.pa-product-card__add,
.pa-product-card .pa-product-card__add--full,
.woocommerce ul.products li.product.pa-product-card > a.button {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 11px 0 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--pa-red, #bc3838) !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.pa-product-card a.pa-product-card__add:hover,
.pa-product-card .pa-product-card__add--full:hover,
.woocommerce ul.products li.product.pa-product-card > a.button:hover {
    background: var(--pa-red-dark, #8c262b) !important;
}

/* Responsive tarjetas móvil */
@media (max-width: 820px) {
    .pa-product-card .pa-product-card__buy.cart.papelarte-shop-qty-form,
    .woocommerce ul.products li.product.pa-product-card form.cart {
        height: 38px !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .pa-product-card .pa-product-card__buy .pa-qty,
    .woocommerce ul.products li.product.pa-product-card .quantity.papelarte-stepper-wrap {
        display: none !important;
    }

    .pa-product-card__body {
        padding: clamp(8px, 2vw, 10px) !important;
    }

    .pa-product-card__title,
    .woocommerce ul.products li.product.pa-product-card .woocommerce-loop-product__title {
        font-size: 12px !important;
    }

    .pa-product-card__price,
    .woocommerce ul.products li.product.pa-product-card .price {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   6. BARRA HORIZONTAL DE CATEGORIAS MOVIL (CHIPS)
   ========================================================================== */

.papelarte-mobile-cat-chips {
    display: none;
}

@media (max-width: 900px) {
    .papelarte-mobile-cat-chips {
        display: flex !important;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 4px 4px 14px 4px;
        margin: 0 0 14px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .papelarte-mobile-cat-chips::-webkit-scrollbar {
        display: none;
    }

    .papelarte-cat-chip {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        border-radius: 20px;
        background: #FFFFFF;
        border: 1.5px solid #E2E8F0;
        color: #334155;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        flex-shrink: 0;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .papelarte-cat-chip:hover {
        border-color: #BC3838;
        color: #BC3838;
        background: #FFF5F5;
    }

    .papelarte-cat-chip.active-chip {
        background: #BC3838;
        color: #FFFFFF;
        border-color: #BC3838;
        box-shadow: 0 3px 10px rgba(188, 56, 56, 0.28);
        font-weight: 700;
    }
}

/* ==========================================================================
   7. CONTADOR, ORDENAMIENTO Y PAGINACION
   ========================================================================== */

.woocommerce .woocommerce-result-count,
.woocommerce-page .woocommerce-result-count,
p.woocommerce-result-count {
    float: none;
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 10px;
    line-height: 1.4;
}

.woocommerce .woocommerce-result-count::after,
.woocommerce-page .woocommerce-result-count::after {
    display: none !important;
}

.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering,
form.woocommerce-ordering {
    float: none;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
}

.woocommerce .woocommerce-ordering select.orderby,
.woocommerce-page .woocommerce-ordering select.orderby,
form.woocommerce-ordering select.orderby {
    display: block;
    width: 100%;
    max-width: 260px;
    margin-left: auto;
    margin-right: 0;
    height: 40px;
    padding: 0 36px 0 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #1E293B;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.woocommerce .woocommerce-ordering select.orderby:focus,
.woocommerce-page .woocommerce-ordering select.orderby:focus {
    outline: none;
    border-color: #BC3838;
    box-shadow: 0 0 0 3px rgba(188, 56, 56, 0.12);
}

/* Paginacion */
.woocommerce nav.woocommerce-pagination,
.woocommerce-page nav.woocommerce-pagination {
    margin: 36px 0 20px;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul,
.woocommerce-page nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
    border: none;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li {
    border: none;
    margin: 0;
    padding: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li .page-numbers:hover {
    background: #FFF5F5;
    border-color: #FCA5A5;
    color: #BC3838;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li .page-numbers.current {
    background: #BC3838;
    border-color: #BC3838;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(188, 56, 56, 0.3);
}

/* ==========================================================================
   8. PRODUCTO INDIVIDUAL — STEPPER & CONTROLES
   ========================================================================== */

.single-product .quantity,
.woocommerce.single-product .quantity,
.woocommerce-page .single-product .quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1.5px solid #E2E8F0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    height: 44px !important;
    width: auto !important;
}

.woocommerce .single-product .quantity:focus-within,
.woocommerce-page .single-product .quantity:focus-within {
    border-color: #BC3838 !important;
    box-shadow: 0 0 0 3px rgba(188, 56, 56, 0.12) !important;
}

.single-product .summary form.cart .quantity input.qty,
.single-product div.product > form.cart .quantity input.qty {
    order: 2 !important;
    width: 52px !important;
    min-width: 0 !important;
    height: 100% !important;
    border: none !important;
    border-left: 1px solid #E2E8F0 !important;
    border-right: 1px solid #E2E8F0 !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1E293B !important;
    padding: 0 6px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -moz-appearance: textfield !important;
}

.single-product .summary form.cart .quantity input.qty::-webkit-outer-spin-button,
.single-product .summary form.cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.single-product .summary form.cart .papelarte-stepper-btn,
.single-product div.product > form.cart .papelarte-stepper-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #64748B !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.single-product .summary form.cart .papelarte-stepper-minus,
.single-product div.product > form.cart .papelarte-stepper-minus { order: 1 !important; }
.single-product .summary form.cart .papelarte-stepper-plus,
.single-product div.product > form.cart .papelarte-stepper-plus  { order: 3 !important; }

.single-product .summary form.cart .papelarte-stepper-btn:hover,
.single-product div.product > form.cart .papelarte-stepper-btn:hover {
    background: #FFF5F5 !important;
    color: #BC3838 !important;
}

/* ==========================================================================
   9. PRODUCTOS RELACIONADOS
   ========================================================================== */

section.related.products,
.woocommerce .related.products,
.woocommerce-page .related.products {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: block !important;
    clear: both !important;
    box-sizing: border-box !important;
    margin-top: 40px !important;
}

section.related.products ul.products,
.woocommerce .related.products ul.products,
.woocommerce-page .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 40px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
}

@media (max-width: 1100px) {
    section.related.products ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 767px) {
    section.related.products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}

/* ==========================================================================
   10. ESTRUCTURA Y LAYOUT NATIVO DE TIENDA (.ppa-shop-layout)
   ========================================================================== */

.ppa-shop-container {
    max-width: var(--ppa-container-max, 1280px);
    margin: 0 auto;
    padding: 24px 20px 60px;
    box-sizing: border-box;
}

.ppa-shop-header-wrap {
    margin-bottom: 24px;
}

.ppa-shop-header-wrap .woocommerce-breadcrumb {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 12px;
}

.ppa-shop-header-wrap .woocommerce-breadcrumb a {
    color: #64748B;
    text-decoration: none;
}

.ppa-shop-header-wrap .woocommerce-breadcrumb a:hover {
    color: #BC3838;
}

.ppa-shop-title {
    font-size: 32px;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
    line-height: 1.2;
}

.ppa-shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: flex-start;
}

.ppa-shop-sidebar {
    position: sticky;
    top: 24px;
    width: 100%;
}

.ppa-shop-content {
    min-width: 0;
    width: 100%;
}

.ppa-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.ppa-shop-toolbar .woocommerce-result-count {
    font-size: 14px;
    color: #64748B;
    margin: 0;
    float: none;
}

.ppa-shop-toolbar .woocommerce-ordering {
    margin: 0;
    float: none;
}

@media (max-width: 900px) {
    .ppa-shop-layout {
        display: block;
    }
    .ppa-shop-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    .ppa-shop-title {
        font-size: 26px;
    }
    .ppa-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
