/* ==========================================================================
   Product lists (category page and search): filter chips, heading,
   product grid, "Show more products" and the empty message.
   Markup: storefront/listing/_*; behaviour: js/storefront/product-list.js
   ========================================================================== */

/* ---------- Filter chips (inside the page header) ---------- */

.filter-chips {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 4px 2px;
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-pill);
    background: #FFFFFF;
    color: var(--color-ink);
    box-shadow: 0 1px 4px rgba(28, 21, 48, 0.10);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.filter-chip .icon {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.filter-chip.is-active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* Category headers set --theme-label; elsewhere the normal ink colour is used */
.filter-chip--clear {
    background: transparent;
    box-shadow: none;
    color: var(--theme-label, var(--color-ink));
    text-decoration: underline;
}

/* ---------- Heading above the grid ---------- */

.list-head {
    margin: 0 2px 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
}

.list-head__title {
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
    overflow-wrap: break-word;
}

.list-head__count {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ---------- Grid ---------- */

.product-grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
}

.product-grid__more {
    margin: 26px auto 0;
    height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border-strong);
    color: var(--color-ink);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    width: max-content;
    align-items: center;
}

.product-grid__more.is-loading {
    color: var(--color-text-muted);
}

/* ---------- Nothing found ---------- */

.list-empty {
    padding: 40px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
}

.list-empty__text {
    color: var(--color-text);
    font-weight: 700;
}

.list-empty__hint {
    color: var(--color-text-muted);
    font-size: 14px;
}

.list-empty .btn {
    margin-top: var(--space-2);
}

/* ---------- Bigger screens ---------- */

@media (min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
