/* ═══ CATALOG HEADER ═══ */
.catalog-header {
    background: var(--dark-primary-60);
    border-bottom: 1px solid var(--site-border);
    padding: 4.5rem 0 5rem;
    position: relative;
    overflow: hidden;
    color: var(--dark-secondary-30);
}

.catalog-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--dark-secondary-30);
    margin-bottom: 1rem;
}
.catalog-title .accent {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.catalog-sub { color: var(--dark-secondary-30-muted); font-size: 1rem; max-width: 460px; line-height: 1.7; }

.catalog-meta {
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    margin-top: 2rem;
}
.meta-item {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; color: var(--site-muted);
}
.meta-item i { color: var(--site-accent-text); }

/* ═══ FILTER BAR ═══ */
.filter-bar {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin: -2rem 0 2.5rem;
    position: relative; z-index: 10;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}
.filter-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--site-muted);
    margin-bottom: 0.6rem;
}
.filter-pills {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.catalog-search { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--site-border); }
.catalog-search .filter-label { display: block; color: var(--site-muted); }
.catalog-search-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.catalog-search-control { position: relative; flex: 1 1 240px; min-width: 0; }
.catalog-search-field { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: 0 1rem; border: 1px solid var(--site-border); border-radius: 12px; background: var(--site-surface); color: var(--site-muted); }
.catalog-search-field:focus-within { border-color: #171717; outline: 2px solid #ffd700; outline-offset: 2px; }
.catalog-search-field input { width: 100%; min-width: 0; min-height: 48px; border: 0; outline: 0; background: transparent; color: var(--site-text); font: inherit; font-size: 1rem; }
.catalog-search-field input::placeholder { color: var(--site-muted); }
.catalog-search-submit { min-height: 48px; padding: .7rem 1.5rem; border: 1px solid var(--site-border); border-radius: 12px; background: transparent; color: var(--site-muted); font-weight: 600; }
.catalog-search-submit:hover { background: var(--site-surface); border-color: var(--site-border); color: var(--site-text); }
.catalog-search-clear { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 44px; margin-right: -.65rem; border: 0; border-radius: 9px; background: transparent; color: var(--site-muted); }
.catalog-search-clear[hidden], .catalog-suggestions[hidden] { display: none; }
.catalog-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.catalog-search-clear:hover { color: var(--site-text); background: var(--site-surface); }
.catalog-search-submit:focus-visible, .catalog-search-clear:focus-visible { outline: 2px solid #171717; outline-offset: 3px; }
.results-count { overflow-wrap: anywhere; min-width: 0; }
.catalog-search-hint { margin: .65rem 0 0; color: var(--site-muted); font-size: .8rem; }
.catalog-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; padding: .5rem; border: 1px solid var(--site-border); border-radius: 14px; background: var(--site-surface); box-shadow: 0 16px 40px rgba(0,0,0,.16); }
.catalog-suggestions-heading { padding: .5rem .65rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--site-muted); }
#catalogSuggestionList { max-height: min(340px, 45vh); overflow-y: auto; overscroll-behavior: contain; }
.catalog-suggestion { display: flex; align-items: center; gap: .75rem; min-height: 64px; padding: .7rem; border-radius: 9px; text-decoration: none; color: var(--site-text); }
.catalog-suggestion:hover, .catalog-suggestion[aria-selected="true"] { background: var(--site-surface); color: var(--site-text); box-shadow: inset 3px 0 #ffd700; }
.catalog-suggestion-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; background: var(--site-surface); border: 1px solid var(--site-border); border-radius: 9px; color: var(--site-muted); }
.catalog-suggestion-copy { min-width: 0; flex: 1; }
.catalog-suggestion-name { display: block; font-weight: 650; font-size: .95rem; overflow-wrap: anywhere; }
.catalog-suggestion-meta { display: block; color: var(--site-muted); font-size: .78rem; margin-top: .15rem; overflow-wrap: anywhere; }
.catalog-suggestions-message { margin: 0; padding: .75rem; color: var(--site-muted); font-size: .9rem; }
.catalog-suggestions-all { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; min-height: 44px; padding: .6rem .75rem; border: 0; border-top: 1px solid var(--site-border); background: var(--site-surface); color: var(--site-text); font-weight: 650; font-size: .85rem; }
.catalog-suggestions-all:hover { background: var(--site-surface); }
.catalog-suggestions-all:focus-visible { outline: 2px solid #171717; outline-offset: -2px; }
@media (max-width: 575.98px) {
    .catalog-search-row { gap: .65rem; }
    .catalog-search-control { flex-basis: 100%; }
    .catalog-search-submit { flex: 1; }

}
.filter-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.82rem; font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    border: 1.5px solid var(--site-border);
    color: var(--site-muted);
    text-decoration: none;
    background: var(--site-surface);
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-pill:hover { border-color: #FFD700; color: var(--site-text); background: var(--site-surface); }
.filter-pill.active {
    background: #0f0e0b;
    color: #ffd700;
    border-color: #0f0e0b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--site-border);
    border-radius: 100px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--site-muted);
    background: var(--site-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
    cursor: pointer;
    transition: border-color 0.2s;
    outline: none;
    width: 100%;
}
.sort-select:focus { border-color: #FFD700; }

/* ═══ RESULTS BAR ═══ */
.results-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; gap: 0.5rem;
}
.results-count { font-size: 0.875rem; color: var(--site-muted); font-weight: 500; }
.view-toggle { display: flex; gap: 0.25rem; }
.view-btn {
    width: 34px; height: 34px;
    border: 1.5px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    color: var(--site-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.8rem; transition: all 0.2s;
}
.view-btn.active, .view-btn:hover { background: #0f0e0b; color: #ffd700; border-color: #0f0e0b; }

/* ═══ PRODUCT GRID ═══ */
.product-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.product-card {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s, border-color 0.25s;
    cursor: pointer;
    display: flex; flex-direction: column;
    height: 100%;
    animation: cardIn 0.5s ease both;
}
@keyframes cardIn {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}
.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 60px rgba(0,0,0,0.12);
    border-color: rgba(255,215,0,0.4);
}

.product-img-wrap {
    position: relative;
    overflow: hidden;
    height: 260px;
    background: var(--site-surface);
}
.product-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-img-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--site-surface), var(--site-surface));
    color: var(--site-muted);
    gap: 0.5rem;
    font-size: 2.5rem;
}
.product-img-placeholder span { font-size: 0.75rem; font-weight: 600; color: var(--site-muted); }

