/**
 * Phase 3 — Product listing (shop.php): sidebar filters, toolbar, chips, grid polish.
 */

.shop-plp-form .shop-plp-sidebar-inner {
    padding: var(--almart-space-5);
    border-radius: var(--almart-radius-xl);
    border: 1px solid var(--almart-color-border);
    background: var(--almart-color-surface);
    box-shadow: var(--almart-shadow-pill);
}

@media (min-width: 992px) {
    .shop-plp-sidebar {
        display: block !important;
    }

    .shop-plp-sidebar-inner {
        position: sticky;
        top: 6.5rem;
    }
}

@media (max-width: 991.98px) {
    .shop-plp-sidebar {
        display: none;
    }

    .shop-plp-sidebar.is-open {
        display: block;
    }
}

.shop-plp-filter-toggle[aria-expanded="true"] {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.shop-plp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--almart-space-3) var(--almart-space-4);
    padding: var(--almart-space-4) 0;
    border-bottom: 1px solid var(--almart-color-border-subtle);
    margin-bottom: var(--almart-space-5);
}

.shop-plp-toolbar__meta {
    font-size: var(--almart-type-small-size);
    color: var(--almart-color-text-muted);
    flex: 1 1 auto;
    min-width: 12rem;
}

.shop-plp-toolbar__meta strong {
    color: var(--almart-color-text);
    font-weight: var(--almart-font-weight-semibold);
}

.shop-plp-toolbar__sort {
    flex: 0 1 220px;
}

.shop-plp-toolbar__sort .form-select {
    border-radius: var(--almart-radius-pill);
}

.shop-plp-search .form-control {
    border-radius: var(--almart-radius-pill) 0 0 var(--almart-radius-pill);
}

.shop-plp-search .btn {
    border-radius: 0 var(--almart-radius-pill) var(--almart-radius-pill) 0;
}

.shop-plp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--almart-space-2);
    margin-bottom: var(--almart-space-4);
}

.shop-plp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: var(--almart-type-utility-size);
    font-weight: var(--almart-font-weight-semibold);
    border-radius: var(--almart-radius-pill);
    background: var(--almart-color-surface-tint);
    border: 1px solid var(--almart-color-border-strong);
    color: var(--almart-color-text);
    text-decoration: none;
    transition: background var(--almart-duration-fast) var(--almart-easing-standard),
        border-color var(--almart-duration-fast) var(--almart-easing-standard);
}

.shop-plp-chip:hover {
    background: var(--almart-color-surface-muted);
    border-color: var(--bs-primary);
    color: var(--almart-color-text);
}

.shop-plp-chip i {
    font-size: 0.65rem;
    opacity: 0.65;
}

.shop-plp-empty {
    padding: var(--almart-space-10) var(--almart-space-6);
    border-radius: var(--almart-radius-xl);
    border: 1px dashed var(--almart-color-border-strong);
    background: var(--almart-color-surface-muted);
    text-align: center;
}

.shop-plp-empty h2 {
    font-family: var(--almart-font-heading);
    font-size: var(--almart-type-h2-size);
    margin-bottom: var(--almart-space-3);
}

/* Product cards on PLP — consistent image frame */
.shop-plp-grid .product-item-inner-item {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--almart-color-surface-tint);
}

.shop-plp-grid .product-item-inner-item img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.shop-plp-grid .product-item .h4,
.shop-plp-grid .product-item h4 {
    font-size: 1rem;
    line-height: 1.35;
    min-height: 2.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-plp-grid .text-center.rounded-bottom {
    padding: var(--almart-space-4) !important;
}

.shop-plp-sidebar .form-label {
    font-size: var(--almart-type-utility-size);
    font-weight: var(--almart-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--almart-color-text-muted);
    margin-bottom: var(--almart-space-2);
}
