.category-page {
    padding: 18px 0 42px;
    overflow-x: clip;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.breadcrumb strong {
    color: var(--ink);
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    border-radius: 8px;
    padding: 28px;
    background:
        linear-gradient(90deg, rgba(7, 17, 26, .94), rgba(7, 17, 26, .72)),
        url("/assets/frontend/smart-home-hero.png") center / cover;
    color: white;
}

.event-hero {
    overflow: hidden;
    padding: 0;
    border-radius: 8px;
    background: #07111a;
}

.event-hero__media {
    display: block;
}

.event-hero__image {
    display: block;
    width: 100%;
    height: auto;
}

.event-hero__image--mobile {
    display: none;
}

.category-hero .eyebrow {
    margin: 0 0 8px;
    color: #ffb48f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.category-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1;
    letter-spacing: 0;
}

.category-hero p {
    max-width: 720px;
    margin: 12px 0 0;
    color: #dce5ed;
    font-size: 16px;
}

.category-hero__stats {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 130px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    text-align: center;
}

.category-hero__stats strong {
    color: var(--orange);
    font-size: 46px;
    line-height: 1;
}

.category-hero__stats span {
    color: #e8eef4;
    font-weight: 800;
}

.category-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.category-layout--single {
    grid-template-columns: 1fr;
}

.category-sidebar {
    display: grid;
    gap: 14px;
}

.category-sidebar__block,
.category-toolbar,
.category-empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.category-sidebar__block {
    padding: 16px;
}

.category-sidebar h2 {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
}

.category-sidebar nav {
    display: grid;
    gap: 6px;
}

.category-sidebar nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    border-radius: 6px;
    padding: 0 10px;
    color: #263343;
    font-weight: 700;
}

.category-sidebar nav a:hover {
    background: #f5f7f9;
    color: var(--orange);
}

.category-sidebar nav small {
    color: var(--muted);
}

.category-sidebar__empty {
    color: var(--muted);
    font-size: 13px;
}

.category-benefits {
    display: grid;
    gap: 8px;
}

.category-benefits span {
    position: relative;
    min-height: 66px;
    padding: 12px 10px 10px 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.category-benefits span::before {
    left: 12px;
    top: 18px;
}

.category-benefits b,
.category-benefits small {
    display: block;
}

.category-benefits small {
    margin-top: 2px;
    color: var(--muted);
}

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    padding: 12px 14px;
}

.category-toolbar p {
    margin: 0;
    color: var(--muted);
}

.category-toolbar p strong {
    color: var(--ink);
}

.category-toolbar form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-toolbar label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.category-toolbar select {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 34px 0 10px;
    background: white;
    color: var(--ink);
    font-weight: 800;
}

.category-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
}

.category-results {
    min-width: 0;
}

.category-pagination {
    margin-top: 16px;
}

.category-pagination nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.category-pagination nav > div:first-child {
    width: 100%;
    color: var(--muted);
    font-size: 13px;
}

.category-pagination a,
.category-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 10px;
    background: white;
    color: #263343;
    font-weight: 800;
}

.category-pagination span[aria-current="page"] span {
    border-color: var(--orange);
    background: var(--orange);
    color: white;
}

.category-empty {
    display: grid;
    gap: 5px;
    padding: 28px;
    color: var(--muted);
}

.category-empty strong {
    color: var(--ink);
    font-size: 18px;
}

@media (max-width: 980px) {
    .category-layout,
    .category-hero {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        order: 2;
    }

    .category-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .category-page {
        padding-top: 12px;
    }

    .breadcrumb,
    .category-hero,
    .category-layout {
        width: min(100% - 24px, 1320px);
    }

    .category-hero {
        padding: 22px;
    }

    .event-hero {
        border-radius: 8px;
    }

    .event-hero__image--desktop {
        display: none;
    }

    .event-hero__image--mobile {
        display: block;
    }

    .category-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .category-toolbar form {
        justify-content: space-between;
    }

    .category-toolbar select {
        min-width: 190px;
    }

    .category-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .category-product-grid .product-card {
        width: 100%;
        min-height: 300px;
        gap: 9px;
        border-radius: 18px;
        padding: 8px;
    }

    .category-product-grid .product-card__media {
        border-radius: 14px;
    }

    .category-product-grid .product-card__media img {
        padding: 12px;
    }

    .category-product-grid .product-card__body {
        gap: 5px;
        padding: 0 6px;
    }

    .category-product-grid .product-card h3 {
        display: -webkit-box;
        min-height: 46px;
        overflow: hidden;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.18;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .category-product-grid .product-card__description {
        display: none;
    }

    .category-product-grid .old-price {
        margin: -2px 6px 0;
        font-size: 11px;
    }

    .category-product-grid .card-bottom {
        gap: 6px;
        padding: 0 4px 3px;
    }

    .category-product-grid .card-bottom .price {
        font-size: 14px;
    }

    .category-product-grid .card-bottom button {
        min-width: 36px;
        width: 36px;
        min-height: 34px;
        padding: 0;
    }

    .category-product-grid .card-bottom button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .category-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-hero__stats {
        min-height: 100px;
    }
}
