/* ============================================================
   CCM Product Grid
   SSR-first grid para reutilizar la card existente de producto
   ============================================================ */

.ccmg-product-grid {
    --ccmg-grid-gap: 24px;
    --ccmg-grid-columns-desktop: 4;
    --ccmg-grid-columns-tablet: 3;
    --ccmg-grid-columns-mobile: 2;
    --ccmg-grid-measured-height: auto;
    --ccmg-grid-meta-color: rgba(25, 24, 24, 0.72);
    --ccmg-grid-border: rgba(25, 24, 24, 0.12);
    --ccmg-grid-surface-bg: #ffffff;
    --ccmg-grid-surface-muted: rgba(25, 24, 24, 0.04);
    --ccmg-grid-surface-border: rgba(25, 24, 24, 0.08);
    --ccmg-grid-button-bg: #191818;
    --ccmg-grid-button-color: #ffffff;
    --ccmg-grid-button-bg-hover: #000000;
    --ccmg-grid-control-bg: #ffffff;
    --ccmg-grid-control-bg-hover: #f6f6f6;
    --ccmg-grid-control-color: #191818;
    --ccmg-grid-focus-outline: #191818;
    --ccmg-grid-focus-ring: rgba(25, 24, 24, 0.14);
    --ccmg-grid-error-bg: rgba(180, 35, 24, 0.08);
    --ccmg-grid-error-border: rgba(180, 35, 24, 0.18);

    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: var(--ccmg-grid-measured-height, auto);
    color: #191818;
    position: relative;
    isolation: isolate;
}

.ccmg-product-grid,
.ccmg-product-grid * {
    box-sizing: border-box;
}

/*
 * Defensa para Elementor/mobile/iOS:
 * el grid puede crecer después del primer render por auto-fill, load more
 * o reflujo tardío. Permitimos que los wrappers externos acompañen ese alto
 * y dejamos que JS propague una min-height estabilizada.
 */
.elementor-widget-ccmg_product_grid,
.elementor-widget-ccmg_product_grid .elementor-widget-container,
.elementor-widget-ccmg_product_grid .ccmg-product-grid-host {
    display: block;
    height: auto !important;
    min-height: var(--ccmg-grid-measured-height, auto);
    overflow: visible;
}

.elementor-widget-ccmg_product_grid .ccmg-product-grid {
    height: auto;
    min-height: var(--ccmg-grid-measured-height, auto);
}

.ccmg-product-grid__meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 18px;
}

