* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    border-bottom: 3px solid var(--main-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.logo img {
    max-height: 60px;
}

.header-contacts {
    text-align: right;
}

.header-contacts a {
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.header-contacts a:hover {
    color: #3498db; /* Синий цвет при наведении */
}

.header-contacts .phone {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50; /* Темно-синий цвет */
}

nav ul {
    display: flex;
    list-style: none;
    padding: 10px 0;
}

nav ul li {
    margin-right: 25px;
}

nav ul li a {
    color: #2c3e50;
    text-decoration: none;
    padding: 15px 0;
    display: block;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db; /* Синий цвет при наведении */
}

.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.breadcrumbs a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #3498db;
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
    padding-left: 20px;
}

.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
    width: 4px;
    background-color: #3498db; /* Синяя акцентная полоса */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(375px, 1fr)); /* Увеличиваем минимальную ширину до 320px */
    gap: 25px; 
    margin-bottom: 50px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12); /* Усиливаем тень */
    transition: all 0.35s ease; /* Плавные переходы */
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 7px 25px rgba(0,0,0,0.18);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%; /* Занимаем всю ширину */
    height: 100%; /* Занимаем всю высоту */
    object-fit: contain; /* Сохраняем пропорции */
    object-position: center; /* Центрируем изображение */
    transition: transform 0.3s ease;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Растягиваем на всю доступную высоту */
    border-top: 3px solid #3498db;
}

.product-info .add-to-cart {
    margin-top: auto;
}

.product-title {
    font-size: 17px;
    color: #2c3e50;
    min-height: 64px; /* Фиксируем высоту для ровности */
    margin-bottom: 12px; 
    line-height: 1.45;
    display: flex;
    align-items: center; /* Центрируем текст по вертикали */
    justify-content: center; /* Центрируем по горизонтали */
    text-align: center; /* Центрируем текст */
    font-weight: 600; /* Полужирный шрифт */
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: #27ae60; /* Зеленый цвет для цен */
    margin-bottom: 20px;
    min-height: 32px; /* Фиксированная высота для цены */
    text-align: center; /* Центрируем цену */
}

.button-container {
    margin-top: auto; /* Прижимаем кнопки к низу */
    display: flex;
    flex-direction: column;
}

.add-to-cart {
    background-color: #3498db; /* Синяя кнопка */
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    margin-top: 0;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart:hover {
    background-color: #2980b9; /* Темно-синий при наведении */
}

footer {
    background-color: #2c3e50; /* Темно-синий фон */
    color: #fff;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-column h3 {
    color: #3498db; /* Синий цвет заголовков */
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #3498db;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}

/* Стили для страницы товара */
.product-detail {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.product-gallery {
    flex: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.main-image {
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 20px;
}

.thumbnails {
    display: flex;
    gap: 10px;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnails img.active, 
.thumbnails img:hover {
    border-color: #3498db;
}

.product-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 25px;
}

.add-to-cart {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-bottom: 30px;
    width: 100%;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

.product-description, 
.product-specs, 
.product-features {
    margin-bottom: 30px;
}

.product-description h2, 
.product-specs h2, 
.product-features h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.product-specs table tr td:first-child {
    font-weight: bold;
    width: 40%;
}

.product-features ul {
    padding-left: 20px;
}

.product-features li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.error-message {
    text-align: center;
    padding: 50px 20px;
}

.error-message i {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message h2 {
    margin-bottom: 30px;
}

.error-message a {
    color: #3498db;
    text-decoration: none;
    font-size: 18px;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 20px;
}

.view-details {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: color 0.3s;
}

.view-details:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Добавляем новые стили для фильтров */
.category-content {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.filters-column {
    flex: 0 0 250px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-options {
    display: grid;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
}

.filter-option input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 15px;
    color: #34495e;
    flex: 1;
}

.price-range {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.price-range input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.price-range button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.price-range button:hover {
    background-color: #2980b9;
}

.products-column {
    flex: 1;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}
    
.pagination button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
    
.pagination button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}
    
.pagination .page-numbers {
    display: flex;
    gap: 5px;
}
    
.pagination .page-number {
    padding: 8px 12px;
    border: 1px solid #3498db;
    border-radius: 5px;
    cursor: pointer;
}
    
.pagination .page-number.active {
    background-color: #3498db;
    color: white;
}

/* Адаптация для меньших экранов */
@media (max-width: 1250px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(320px, 1fr)); /* 2 колонки на средних экранах */
    }
}

/* Добавляем в существующие медиа-запросы */

@media (max-width: 850px) {
    /* Существующие стили */
    .products-grid {
        grid-template-columns: minmax(320px, 1fr); /* 1 колонка на мобильных */
    }
    .product-image {
        height: 180px; /* Чуть уменьшаем высоту на мобильных */
    }
    
    /* Новые стили для адаптации фильтров и товаров */
    .category-content {
        flex-direction: column;
    }
    .filters-column {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    .products-column {
        flex: 0 0 100%;
    }
    
    /* Адаптация полей ввода цены */
    .price-range {
        flex-direction: column;
    }
    .price-range input,
    .price-range button {
        width: 100%;
        margin-bottom: 5px;
    }
    .price-range button {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    /* Существующие стили */
    .products-grid {
        grid-template-columns: 1fr; /* Полная ширина на маленьких экранах */
    } 
    .product-title {
        min-height: auto; /* Убираем фиксированную высоту */
        font-size: 16px;
    }
    .product-image {
        height: 180px;
    }
    
    /* Новые стили для улучшения мобильного отображения */
    .filter-section {
        padding: 15px;
    }
    .price-range input,
    .price-range button {
        padding: 12px;
    }
    
    /* Адаптация шапки */
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    .header-contacts {
        text-align: center;
        margin-top: 10px;
    }
    
    /* Адаптация навигации */
    nav ul {
        flex-direction: column;
    }
    nav ul li {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    /* Адаптация футера */
    .footer-columns {
        grid-template-columns: 1fr;
    }
}