/* ============================================
   CATALOG - Каталог
   ============================================ */

.catalog {
    padding: 30px 0 60px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-top: 20px;
    margin-bottom: 20px;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 8px;
    font-size: 14px;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
}

.breadcrumbs__item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--color-gray);
}

.breadcrumbs__link {
    color: var(--color-gray);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs__link:hover {
    color: var(--color-primary);
}

.breadcrumbs__current {
    color: var(--color-dark);
}

/* Catalog Header */
.catalog__header {
    margin-bottom: 30px;
}

.catalog__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.catalog__count {
    font-size: 16px;
    color: var(--color-gray);
}

.catalog__count-number {
    font-weight: 600;
    color: var(--color-primary);
}

/* ============================================
   CATALOG CONTENT
   ============================================ */

.catalog__content {
    min-width: 0;
}

.catalog__controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 12px;
}

.sorting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sorting__label {
    font-size: 14px;
    color: var(--color-gray);
}

.sorting__select {
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--color-light-gray);
    border-radius: 6px;
    font-size: 14px;
    background: var(--color-white);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: var(--transition);
}

.sorting__select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.view-switcher {
    display: flex;
    gap: 5px;
}

.view-switcher__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--color-light-gray);
    border-radius: 6px;
    color: var(--color-gray);
    cursor: pointer;
    transition: var(--transition);
}

.view-switcher__btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.view-switcher__btn--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================
   PRODUCTS
   ============================================ */

.products {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.products--list {
    grid-template-columns: 1fr;
}

.products--grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.product-card__media {
    position: relative;
}

.product-card__image-link {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background: var(--color-bg-light);
}

.product-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-card__image {
    transform: scale(1.03);
}

.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

.badge--success {
    background: var(--color-success);
    color: var(--color-white);
}

.badge--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge--warning {
    background: #FFA726;
    color: var(--color-white);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.product-card__main {
    min-width: 0;
}

.product-card__title {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
    transition: var(--transition);
}

.product-card__title:hover {
    color: var(--color-primary);
}

.product-card__description {
    display: none;
}

.product-card__specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex: 1;
}

.product-card__spec {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.product-card__spec-label {
    min-width: 110px;
    flex-shrink: 0;
    color: var(--color-gray);
}

.product-card__spec-value {
    color: var(--color-dark);
    font-weight: 500;
}

.product-card__footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--color-bg-light);
}

.product-card__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card__price-value {
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--color-primary);
}

.product-card__price-note {
    font-size: 13px;
    color: var(--color-gray);
}

.product-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn--secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Grid view */
.products--grid .product-card__description {
    display: none !important;
}

/* List view */
.products--list .product-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 280px;
}

.products--list .product-card__media {
    width: 320px;
    min-width: 320px;
    flex: 0 0 320px;
    border-right: 1px solid var(--color-bg-light);
    overflow: hidden;
}

.products--list .product-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding-top: 0;
    position: relative;
}

.products--list .product-card__image {
    position: absolute;
    inset: 0;
}

.products--list .product-card__body {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 24px;
    padding: 22px 24px;
    align-items: start;
}

.products--list .product-card__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.products--list .product-card__description {
    display: -webkit-box;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-gray);
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.products--list .product-card__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    margin-bottom: 0;
}

.products--list .product-card__spec {
    min-width: 0;
}

.products--list .product-card__footer {
    height: 100%;
    min-width: 0;
    justify-content: space-between;
    padding-top: 0;
    padding-left: 24px;
    border-top: none;
    border-left: 1px solid var(--color-bg-light);
}

.products--list .product-card__actions {
    margin-top: auto;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    margin-bottom: 40px;
}

.pagination__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.pagination__item--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination__link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination__item--active .pagination__link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.pagination__link--arrow {
    padding: 0;
    width: 40px;
}

.pagination__dots {
    color: var(--color-gray);
    padding: 0 8px;
}

/* ============================================
   SEO BLOCK
   ============================================ */

.catalog__seo {
    background: var(--color-bg-light);
    border-radius: 12px;
    padding: 30px;
}

.catalog__seo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.catalog__seo-content {
    color: var(--color-gray);
    line-height: 1.7;
}

.catalog__seo-content p {
    margin-bottom: 15px;
}

.catalog__seo-content p:last-child {
    margin-bottom: 0;
}

/* Empty State */
.catalog__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.catalog__empty svg {
    margin-bottom: 20px;
}

.catalog__empty-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.catalog__empty-text {
    color: var(--color-gray);
    font-size: 16px;
}

.catalog__empty-text a {
    color: var(--color-primary);
    text-decoration: none;
}

.catalog__empty-text a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 380px;
        height: 100vh;
        z-index: 1001;
        border: none;
        border-radius: 0;
        overflow-y: auto;
        transition: var(--transition);
    }

    .filters.active {
        left: 0;
    }

    .filters-trigger {
        display: flex;
        position: sticky;
        top: 80px;
        z-index: 10;
        margin-bottom: 20px;
    }

    .products--grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .products--list .product-card__media {
        width: 280px;
        min-width: 280px;
        flex: 0 0 280px;
    }

    .products--list .product-card__body {
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 20px;
        padding: 20px;
    }

    .products--list .product-card__specs {
        grid-template-columns: 1fr 1fr;
        gap: 8px 16px;
    }
}

@media (max-width: 768px) {
    .catalog {
        padding: 20px 0 40px;
    }

    .catalog__title {
        font-size: 24px;
    }

    .catalog__controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .sorting {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sorting__select {
        width: 100%;
    }

    .products--grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .products--list .product-card {
        flex-direction: column;
        min-height: 0;
    }

    .products--list .product-card__media {
        width: 100%;
        min-width: 100%;
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--color-bg-light);
    }

    .products--list .product-card__image-link {
        width: 100%;
        height: auto;
        min-height: 0;
        padding-top: 66.67%;
    }

    .products--list .product-card__body {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }

    .products--list .product-card__description {
        margin-bottom: 14px;
        -webkit-line-clamp: 4;
    }

    .products--list .product-card__specs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .products--list .product-card__footer {
        height: auto;
        padding-top: 14px;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--color-bg-light);
    }

    .product-card__actions {
        width: 100%;
    }

    .product-card__actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-card__title {
        font-size: 18px;
    }

    .product-card__price-value {
        font-size: 22px;
    }

    .product-card__spec {
        flex-direction: column;
        gap: 2px;
    }

    .product-card__spec-label {
        min-width: auto;
    }
}