.ccmg-product-grid__title {
    margin: 0;
    color: #191818;
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(16px, 1.45vw, 24px);
    font-weight: 500;
    line-height: 0.96;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ccmg-product-grid__result-count {
    color: var(--ccmg-grid-meta-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.ccmg-product-grid__feedback {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 42px;
    max-width: min(100%, 560px);
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--ccmg-grid-surface-border);
    border-radius: 16px;
    background: var(--ccmg-grid-surface-muted);
    color: var(--ccmg-grid-meta-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.ccmg-product-grid__feedback[hidden] {
    display: none !important;
}

.ccmg-product-grid__feedback.is-error {
    color: #b42318;
    background: var(--ccmg-grid-error-bg);
    border-color: var(--ccmg-grid-error-border);
}

.ccmg-product-grid__feedback.is-loading {
    color: var(--ccmg-grid-meta-color);
}

.ccmg-product-grid__body {
    position: relative;
    min-width: 0;
}

.ccmg-product-grid ul.products.ccmg-product-grid__list {
    display: grid !important;
    grid-template-columns: repeat(var(--ccmg-grid-columns-mobile), minmax(0, 1fr));
    gap: var(--ccmg-grid-gap);
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ccmg-product-grid ul.products.ccmg-product-grid__list::before,
.ccmg-product-grid ul.products.ccmg-product-grid__list::after {
    display: none !important;
}

.ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    clear: none !important;
    list-style: none !important;
    position: relative;
}

.ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item::before,
.ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item::after {
    display: none !important;
    content: none !important;
}

.ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card {
    height: 100%;
    width: 100%;
    margin: 0;
    color: inherit;
    text-decoration: none;
}

.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__img-link,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__img-link {
    text-decoration: none;
}

.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__img,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__img {
    margin: 0;
    box-shadow: none;
    border: 0;
}

.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link,
.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link:hover,
.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link:focus,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link:hover,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__body-link:focus {
    color: inherit;
    text-decoration: none;
}

.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title {
    all: unset;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    padding: 0;
    font-family: var(--ccmg-card-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 14px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ccmg-card-title-color);
    max-height: 28px;
}

.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__price-current,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__price-current,
.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__price-regular,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__price-regular,
.woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__shipping,
.woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item .ccmg-card__shipping {
    text-transform: none;
    letter-spacing: 0;
}

.ccmg-product-grid__empty,
.ccmg-product-grid__end {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 42px;
    max-width: min(100%, 560px);
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--ccmg-grid-surface-border);
    border-radius: 16px;
    background: var(--ccmg-grid-surface-muted);
    color: var(--ccmg-grid-meta-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;
}

.ccmg-product-grid__footer .ccmg-product-grid__end {
    justify-content: center;
    text-align: center;
}

.ccmg-product-grid__footer .ccmg-product-grid__end:focus,
.ccmg-product-grid__footer .ccmg-product-grid__end:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ccmg-grid-focus-ring);
}

.ccmg-product-grid__footer {
    display: flex;
    justify-content: center;
    width: 100%;
}

.ccmg-product-grid__progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ccmg-product-grid__sentinel {
    width: 100%;
    height: 1px;
}

.ccmg-product-grid__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--ccmg-grid-surface-border);
    border-radius: 999px;
    background: var(--ccmg-grid-surface-muted);
    color: var(--ccmg-grid-meta-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.ccmg-product-grid__status[hidden],
.ccmg-product-grid__load-more[hidden] {
    display: none !important;
}

.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button,
.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:hover,
.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:focus,
.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:active,
.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:visited,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:hover,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:focus,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:active,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:visited {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: 1px solid var(--ccmg-grid-button-bg);
    border-radius: 999px;
    background: var(--ccmg-grid-button-bg);
    color: var(--ccmg-grid-button-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease,
        opacity 0.16s ease;
}

.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:hover,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:hover {
    background: var(--ccmg-grid-button-bg-hover);
    border-color: var(--ccmg-grid-button-bg-hover);
    color: var(--ccmg-grid-button-color);
}

.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button:focus-visible,
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ccmg-grid-focus-ring);
}

.woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button[aria-busy="true"],
.woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button[aria-busy="true"] {
    cursor: wait;
}

.ccmg-product-grid__load-more.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.ccmg-product-grid__footer--auto_load {
    min-height: 1px;
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    float: none;
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination::before,
.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination::after,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination::before,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination::after {
    display: none;
    content: none;
}

.ccmg-product-grid__pagination ul.page-numbers.ccmg-product-grid__page-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 0;
}

.ccmg-product-grid__pagination .ccmg-product-grid__page-item {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination .ccmg-product-grid__page-link,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination .ccmg-product-grid__page-link {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ccmg-grid-border);
    border-radius: 999px;
    background: var(--ccmg-grid-control-bg);
    color: var(--ccmg-grid-control-color);
    font-family: "Founder grotesk CCM", "Founders Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    float: none;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        opacity 0.16s ease;
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link {
    cursor: pointer;
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link:hover,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link:hover {
    background: var(--ccmg-grid-control-bg-hover);
    border-color: rgba(25, 24, 24, 0.2);
    color: var(--ccmg-grid-control-color);
}

.woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link:focus-visible,
.woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination a.ccmg-product-grid__page-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ccmg-grid-focus-ring);
}

.ccmg-product-grid__pagination .ccmg-product-grid__page-link--current {
    border-color: #191818;
    background: #191818;
    color: #ffffff;
}

.ccmg-product-grid[aria-busy="true"] .ccmg-product-grid__pagination a.ccmg-product-grid__page-link {
    pointer-events: none;
    opacity: 0.72;
}

.ccmg-product-grid--busy .ccmg-product-grid__footer {
    cursor: progress;
}

.ccmg-product-grid--complete .ccmg-product-grid__end {
    color: #191818;
}

.ccmg-product-grid--error .ccmg-product-grid__feedback {
    color: #b42318;
}

.ccmg-product-grid--empty .ccmg-product-grid__body {
    min-height: 0;
}

@container card (max-width: 130px) {
    .woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title,
    .woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title {
        font-size: 11px;
        line-height: 12px;
        max-height: 24px;
    }
}

@container card (min-width: 131px) and (max-width: 180px) {
    .woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title,
    .woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title {
        font-size: 12px;
        line-height: 13px;
        max-height: 26px;
    }
}

@media (min-width: 768px) {
    .ccmg-product-grid ul.products.ccmg-product-grid__list {
        grid-template-columns: repeat(var(--ccmg-grid-columns-tablet), minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .ccmg-product-grid ul.products.ccmg-product-grid__list {
        grid-template-columns: repeat(var(--ccmg-grid-columns-desktop), minmax(0, 1fr));
    }
}

@media (max-width: 599px) {
    .ccmg-product-grid {
        --ccmg-grid-gap: 18px;
    }

    .ccmg-product-grid__pagination ul.page-numbers.ccmg-product-grid__page-list {
        gap: 6px;
    }

    .woocommerce .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination .ccmg-product-grid__page-link,
    .woocommerce-page .ccmg-product-grid nav.woocommerce-pagination.ccmg-product-grid__pagination .ccmg-product-grid__page-link {
        min-width: 38px;
        min-height: 38px;
        padding: 0 12px;
    }

    .woocommerce .ccmg-product-grid a.ccmg-product-grid__load-more.button,
    .woocommerce-page .ccmg-product-grid a.ccmg-product-grid__load-more.button {
        min-height: 42px;
        padding: 11px 18px;
    }
}

@media (max-width: 479px) {
    .woocommerce .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title,
    .woocommerce-page .ccmg-product-grid ul.products.ccmg-product-grid__list li.product.ccmg-product-grid__item h3.ccmg-card__title {
        font-size: 13px;
        line-height: 14px;
        max-height: 26px;
    }
}

/* Elementor custom CSS in the archive template is styling all inputs as pills.
   Restore Woo Product Filter checkbox/radio styles with higher specificity. */
.elementor-kit-7 .wpfMainWrapper .wpfFilterWrapper input[type="checkbox"],
.elementor-kit-7 .wpfMainWrapper .wpfFilterWrapper input[type="radio"] {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin-right: 0.3rem !important;
    padding: 0 !important;
    border: 1px solid #e0e0e0 !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: top !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

.elementor-kit-7 .wpfMainWrapper .wpfFilterWrapper input[type="radio"] {
    border-radius: 50% !important;
}

.elementor-kit-7 .wpfMainWrapper .wpfFilterWrapper input[type="radio"]::before,
.elementor-kit-7 .wpfMainWrapper .wpfFilterWrapper input[type="checkbox"]::before {
    display: none !important;
}