.product-cat-badge {
    position: absolute; top: 14px; left: 14px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    background: #0f0e0b; color: #ffd700;
    border-radius: 100px; padding: 0.25rem 0.7rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.35s;
    display: flex; align-items: flex-end; padding: 1.25rem;
}
.product-card:hover .product-overlay { opacity: 1; }
.overlay-ctas { display: flex; gap: 0.5rem; width: 100%; }
.overlay-btn {
    flex: 1; font-size: 0.78rem; font-weight: 700;
    padding: 0.55rem; border-radius: 10px;
    text-align: center; text-decoration: none;
    transition: all 0.2s;
    border: none; cursor: pointer;
}
.overlay-btn-primary { background: #FFD700; color: #000; }
.overlay-btn-primary:hover { background: #FDB931; color: #000; }
.overlay-btn-secondary { background: var(--site-panel-tint); color: var(--site-text); backdrop-filter: blur(4px); border: 1px solid var(--site-border); }
.overlay-btn-secondary:hover { background: var(--site-panel-tint); color: var(--site-text); }

.product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex; flex-direction: column;
}
.product-name {
    font-size: 1rem; font-weight: 700;
    color: var(--site-text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.product-desc {
    font-size: 0.8rem; color: var(--site-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 0.875rem;
    border-top: 1px solid var(--site-border);
}
.product-price {
    font-size: 1.2rem; font-weight: 800; color: var(--site-text);
    letter-spacing: -0.02em;
}
.product-price-currency { font-size: 0.75rem; font-weight: 600; color: var(--site-muted); }
.product-rating {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.78rem; color: var(--site-muted); font-weight: 600;
}
.product-rating i { color: var(--site-warning); font-size: 0.72rem; }

.catalog-header-inner { position: relative; z-index: 2; }
.catalog-content { padding-top: 0; }
.product-price-currency--main { color: var(--site-text); font-weight: 700; }
.product-price-unit { font-size: 0.6em; opacity: 0.7; margin-left: 2px; }
.product-empty-action { font-size: 0.875rem; }
.product-list-bottom-spacer { height: 5rem; }

/* ═══ EMPTY STATE ═══ */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--site-surface);
    color: var(--site-text);
    border-radius: 20px;
    border: 1px solid var(--site-border);
    grid-column: 1 / -1;
}
.empty-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: rgba(255,215,0,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 1.25rem;
    color: var(--accent-10-dark);
}

/* Let the text determine row height; media always fills the entire left column. */
.product-grid.is-list-view { grid-template-columns: minmax(0, 1fr); }
.product-grid.is-list-view .product-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: 160px;
}
.product-grid.is-list-view .product-img-wrap {
    height: auto;
    min-height: 160px;
    align-self: stretch;
    border-right: 1px solid var(--site-border);
}
.product-grid.is-list-view .product-img-wrap > :is(img, .product-img-placeholder) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.product-grid.is-list-view .product-body { min-width: 0; }
@media (max-width: 575px) {
    .product-grid.is-list-view .product-card { grid-template-columns: 112px minmax(0, 1fr); }
    .product-grid.is-list-view .product-body { padding: 1rem; }
    .product-grid.is-list-view .product-overlay { padding: .5rem; }
    .product-grid.is-list-view .overlay-btn { padding: .5rem; font-size: .75rem; }
    .product-grid.is-list-view .product-cat-badge { left: 8px; right: 8px; width: fit-content; max-width: calc(100% - 16px); overflow-wrap: anywhere; }
}

.product-grid .empty-state { padding: clamp(2.5rem, 6vw, 5rem) 1.5rem; }
.product-grid .empty-state h4 { color: var(--site-text); }
.product-grid .empty-state p { max-width: 42ch; margin-inline: auto; line-height: 1.6; }
.product-grid .empty-state .empty-icon { color: var(--site-accent-text); }
.product-grid .empty-state .btn-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.25rem; }
