*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange: #f26522;
    --orange-light: #fff3ec;
    --dark: #1a1a1a;
    --mid: #555;
    --light-gray: #f4f4f4;
    --border: #e2e2e2;
    --card-radius: 14px;
    --sidebar-w: 210px;
}

body {
    font-family: "Open Sans", sans-serif;
    background: #fff;
    color: var(--dark);
    min-height: 100vh;
}

/* ── PAGE LAYOUT ── */
.page-wrap {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 60px;
    gap: 36px;
}

/* ── SIDEBAR ── */
aside {
    width: var(--sidebar-w);
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-list li button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-size: 0.88rem;
    color: var(--orange);
    text-align: left;
    padding: 5px 10px;
    border-radius: 6px;
    width: 100%;
    transition:
        background 0.15s,
        color 0.15s;
}

.filter-list li button:hover {
    background: var(--orange-light);
}

.filter-list li button.active {
    background: var(--orange);
    color: #fff;
    font-weight: 600;
}

/* ── MAIN ── */
main {
    flex: 1;
    min-width: 0;
}

.catalog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.catalog-header h1 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 16px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    font-family: "Open Sans", sans-serif;
    font-size: 0.88rem;
    color: var(--dark);
    width: 200px;
}

.result-count {
    font-size: 0.82rem;
    color: var(--mid);
    margin-bottom: 16px;
}

/* ── PILLS ── */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange-light);
    border: 1px solid #f9c9a8;
    color: var(--orange);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.filter-pill:hover {
    background: #ffe0cc;
}

/* ── GRID ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    transition:
        box-shadow 0.2s,
        transform 0.2s;
    animation: fadeIn 0.3s ease both;
}

.product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: var(--light-gray);
    display: block;
}

.card-img-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 100%);
    display: none;
    align-items: center;
    justify-content: center;
}

.card-img-placeholder svg {
    width: 48px;
    height: 48px;
    fill: #ccc;
}

.card-body {
    padding: 14px 16px 18px;
    text-align: center;
}

.card-body h4 {
    font-family: "Montserrat", sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--dark);
}

.card-brand {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--mid);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── EMPTY ── */
.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 0;
    color: var(--mid);
}
.empty-state svg {
    width: 48px;
    height: 48px;
    fill: #ddd;
    margin-bottom: 12px;
    display: block;
    margin-inline: auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .page-wrap {
        flex-direction: column;
    }
    aside {
        width: 100%;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
