/**
 * File: assets/css/frontend/catalog/layout.css
 * Purpose: Defines the Marketplace page shell, light-grey background, content/sidebar grid and pagination.
 * Scope: Marketplace layout only; filters, cards and widgets are styled in focused files.
 * Related PHP: src/Product/Catalog/Frontend/CatalogRenderer.php
 * Related CSS: assets/css/frontend/catalog/*.css
 * Related JS: None
 * Package: HyperDAF Engine
 */

.hdf-marketplace {
    --hdf-market-width: 1300px;
    --hdf-market-border: var(--hdf-engine-color-border, var(--hdf-engine-color-border));
    --hdf-market-muted: var(--hdf-engine-color-text-muted, var(--hdf-engine-color-text-muted));
    min-height: 70vh;
    background: var(--hdf-engine-color-surface-subtle);
    color: var(--hdf-engine-color-text-primary, var(--hdf-engine-color-text));
}

.hdf-marketplace__inner {
    width: min(calc(100% - 2rem), var(--hdf-market-width));
    margin-inline: auto;
    padding-block: 1.65rem 4rem;
}

.hdf-marketplace__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
}

.hdf-marketplace__header h1 {
    max-width: 22ch;
    margin: .12rem 0 .45rem;
    font-size: clamp(1.9rem, 2.7vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.hdf-marketplace__header p {
    max-width: 72ch;
    margin: 0;
    color: var(--hdf-market-muted);
    line-height: 1.65;
}

.hdf-marketplace__eyebrow {
    color: var(--hdf-engine-color-primary-strong, var(--hdf-engine-color-primary-strong)) !important;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.hdf-marketplace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    margin-top: 1rem;
}

.hdf-marketplace-layout--sidebar {
    grid-template-columns: minmax(0, 1fr) 276px;
    align-items: start;
}

.hdf-marketplace-results {
    min-width: 0;
}

.hdf-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.hdf-products-grid--list {
    grid-template-columns: 1fr;
}

.hdf-marketplace__empty {
    display: grid;
    min-height: 20rem;
    place-items: center;
    align-content: center;
    padding: 2rem;
    border: 1px dashed var(--hdf-market-border);
    border-radius: var(--hdf-engine-radius-lg);
    background: var(--hdf-engine-color-surface);
    text-align: center;
}

.hdf-marketplace__empty h1,
.hdf-marketplace__empty h2 {
    margin: 0;
}

.hdf-marketplace__empty p {
    max-width: 52ch;
    color: var(--hdf-market-muted);
}

.hdf-catalog-pagination {
    margin-top: 2rem;
}

.hdf-catalog-pagination > .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hdf-catalog-pagination li {
    margin: 0;
}

.hdf-catalog-pagination a,
.hdf-catalog-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: .45rem .65rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--hdf-engine-color-text-secondary);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.hdf-catalog-pagination a:hover,
.hdf-catalog-pagination a:focus-visible {
    background: var(--hdf-engine-color-primary-strong, var(--hdf-engine-color-primary-strong));
    color: var(--hdf-engine-color-surface);
    outline: none;
}

.hdf-catalog-pagination .current {
    color: var(--hdf-engine-color-primary-strong, var(--hdf-engine-color-primary-strong));
    box-shadow: inset 0 -2px 0 var(--hdf-engine-color-primary-strong, var(--hdf-engine-color-primary-strong));
}

.hdf-catalog-pagination .is-disabled {
    color: var(--hdf-engine-color-text-disabled);
    cursor: not-allowed;
}

.hdf-catalog-pagination__direction a,
.hdf-catalog-pagination__direction span {
    min-width: auto;
    padding-inline: .8rem;
}

.hdf-catalog-pagination__ellipsis span {
    min-width: 28px;
    padding-inline: .25rem;
    color: var(--hdf-engine-color-text-disabled);
}
