.apf-filter-wrapper.apf-filter-wrapper {
    background: #EEF5F1 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin-bottom: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    border: none !important;
}

.apf-filter-wrapper label {
    display: block !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #204027 !important;
    font-size: 14px !important;
}

.apf-search-row.apf-search-row {
    display: flex !important;
    gap: 8px !important;
}

.apf-search-input.apf-search-input {
    flex: 1 !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: #EEF5F1 !important;
    color: #204027 !important;
    font-weight: 700 !important;
    height: auto !important;
}

.apf-search-input.apf-search-input:focus {
    outline: none !important;
    border-color: #52994E !important;
    background: #fff !important;
}

.apf-search-btn.apf-search-btn {
    padding: 10px 18px !important;
    background: #52994E !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.2s !important;
    line-height: normal !important;
}

.apf-search-btn.apf-search-btn:hover {
    background: #204027 !important;
}

.apf-mobile-only {
    display: block !important;
}

@media (min-width: 1025px) {
    .apf-mobile-only {
        display: none !important;
    }

    #apf-category-tags.apf-category-tags {
        display: flex !important;
    }

    .apf-cat-tag.apf-cat-tag {
        color: #204027 !important;
        font-weight: 700 !important;
    }

    .apf-cat-tag.apf-cat-tag.active {
        color: #52994E !important;
    }
}

.apf-category-tags.apf-category-tags {
    flex-direction: column !important;
    gap: 2px !important;
}

.apf-cat-tag.apf-cat-tag {
    padding-top: 4px !important;
    padding-right: 0 !important;
    padding-bottom: 4px !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    color: #204027 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    line-height: normal !important;
    font-weight: bold !important;
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.apf-cat-tag.apf-cat-tag:hover {
    color: #204027 !important;
    background: none !important;
}

.apf-cat-tag.apf-cat-tag.active {
    color: #204027 !important;
    font-weight: 600 !important;
    background: none !important;
}

.apf-category-select.apf-category-select,
.apf-brand-select.apf-brand-select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer !important;
    height: auto !important;
}

.apf-category-select.apf-category-select:focus,
.apf-brand-select.apf-brand-select:focus {
    outline: none !important;
    border-color: #52994E !important;
}

.apf-category-select.apf-category-select:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.apf-actions.apf-actions {
    display: flex !important;
    gap: 10px !important;
}

.apf-reset-button.apf-reset-button {
    padding: 10px 20px !important;
    background: #BC4749 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    line-height: normal !important;
}

.apf-reset-button.apf-reset-button:hover {
    background: #8a2e2f !important;
}

.apf-grid-container.apf-grid-container {
    min-height: 200px !important;
    position: relative !important;
}


/* Center only the loading indicator without affecting the normal results layout */
#results_products_container {
    position: relative !important;
    min-height: 200px !important;
}

#results_products_container .apf-loading {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    max-width: 100% !important;
}


.apf-loading {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 200px !important;
    text-align: center !important;
    color: #999 !important;
    font-size: 15px !important;
}

.apf-loading-image {
    max-width: 100px !important;
    max-height: 100px !important;
    width: auto !important;
    height: auto !important;
}

.apf-grid.apf-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--apf-columns, 3), 1fr) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

.apf-product-card.apf-product-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    background: #EEF5F1 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow 0.2s !important;
    box-shadow: none !important;
    text-align: center !important;
}

.apf-product-card.apf-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.apf-product-image.apf-product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 10px !important;
    margin: 20px auto 0 !important;
    width: 219.31px !important;
    max-width: calc(100% - 40px) !important;
    height: 194px !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.apf-product-image.apf-product-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    background: #fff !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.apf-product-body.apf-product-body {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1 !important;
    text-align: center !important;
}

.apf-product-title.apf-product-title {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 19px !important;
    color: #52994E !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.apf-product-title.apf-product-title a {
    color: #52994E !important;
    text-decoration: none !important;
}

.apf-product-title.apf-product-title a:hover {
    color: #204027 !important;
}

.apf-product-separator.apf-product-separator {
    width: 100px !important;
    height: 1px !important;
    background: #DAECD7 !important;
    margin: 4px auto 8px !important;
    border: none !important;
}

.apf-product-acf-unidades.apf-product-acf-unidades {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #386649 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.apf-product-stock.apf-product-stock {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #386649 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.apf-product-stock.apf-product-stock.in-stock {
    color: #386649 !important;
}

