/* =========================
   CATEGORY PAGE
========================= */

.category-breadcrumbs {
    padding: 28px 60px 14px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 14px;
    color: #8b95a5;
}

.category-breadcrumbs a {
    color: #8b95a5;
    text-decoration: none;
}

.category-breadcrumbs a:hover {
    color: #e77b2c;
}


/* =========================
   CATEGORY HEADER
========================= */

.category-header {
    padding: 10px 60px 28px;
}

.category-title {
    margin: 0;

    font-size: 36px;
    font-weight: 700;

    color: #1f2937;
}

.category-description {
    margin: 8px 0 0;

    font-size: 16px;

    color: #8b95a5;
}


/* =========================
   CATEGORY FILTER
========================= */

.category-filter {
    margin: 0 60px 0;
    padding: 18px 20px;

    display: grid;

    grid-template-columns:
        auto
        minmax(180px, 1.4fr)
        minmax(150px, 1fr)
        minmax(170px, 1fr)
        minmax(200px, 1.3fr)
        auto;

    align-items: center;
    gap: 12px;

    background: #222b3a;

    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.12);
}


/* FILTER LABEL */

.category-filter__label {
    padding: 0 10px;

    font-size: 16px;
    font-weight: 700;

    color: #ffffff;
}


/* SELECT */

.category-filter__select {
    width: 100%;
    height: 56px;

    padding: 0 18px;

    background: #ffffff;
    color: #1f2937;

    border: 1px solid #e77b2c;
    border-radius: 10px;

    outline: none;
    border-radius: 10px;

    font-size: 16px;
    outline: none;

    cursor: pointer;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}
.category-filter__title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.category-filter__select:hover {
    border-color: #e77b2c;
}
.category-filter__select:focus {
    border-color: #e77b2c;
    box-shadow: 0 0 0 3px rgba(227, 154, 66, 0.18);
}
.category-filter__select option {
    background: #ffffff;
    color: #1f2937;
}

/* BUTTON */

.category-filter__button {
    height: 48px;

    padding: 0 28px;

    border: none;
    border-radius: 8px;

    background: #e77b2c;
    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.2s ease;
}

.category-filter__button:hover {
    background: #d88732;
}
/* =========================================
   CATALOG PRODUCTS
========================================= */

.catalog-products {
    padding: 40px 60px 30px;
}


/* HEADER: ТОВАРИ + SORT */

.category-products__header {
    width: 100%;
    margin-bottom: 35px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.catalog-products__title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2937;
}

.catalog-products__sort {
    width: 220px;
    height: 48px;

    padding: 0 16px;

    background: #fff;

    border: 1px solid #dfe3e8;
    border-radius: 10px;

    font-size: 15px;
    color: #667085;

    cursor: pointer;
    outline: none;
}
.category-products__sort:focus {
    border-color: #e77b2c;
}
.category-products__sort:hover,
.category-products__sort:focus {
    border-color: #e77b2c;
}

/* =========================================
   PRODUCTS GRID
========================================= */

.category-products {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
}


/* =========================================
   PRODUCT CARD
========================================= */

.category-card {
    width: 100%;
    min-width: 0;
    min-height: 390px;

    background: #fff;

    border: 1px solid #e39a42;
    border-radius: 14px;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;

    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);

    box-shadow: 0 14px 30px rgba(31, 41, 55, 0.14);
}


/* =========================================
   IMAGE
========================================= */

.category-card__image {
    position: relative;

    width: 100%;
    height: 190px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
}

.category-card__image img {
    display: block;

    width: 75%;
    height: 75%;

    object-fit: contain;
}


/* CONDITION */

.category-card__condition {
    position: absolute;

    top: 14px;
    left: 14px;

    padding: 6px 10px;

    background: #e77b2c;
    color: #fff;

    border-radius: 6px;

    font-size: 13px;
    font-weight: 700;

    z-index: 2;
}


/* FAVORITE */

.category-card__favorite {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: #f4f5f7;
    color: #1f2937;

    font-size: 21px;
    line-height: 1;

    cursor: pointer;

    z-index: 2;
}

.category-card__favorite:hover {
    background: #eceff3;
}


/* =========================================
   CARD CONTENT
========================================= */

.category-card__content {
    width: 100%;
    flex: 1;

    padding: 18px 18px 20px;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;
}


/* TITLE */

.category-card__title {
    min-height: 46px;

    margin: 0 0 10px;

    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;

    color: #1f2937;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
}


/* CAR */

.category-card__car {
    margin: 0 0 7px;

    font-size: 14px;
    line-height: 1.4;

    color: #667085;
}


/* OEM */

.category-card__oem {
    margin: 0 0 20px;

    font-size: 13px;
    line-height: 1.4;

    color: #8b95a5;
}


/* =========================================
   PRICE + CART
========================================= */

.category-card__bottom {
    width: 100%;

    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.category-card__price {
    font-size: 19px;
    line-height: 1;
    font-weight: 700;

    color: #1f2937;

    white-space: nowrap;
}

.category-card__cart {
    flex-shrink: 0;

    padding: 10px 14px;

    border: none;
    border-radius: 8px;

    background: #e77b2c;
    color: #fff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.2s ease;
}

.category-card__cart:hover {
    background: #d88732;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1400px) {

    .category-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


@media (max-width: 1100px) {

    .category-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 800px) {

    .catalog-products {
        padding: 35px 30px 60px;
    }

    .category-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 550px) {

    .catalog-products {
        padding: 30px 20px 50px;
    }

    .catalog-products__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .catalog-products__sort {
        width: 100%;
    }

    .category-products {
        grid-template-columns: 1fr;
    }

}
