:root {
    --primary-bg: #FFFFFF;
    --secondary-bg: #F9F7F4;
    --accent-beige: #F5F1EB;
    --accent-terracotta: #C76B5D;
    --accent-blue: #5D7C9E;
    --accent-olive: #8A9B6E;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-light: #E8E2D9;
    --success: #4CAF50;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--primary-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background-color: var(--primary-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-terracotta);
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-size: 16px;
    background-color: var(--secondary-bg);
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 2px rgba(199, 107, 93, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
}

.action-btn:hover {
    color: var(--accent-terracotta);
}

.action-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-terracotta);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-bottom {
    padding: 15px 0;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-terracotta);
}

.nav-links a.active {
    color: var(--accent-terracotta);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-terracotta);
}

.promo-bar {
    background-color: var(--accent-olive);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 20px 0;
    background-color: var(--secondary-bg);
}

.breadcrumbs-list {
    display: flex;
    list-style: none;
    gap: 10px;
    font-size: 14px;
}

.breadcrumbs-item:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--text-light);
}

.breadcrumbs-item a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs-item a:hover {
    color: var(--accent-terracotta);
}

.breadcrumbs-item:last-child a {
    color: var(--accent-terracotta);
    font-weight: 500;
}

/* Заголовок страницы */
.page-header {
    padding: 30px 0;
    background-color: var(--secondary-bg);
}

.page-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 18px;
}

/* Основной контент каталога */
.catalog-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 40px 0;
}

/* Боковая панель с фильтрами */
.filters-sidebar {
    background-color: var(--primary-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 120px;
    max-width: 100%;
    overflow: hidden;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.filters-title {
    font-size: 18px;
    margin: 0;
}

.reset-filters {
    background: none;
    border: none;
    color: var(--accent-terracotta);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 25px;
    width: 100%;
}

.filter-title {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.filter-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

.filter-options {
    list-style: none;
    width: 100%;
}

.filter-option {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.filter-option input {
    margin-right: 10px;
    flex-shrink: 0;
}

.filter-option label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
}

.filter-option label span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
}

.option-count {
    color: var(--text-light);
    font-size: 14px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ФИКСИРОВАННЫЙ ФИЛЬТР ЦЕНЫ - теперь не выходит за пределы */
.price-range {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
    align-items: center;
}

.price-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    width: calc(50% - 4px);
    box-sizing: border-box;
}

.price-range span {
    color: var(--text-light);
    font-size: 14px;
    flex-shrink: 0;
    padding: 0 4px;
}

/* Кнопка применения фильтров */
.apply-filters {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-terracotta);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.apply-filters:hover {
    background-color: #b55a4d;
}

/* Опции цвета */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--accent-terracotta);
}

/* Основная область каталога */
.catalog-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    color: var(--text-gray);
    font-size: 14px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 14px;
    color: var(--text-gray);
    flex-shrink: 0;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background-color: var(--primary-bg);
    font-size: 14px;
    min-width: 200px;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.view-btn.active {
    background-color: var(--accent-terracotta);
    color: white;
    border-color: var(--accent-terracotta);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* Карточка товара теперь является ссылкой */
.product-card {
    background-color: var(--primary-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Контейнер для изображения товара */
.product-image {
    height: 200px;
    background-color: var(--accent-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Изображение товара */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-terracotta);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-name {
    font-size: 16px;
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
    line-height: 1.4;
    color: var(--text-dark);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stars {
    color: #FFC107;
}

.rating-count {
    color: var(--text-light);
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-terracotta);
}

.old-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.add-to-cart {
    background-color: var(--accent-terracotta);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1;
}

.add-to-cart:hover {
    background-color: #b55a4d;
}

.wishlist-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.wishlist-btn:hover {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.pagination-btn:hover {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
}

.pagination-btn.active {
    background-color: var(--accent-terracotta);
    color: white;
    border-color: var(--accent-terracotta);
}

.pagination-ellipsis {
    padding: 0 10px;
    color: var(--text-light);
    flex-shrink: 0;
}

/* Футер */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: block;
    text-decoration: none;
}

.footer-desc {
    color: #CCCCCC;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: var(--accent-terracotta);
}

.footer-heading {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-terracotta);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    color: #999999;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .catalog-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 30px;
        max-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .price-input {
        width: calc(50% - 4px);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    
    .header-actions {
        gap: 15px;
        width: 100%;
        justify-content: space-around;
    }
    
    .action-btn span:last-child {
        display: block;
        font-size: 11px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        font-size: 14px;
    }
    
    .catalog-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-select {
        min-width: 150px;
        flex-grow: 1;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .price-range {
        flex-wrap: nowrap;
    }
    
    .price-input {
        min-width: 0;
        width: calc(50% - 4px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .filters-sidebar {
        padding: 15px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        height: auto;
        margin-bottom: 8px;
        font-size: 15px;
    }
    
    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .price-range {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-input {
        width: 100%;
    }
    
    .price-range span {
        display: none;
    }
}




/* Стили для ссылок действий в шапке */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s;
    padding: 8px;
    border-radius: 8px;
}

.action-link:hover {
    color: var(--accent-terracotta);
    background-color: var(--accent-beige);
}

.action-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-terracotta);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для ссылок на товары в карточках */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-link:hover {
    color: inherit;
    text-decoration: none;
}

.product-card .product-info {
    padding: 20px;
}

/* Медиа-запросы для ссылок */
@media (max-width: 768px) {
    .header-actions {
        gap: 10px;
    }
    
    .action-link {
        padding: 6px;
        font-size: 11px;
    }
    
    .action-icon {
        font-size: 18px;
        margin-bottom: 3px;
    }
}

@media (max-width: 360px) {
    .header-actions .action-link span:last-child {
        display: none;
    }
    
    .header-actions .action-link {
        padding: 8px;
    }
}