.apf-product-stock.apf-product-stock.out-of-stock {
    color: #BC4749 !important;
}

.apf-product-price.apf-product-price {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 30px !important;
    color: #77a464 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.apf-product-price.apf-product-price .amount {
    color: #77a464 !important;
}

.apf-product-price.apf-product-price del {
    display: none !important;
}

.apf-product-price.apf-product-price ins {
    text-decoration: none !important;
}

.apf-product-login-msg.apf-product-login-msg {
    margin-top: auto !important;
    padding-top: 8px !important;
}

.apf-product-login-msg.apf-product-login-msg a {
    font-size: 13px !important;
    color: #52994E !important;
    text-decoration: underline !important;
}

.apf-cart-row.apf-cart-row {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.apf-qty-wrap.apf-qty-wrap {
    display: flex !important;
    align-items: center !important;
}

.apf-qty.apf-qty {
    width: 50px !important;
    padding: 6px !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    height: auto !important;
    margin: 0 !important;
    line-height: normal !important;
}

.apf-product-actions.apf-product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 8px !important;
}

.apf-product-actions.apf-product-actions .add_to_cart_button {
    padding: 13px 21px !important;
    background: #BC4749 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    transition: background 0.2s !important;
    flex: 1 !important;
    line-height: normal !important;
    margin: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.apf-product-actions.apf-product-actions .add_to_cart_button:hover {
    background: #204027 !important;
}

.apf-cart-row.apf-cart-row .added_to_cart {
    width: 100% !important;
    padding: 8px 16px !important;
    background: #52994E !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-decoration: none !important;
    text-align: center !important;
    line-height: normal !important;
    box-sizing: border-box !important;
}

.apf-view-more.apf-view-more {
    padding: 13px 21px !important;
    background: #8A9362 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: background 0.2s !important;
    width: 100% !important;
    display: block !important;
    line-height: normal !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.apf-view-more.apf-view-more:hover {
    background: #204027 !important;
}

.apf-pagination.apf-pagination {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 20px 0 !important;
    flex-wrap: wrap !important;
}

.apf-page-btn.apf-page-btn {
    padding: 6px 10px !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    color: #52994E !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: normal !important;
    font-weight: 400 !important;
    text-transform: none !important;
}

.apf-page-btn.apf-page-btn:hover {
    color: #204027 !important;
}

.apf-page-btn.apf-page-btn.active {
    color: #BC4749 !important;
    font-weight: 600 !important;
}

.apf-no-results.apf-no-results {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #666 !important;
    font-size: 15px !important;
}

.apf-no-results-filters.apf-no-results-filters {
    list-style: none !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.apf-no-results-filters li {
    font-size: 14px !important;
    color: #52994E !important;
}

.apf-no-results-filters li strong {
    color: #204027 !important;
}

@media (min-width: 601px) and (max-width: 1024px) {
    .apf-grid.apf-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .apf-cart-row.apf-cart-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .apf-qty.apf-qty {
        width: 40px !important;
        padding: 4px !important;
    }

    .apf-product-actions.apf-product-actions .add_to_cart_button {
        padding: 10px 14px !important;
        font-size: 12px !important;
        flex: 0 1 auto !important;
    }
}

@media (max-width: 600px) {
    .apf-grid.apf-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .apf-product-card.apf-product-card {
        max-width: 354.03px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .apf-product-body.apf-product-body {
        padding: 10px !important;
    }

    .apf-product-image.apf-product-image {
        width: 290px !important;
        max-width: calc(100% - 20px) !important;
        height: 194px !important;
        margin: 10px auto 0 !important;
    }

    .apf-cart-row.apf-cart-row {
        gap: 4px !important;
        flex-wrap: wrap !important;
    }

    .apf-qty.apf-qty {
        width: 34px !important;
        padding: 4px !important;
        font-size: 11px !important;
    }

    .apf-product-actions.apf-product-actions .add_to_cart_button {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .apf-view-more.apf-view-more {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .apf-product-title.apf-product-title {
        font-size: 13px !important;
        line-height: 16px !important;
    }

    .apf-product-acf-unidades.apf-product-acf-unidades,
    .apf-product-stock.apf-product-stock {
        font-size: 12px !important;
    }
}

@media (max-width: 400px) {
    .apf-grid.apf-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}
