/* Built by website/local/scripts/build_css.py from assets/css/manifest.json. Edit the sources, then rebuild. */

/* pages/shop.css */
/*
 * The shop, its categories and product search (woocommerce/archive-product.php):
 * the header, the toolbar (category filters, count, sort) and pagination.
 * The cards and their grid are the shared product card (product-card.css).
 * The fixed header's clearance is `main`'s (base.css); the page sits in the
 * WooCommerce wrapper's `.container`, which gives the side gutter.
 */

/* The breadcrumb's place: a band of its own above the header, never flush
 * under the nav (it was 1px until 20 Oct, SF111); its look is breadcrumb.css. */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: var(--spacing-md);
}

.shop-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
}

.shop-header .eyebrow { margin-bottom: var(--spacing-xs); }

.shop-title {
    max-width: 38ch;
    margin: 0 auto var(--spacing-sm);
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.05;
    color: var(--color-primary);
}

.shop-lede {
    max-width: 56ch;
    margin: 0 auto;
    font-size: 1.0625rem;
}

/* Filters on the left, count and sort on the right; stacked on a phone. */
.shop-toolbar {
    max-width: 1400px;
    margin: 0 auto var(--spacing-lg);
    padding: var(--spacing-md) 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.shop-filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-text-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.shop-filter:hover { border-color: var(--color-secondary); }

.shop-filter[aria-current="page"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.shop-filter:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.shop-tools {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

.shop-count {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-mid);
    white-space: nowrap;
}

/* WooCommerce's sort form, drawn as the theme's select. */
.shop-tools .woocommerce-ordering {
    float: none;
    margin: 0;
}

.shop-tools .woocommerce-ordering select {
    appearance: none;
    min-height: 40px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232B2520' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: var(--color-text-dark);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.shop-tools .woocommerce-ordering select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.shop-results {
    max-width: 1400px;
    margin: 0 auto;
}

/* Four across on a wide screen: the catalog's seven fill a row and most
 * of a second, where three across left one card alone. */
@media (min-width: 1200px) {
    .shop-results .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 700px) {
    .shop-header { padding-top: var(--spacing-lg); }
    .shop-tools {
        width: 100%;
        justify-content: space-between;
    }
}

/* WooCommerce pagination */
.woocommerce-pagination {
    margin-top: var(--spacing-xl);
    text-align: center;
}
.woocommerce-pagination ul.page-numbers {
    display: inline-flex;
    gap: var(--spacing-xs);
    list-style: none;
    padding: 0;
}
.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-dark);
    font-weight: 500;
    transition: all 200ms var(--ease-out);
}
.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers:hover {
    background: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
}
