/* Shop: filtros y carga de productos */

/* Estado de carga */
#shopProducts {
    position: relative;
}

#shopProducts.shop-products-loading {
    min-height: 280px;
    opacity: 0.6;
    pointer-events: none;
}

#shopProducts.shop-products-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 80px;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #00823F;
    border-radius: 50%;
    animation: shop-spin 0.8s linear infinite;
}

@keyframes shop-spin {
    to { transform: rotate(360deg); }
}

.shop_grid_product_area .row {
    position: relative;
}

/* Barra "Quiero ver [categoría] de [subcategoría]" */
.shop-filter-bar {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.shop-filter-line {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.shop-filter-select {
    min-width: 180px;
    max-width: 100%;
    height: 2.75rem;
    padding: 0 2.25rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 2.75rem;
    color: #1a1a1a;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: inline-block;
    vertical-align: middle;
}

.shop-filter-select:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.shop-filter-select:focus {
    outline: none;
    border-color: #00823F;
    box-shadow: 0 0 0 3px rgba(0, 130, 63, 0.2);
}

.shop-filter-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Placeholder rotativo del select de categoría (hasta la primera interacción) */
.shop-category-wrap {
    position: relative;
    display: inline-block;
}

/* Cuando el placeholder está visible, ocultar el texto del select para que no tape */
.shop-category-wrap.placeholder-visible .shop-filter-select {
    color: transparent;
}

.shop-category-placeholder {
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    line-height: 2.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #888;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 2.5rem);
}

.shop-category-placeholder.hidden {
    display: none !important;
}

/* Hover en paginación y enlaces de filtros: negro y negrita */
.shop_grid_area .pagination .page-link:hover {
    color: #1a1a1a !important;
    font-weight: 700;
}

@media (max-width: 575px) {
    .shop-filter-line {
        font-size: 0.9375rem;
    }

    .shop-filter-select,
    .shop-category-wrap {
        min-width: 100%;
        width: 100%;
    }
}
