: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;
}

.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;
}

/* Заголовок раздела */
.category-header {
    margin-bottom: 30px;
}

.category-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.category-description {
    color: var(--text-gray);
    max-width: 800px;
    line-height: 1.7;
}

/* Контент страницы */
.page-content {
    display: flex;
    gap: 30px;
    margin-bottom: 80px;
}

/* Сайдбар с фильтрами */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.filter-section {
    background-color: var(--primary-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filter-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.filter-options {
    list-style: none;
}

.filter-option {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.filter-option input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-terracotta);
}

.filter-option label {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.filter-count {
    color: var(--text-light);
    font-size: 14px;
}

.price-range {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 14px;
}

.apply-filters {
    background-color: var(--accent-terracotta);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    width: 100%;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.apply-filters:hover {
    background-color: #b55a4d;
}

/* Основная область с товарами */
.products-area {
    flex: 1;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background-color: var(--secondary-bg);
    border-radius: 10px;
}

.products-count {
    color: var(--text-gray);
    font-size: 14px;
}

.sort-options select {
    padding: 8px 15px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.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;
}

.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;
}

.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;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
}

.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;
}

.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;
}

.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;
    margin-right: 10px;
}

.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;
}

.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: 40px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--secondary-bg);
}

.pagination .active {
    background-color: var(--accent-terracotta);
    color: white;
}

/* Подкатегории */
.subcategories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.subcategory-card {
    background-color: var(--primary-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-dark);
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.subcategory-image {
    height: 120px;
    background-color: var(--accent-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.subcategory-info {
    padding: 15px;
    text-align: center;
}

.subcategory-name {
    font-size: 16px;
    margin-bottom: 5px;
}

/* Футер */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 0;
}

.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) {
    .page-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .subcategories {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid, .subcategories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-top {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
    }
}

@media (max-width: 480px) {
    .products-grid, .subcategories {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Стили для изображений в подкатегориях */
.subcategory-image {
    height: 120px;
    background-color: var(--accent-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.subcategory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.subcategory-card:hover .subcategory-image img {
    transform: scale(1.05);
}

/* Стили для изображений в товарах */
.product-image {
    height: 200px;
    background-color: var(--accent-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Адаптивность изображений */
@media (max-width: 1024px) {
    .product-image {
        height: 180px;
    }
    
    .subcategory-image {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 160px;
    }
    
    .subcategory-image {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 200px;
    }
    
    .subcategory-image {
        height: 100px;
    }
}



/* Стили для ссылок действий в шапке */
.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;
    }
}