/* Основные стили */
:root {
    --primary-color: #3e6259; /* Приятный зеленый цвет дерева */
    --secondary-color: #d9bf9a; /* Светлый древесный тон */
    --text-color: #333;
    --light-text: #fff;
    --background-light: #f9f6f2;
    --background-dark: #2d4841;
    --accent-color: #c86f3d; /* Теплый древесный акцент */
    --font-main: 'Roboto', sans-serif;
    --font-headers: 'Montserrat', sans-serif;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --gray-dark: #757575;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-main);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--background-light);
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headers);
    margin-bottom: 20px;
}
h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}
p {
    margin-bottom: 15px;
}
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: var(--accent-color);
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block; /* Предотвращает зазоры под изображениями */
}
section {
    padding: 80px 0;
}
.text-center {
    text-align: center;
}
/* Кнопки */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
}
.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}
/* Формы */
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 16px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(62, 98, 89, 0.2);
}
textarea {
    resize: vertical;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
}
.badge.hit {
    background-color: #f8d7da;
    color: #721c24;
}
.badge.sale {
    background-color: rgba(138, 43, 226, 0.15);
    color: #5a1d96;
}
.badge.new {
    background-color: #cce5ff;
    color: #004085;
}
/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 80px;
    width: auto;
    margin-right: 10px;
}
.logo h1 {
    font-size: 24px;
    margin: 0;
    color: var(--primary-color);
}
.logo-link {
    color: var(--primary-color);
    text-decoration: none;
}
/* Стиль для текста логотипа (заменил H1) */
.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* Улучшаем SEO-контент */
.seo-content {
    line-height: 1.6;
}

.seo-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.seo-content ul li {
    margin-bottom: 0.3rem;
}
nav ul {
    display: flex;
}
nav ul li {
    margin-left: 30px;
}
nav ul li a {
    font-weight: 500;
    position: relative;
}
nav ul li a.active, nav ul li a:hover {
    color: var(--accent-color);
}
nav ul li a.active:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
}
.contact-phone a {
    font-weight: 600;
    font-size: 18px;
}
.contact-phone i {
    margin-right: 5px;
    color: var(--accent-color);
}
.contact-address, .contact-hours {
    display: flex;
    align-items: center;
    font-size: 16px;
    margin-bottom: 5px;
}
.contact-phone {
    font-weight: 600;
    margin-bottom: 5px;
}
.contact-address, .contact-hours {
    color: var(--text-color);
    font-weight: 600;
}
.contact-phone a, .contact-address, .contact-hours {
    display: flex;
    align-items: center;
}
.contact-phone i, .contact-address i, .contact-hours i {
    margin-right: 8px;
    color: var(--accent-color);
    font-size: 18px;
    width: auto;
}
.cart-icon a {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 18px;
}
.cart-icon i {
    margin-right: 5px;
    color: var(--accent-color);
}
#cart-count {
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}
.mobile-menu-button {
    display: none;
    font-size: 24px;
    cursor: pointer;
}
.mobile-menu-info {
    display: none;
}
/* Hero section */
.hero {
    background-image: url('../img/ui/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    padding: 40px 0;
    position: relative;
}
.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero-content {
    position: relative;
    max-width: 600px;
    z-index: 1;
}
.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--light-text);
    text-align: left;
}
.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}
.hero-buttons {
    display: flex;
    gap: 15px;
}
.hero-buttons .btn-secondary {
    border-color: var(--light-text);
    color: var(--light-text);
}
.hero-buttons .btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--primary-color);
}
/* Advantages section */
.advantages {
    background-color: white;
}
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.advantage-item {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.advantage-item .icon {
    font-size: 40px;
    color: var(--accent-color);
    margin-bottom: 20px;
}
.advantage-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
}
/* Popular products */
.popular-products {
    background-color: var(--background-light);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.product-image .badge {
    position: absolute;
    left: 10px; /* Смещено влево */
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
    display: block;
    margin-bottom: 5px;
    top: auto; /* Сбрасываем фиксированное значение top */
}
.product-image .badge:nth-of-type(1) {
    top: 10px;
}

.product-image .badge:nth-of-type(2) {
    top: 40px;
}

.product-image .badge:nth-of-type(3) {
    top: 70px;
}
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.product-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
    margin-bottom: 5px;
}
.product-card p {
    padding: 0 20px;
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}
.product-price {
    padding: 0 20px 15px;
    display: flex;
    align-items: center;
}
.price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}
.old-price {
    font-size: 16px;
    color: var(--gray-dark);
    text-decoration: line-through;
    margin-left: 10px;
}
.product-buttons {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.product-buttons .btn,
.product-buttons .btn-secondary {
    flex: 1;
    text-align: center;
    margin: 0;
}
.see-all-button {
    text-align: center;
    margin-top: 40px;
}
/* Promo section */
.promo {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 60px 0;
    text-align: center;
}
.promo h2 {
    color: var(--light-text);
    margin-bottom: 20px;
}
.promo h3 {
    font-size: 24px;
    margin-bottom: 15px;
}
.promo p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}
.promo .btn {
    background-color: var(--light-text);
    color: var(--primary-color);
}
.promo .btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}
/* About preview */
.about-preview {
    background-color: white;
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.about-image img {
    width: 100%;
    height: auto;
    display: block;
}
.about-text h2 {
    text-align: left;
    margin-bottom: 20px;
}
/* Constructor preview */
.constructor-preview {
    background-color: var(--background-light);
    text-align: center;
}
.constructor-examples {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 40px 0;
}
.example {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.example-image {
    height: 100px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.example img {
    max-width: 100%;
    max-height: 280px; /* Добавьте это ограничение по высоте */
    object-fit: contain;
    height: 280px; /* Фиксированная высота изображения */
}
.constructor-examples .example img {
    height: 280px;
    max-height: 280px;
    width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto; /* Центрирование по горизонтали */
    flex-shrink: 0;
    transition: transform 0.3s ease; /* Плавный переход для изображения */
}
.example h3 {
    padding: 20px 20px 10px;
    margin-bottom: 0;
}
.example p {
    padding: 0 20px 20px;
    color: #666;
}
.constructor-examples .example {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease; /* Добавляем плавный переход */
    cursor: pointer; /* Показываем, что элемент кликабельный */
}

.constructor-examples .example:hover {
    transform: translateY(-5px); /* Поднимаем карточку при наведении */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Увеличиваем тень */
}

.constructor-examples .example:hover img {
    transform: scale(1.05); /* Немного увеличиваем изображение при наведении */
}
/* Call to action */
.call-to-action {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 80px 0;
}
.call-to-action h2 {
    color: var(--light-text);
}
.contact-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 30px auto 0;
}
.contact-form input {
    padding: 15px;
    border-radius: 4px;
    border: none;
    flex: 1;
    min-width: 250px;
    font-size: 16px;
}
/* Page title */
.page-title {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 40px 0;
}
.page-title h1 {
    margin: 0;
    text-align: center;
}
.page-title p {
    text-align: center;
    margin: 10px auto 0;
    max-width: 800px;
    opacity: 0.9;
}
/* Breadcrumbs */
.breadcrumbs {
    background-color: white;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-medium);
}
.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin: 0 10px;
    color: var(--gray-dark);
}
.breadcrumbs li:last-child {
    color: var(--gray-dark);
    font-weight: 500;
}
/* Каталог */
.catalog {
    background-color: var(--background-light);
}
.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}
.filters {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    align-self: start;
    position: sticky;
    top: 100px;
}
.filter-block {
    margin-bottom: 25px;
}
.filter-block h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-medium);
}
.filter-block ul li {
    margin-bottom: 10px;
}
.filter-block a {
    color: var(--text-color);
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
}
.filter-block a.active,
.filter-block a:hover {
    color: var(--accent-color);
}
.checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.checkbox-filters label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.checkbox-filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}
.price-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.price-filter input {
    flex: 1;
    min-width: 80px;
}
#price-filter-apply {
    width: 100%;
    margin-top: 10px;
}
#filter-reset {
    width: 100%;
}
.catalog-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}
.catalog-sort label {
    display: inline;
    margin: 0;
}
.catalog-sort select {
    width: auto;
    padding: 8px 30px 8px 10px;
    cursor: pointer;
}
.no-results {
    text-align: center;
    padding: 40px 0;
    color: var(--gray-dark);
}
/* Пагинация */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.pagination-btn {
    display: inline-block;
    background-color: white;
    border: 1px solid var(--gray-medium);
    color: var(--text-color);
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
}
.pagination-btn.active,
.pagination-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
/* Страница товара */
.product-details {
    background-color: white;
    padding: 60px 0;
}
.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.product-gallery {
    position: sticky;
    top: 100px;
}
.main-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.thumbnail:hover {
    opacity: 0.8;
}
.thumbnail.active {
    border-color: var(--primary-color);
}
/* Кнопки навигации для изображений */
.image-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 5;
}
.nav-btn {
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.image-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
}
.zoom-btn {
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.zoom-btn:hover {
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
/* Модальное окно для просмотра изображений */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}
.modal-content {
    background-color: white;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--primary-color);
}
.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-modal:hover {
    color: #333;
}
.modal-image-container {
    display: flex;
    align-items: center;
    position: relative;
}
.modal-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
    height: 500px;
}
.modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.modal-nav-btn {
    background-color: rgba(255, 255, 255, 0.3);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 2;
}
.modal-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.6);
}
#modal-prev {
    left: 15px;
}
#modal-next {
    right: 15px;
}
.modal-counter {
    text-align: center;
    padding: 10px 0 20px;
    color: #666;
    font-size: 14px;
}
.product-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--text-color);
}
.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}
.product-price .price {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}
.product-price .old-price {
    font-size: 20px;
    color: var(--gray-dark);
    text-decoration: line-through;
    margin-left: 15px;
}
.product-options {
    margin-bottom: 30px;
}
.option-block {
    position: relative;
    margin-bottom: 20px;
}

.option-block h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.option-block select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 16px;
    appearance: none; /* Убираем стандартный вид селекта */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path d="M0 0l6 6 6-6z" fill="%23666"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

.option-block select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(62, 98, 89, 0.2);
}

/* Скрываем radio-options по умолчанию */
.radio-options {
    display: none;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

/* Показываем radio-options, когда они активны */
.radio-options.active {
    display: flex;
}
.material-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.material-option {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.material-option img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.material-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(62, 98, 89, 0.2);
}
.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.radio-option {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.radio-option input {
    margin-right: 8px;
    width: auto;
}
.radio-option input:checked + span {
    font-weight: 500;
    color: var(--primary-color);
}
.radio-option:hover {
    border-color: var(--primary-color);
}
.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.quantity-btn:hover {
    background-color: #e0e0e0;
}
.quantity-selector input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    padding: 0;
    font-size: 16px;
}
.product-short-info {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.info-item i {
    width: 30px;
    color: var(--primary-color);
    font-size: 18px;
}
/* Вкладки с описанием товара */
.product-details-tabs {
    margin-top: 40px;
}
.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    position: relative;
}
.tab-btn.active {
    color: var(--primary-color);
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}
.tab-content {
    margin-top: 20px;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.characteristics-table {
    width: 100%;
    border-collapse: collapse;
}
.characteristics-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}
.characteristics-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.characteristics-table td:first-child {
    font-weight: 500;
    width: 40%;
}
/* Похожие товары */
.related-products {
    background-color: var(--background-light);
    padding: 60px 0;
}
/* Корзина */
.cart-content {
    background-color: white;
    padding: 60px 0;
}
.cart-empty-message {
    text-align: center;
    padding: 60px 0;
}
.cart-empty-message i {
    font-size: 60px;
    color: var(--gray-dark);
    margin-bottom: 20px;
}
.cart-empty-message h2 {
    font-size: 28px;
    margin-bottom: 15px;
}
.cart-empty-message p {
    margin-bottom: 25px;
    color: var(--gray-dark);
}
.cart-items {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}
.cart-headers {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 70px;
    background-color: #f5f5f5;
    padding: 15px 20px;
    font-weight: 500;
}
.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 70px;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cart-item-details {
    flex: 1;
}
.cart-item-title {
    font-size: 16px;
    margin-bottom: 5px;
}
.cart-item-title a {
    color: var(--text-color);
}
.cart-item-title a:hover {
    color: var(--primary-color);
}
.cart-item-code {
    font-size: 12px;
    color: var(--gray-dark);
}
.cart-item-options {
    font-size: 14px;
}
.cart-item-options ul {
    padding-left: 0;
    margin: 0;
}
.cart-item-options li {
    margin-bottom: 5px;
    font-size: 13px;
}
.no-options {
    font-size: 13px;
    color: var(--gray-dark);
    font-style: italic;
}
.color-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.cart-item-price {
    font-weight: 500;
}
.cart-item-quantity {
    display: flex;
    justify-content: center;
}
.cart-item-total {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}
.cart-item-actions {
    text-align: center;
}
.remove-item {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}
.cart-summary {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
}
.cart-total h3 {
    margin-bottom: 20px;
    font-size: 20px;
}
.cart-totals-table {
    width: 100%;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.cart-total-sum {
    font-size: 20px;
    font-weight: 700;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
}
.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}
.cart-actions .btn,
.cart-actions .btn-secondary {
    flex: 1;
}

/* Оформление заказа */
.checkout {
    background-color: var(--background-light);
    padding: 60px 0;
}

/* Стили для чекаута с улучшенной адаптацией */
.checkout .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-steps {
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    position: relative;
    flex-wrap: wrap;
}

/* Линия соединения шагов */
.checkout-steps::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 0;
}

.step {
    position: relative;
    text-align: center;
    z-index: 1;
    padding: 0 10px;
    flex: 1;
    min-width: 100px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #e0e0e0;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    border: 2px solid white;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: white;
}

.step.completed .step-number {
    background-color: var(--success-color);
    color: white;
}

.step-title {
    font-size: 14px;
    font-weight: 500;
}

.checkout-content {
    width: 65%;
    margin-right: 5%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    order: 2; /* Порядок для десктопа */
}

.checkout-sidebar {
    width: 30%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    top: 100px;
    align-self: flex-start;
    order: 3; /* Порядок для десктопа */
}

/* Адаптация под планшеты */
@media (max-width: 991px) {
    .checkout-content {
        width: 60%;
    }
    
    .checkout-sidebar {
        width: 35%;
    }
}

/* Адаптация под мобильные */
@media (max-width: 767px) {
    .checkout-steps::before {
        left: 15%;
        width: 70%;
    }
    
    .step {
        min-width: 80px;
        padding: 0 5px;
    }
    
    .step-title {
        font-size: 12px;
    }
    
    .checkout-content {
        width: 100%;
        margin-right: 0;
        order: 2; /* Форма всегда вторая на мобильном */
    }
    
    .checkout-sidebar {
        width: 100%;
        margin-top: 20px;
        order: 3; /* Боковая панель всегда третья на мобильном */
        position: static; /* Отключаем sticky на мобильном */
    }
}

/* Исправление адаптации checkout-steps без полос прокрутки */
@media (max-width: 480px) {
    .checkout-steps {
        display: flex;
        flex-wrap: wrap; 
        justify-content: center;
        margin-bottom: 25px;
        width: 100%;
        overflow: hidden; /* Убираем прокрутку */
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        position: relative;
        width: 23%; /* Немного уменьшаем ширину */
        min-width: auto; /* Убираем минимальную ширину */
        margin: 0 1% 15px;
        padding: 0;
        box-sizing: border-box;
    }
    
    /* Уменьшаем соединительные линии */
    .step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 15px;
        right: -10%;
        width: 20%;
        height: 2px;
        background-color: #e0e0e0;
    }
    
    .step.active:not(:last-child)::after {
        background-color: var(--primary-color);
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin: 0 auto 8px;
    }
    
    .step-title {
        font-size: 11px;
        word-break: break-word; /* Разбиваем длинные слова */
        text-align: center;
        padding: 0 2px;
        line-height: 1.2;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 374px) {
    .step {
        width: 48%; /* 2 шага в строку */
        margin: 0 1% 10px;
    }
    
    .step:not(:last-child)::after {
        display: none; /* Убираем соединительные линии */
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    /* Показываем только активный шаг и следующий */
    .step:not(.active):not(.active + .step) {
        opacity: 0.7;
    }
    
    .step.active {
        order: 1; /* Первым идет активный шаг */
    }
    
    .step.active + .step {
        order: 2; /* Вторым идет следующий шаг */
    }
    
    /* Остальные шаги показываем в конце */
    .step:not(.active):not(.active + .step) {
        order: 3;
    }
}

/* Для экстремально узких экранов */
@media (max-width: 320px) {
    .step-title {
        font-size: 10px;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Общие стили для чекаута */
.checkout-step {
    animation: fadeIn 0.3s ease;
}

.checkout-cart-items {
    margin-bottom: 20px;
}

.checkout-cart-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-medium);
    align-items: center;
}

.checkout-item-image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.checkout-item-details {
    flex: 1;
}

.checkout-item-total {
    font-weight: bold;
    margin-left: 15px;
    white-space: nowrap;
}

/* Стили для форм */
.checkout-form .form-group {
    margin-bottom: 20px;
}

.checkout-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.checkout-form .form-row .form-group {
    flex: 1;
}

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.checkout-form label .required {
    color: var(--danger-color);
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для методов доставки и оплаты */
.delivery-methods,
.payment-methods {
    margin-bottom: 30px;
}

.delivery-method,
.payment-method {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.delivery-method input,
.payment-method input {
    display: none;
}

.delivery-method label,
.payment-method label {
    display: flex;
    padding: 15px;
    margin: 0;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.delivery-method input:checked + label,
.payment-method input:checked + label {
    background-color: #f0f7f4;
    border-left: 4px solid var(--primary-color);
}

.delivery-name,
.payment-name {
    flex: 1;
    font-weight: bold;
}

.delivery-price {
    color: var(--primary-color);
    font-weight: bold;
}

.delivery-description,
.payment-description {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
}

/* Подтверждение заказа */
.order-summary-card {
    margin-bottom: 30px;
}

.order-summary-card h3 {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 18px;
}

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-medium);
}

.sidebar-items {
    margin-bottom: 20px;
}

.sidebar-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-item-name {
    flex: 1;
    padding-right: 10px;
}

.sidebar-totals {
    margin-top: 15px;
}

.sidebar-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sidebar-total-sum {
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.agreement {
    margin-top: 30px;
    margin-bottom: 20px;
}

.agreement label {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
}

.agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 10px 0 0;
    flex-shrink: 0;
}

.agreement a {
    color: var(--primary-color);
    text-decoration: underline;
    display: inline;
    margin: 0;
    padding: 0;
}

.agreement a:hover {
    color: var(--accent-color);
}

/* Исправляем возможные проблемы с переносами внутри текста */
.agreement span, .agreement p {
    display: inline;
    white-space: normal;
    word-break: normal;
}

.checkout-step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.order-success {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    font-size: 60px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-icon i {
    animation: scaleUp 0.5s ease;
}

.order-success h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.order-success p {
    margin-bottom: 10px;
}

.success-buttons {
    margin-top: 30px;
}

.checkout-help {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.checkout-help h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.checkout-help p {
    font-size: 14px;
    margin-bottom: 15px;
}

.help-contact {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.help-contact i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

/* Конструктор мебели */
.constructor-intro {
    text-align: center;
}
.constructor-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.constructor-category {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}
.constructor-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.constructor-category-image {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.constructor-category img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.constructor-category h3 {
    padding: 20px 20px 10px;
    margin-bottom: 0;
}
.constructor-category p {
    padding: 0 20px 20px;
    color: #666;
}
.constructor-back {
    margin-bottom: 20px;
}
.constructor-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}
.constructor-products {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.constructor-products h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.constructor-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}
.constructor-product {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.constructor-product:hover {
    border-color: var(--primary-color);
    background-color: #f9f9f9;
}
.constructor-product.selected {
    border-color: var(--primary-color);
    background-color: #f0f7f4;
}
.constructor-product .product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.constructor-product .product-info {
    flex: 1;
}
.constructor-product .product-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}
.constructor-product .product-price {
    margin-bottom: 0;
    padding: 0;
}
.constructor-preview {
    background-color: var(--background-light);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}
.preview-image {
    height: 400px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.preview-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: left;
}
.preview-description {
    margin-top: 15px;
}
.constructor-options {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.constructor-options h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.constructor-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}
/* Как работает конструктор */
.how-it-works {
    background-color: white;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.step-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--background-light);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.step-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}
.step-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}
.step-item p {
    color: #666;
    font-size: 14px;
}

/* Стили для страницы материалов */
.materials-content {
    background-color: var(--background-light);
    padding: 60px 0;
}

/* Восстановленная начальная сетка материалов (3 колонки) */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.material-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.material-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-light);
    position: relative;
}

.material-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.material-card:hover .material-image img {
    transform: scale(1.05);
}

.material-info {
    padding: 20px;
    text-align: center;
}

.material-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.material-info p {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 0;
}

.materials-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
}

.materials-loading i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.materials-loading p {
    color: var(--gray-dark);
}

.material-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: var(--gray-dark);
}

/* Модальное окно для просмотра материалов */
.material-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.material-modal-content {
    background-color: white;
    margin: 5% auto;
    max-width: 90%;
    width: 1200px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.material-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.material-modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-material-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray-dark);
}

.close-material-modal:hover {
    color: var(--primary-color);
}

.material-modal-body {
    padding: 20px;
    position: relative;
}

/* Режим сетки для десктопа */
.material-gallery {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
}

.material-image-item {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.material-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.material-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-image-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    font-size: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.material-image-item:hover .material-image-description {
    opacity: 1;
}

/* Режим слайдера для мобильных устройств */
.material-slider {
    display: none;
    position: relative;
    height: auto;
    width: 100%;
}

.material-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.material-slide.active {
    display: flex;
}

.material-slide img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.material-slide-description {
    margin-top: 15px;
    text-align: center;
    padding: 0 10px;
    width: 100%;
}

.material-navigation {
    display: none;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
}

.material-nav-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
}

.material-counter {
    display: none;
    text-align: center;
    margin-top: 10px;
    color: var(--gray-dark);
}

/* Адаптивность для начальной страницы материалов */
@media (max-width: 992px) {
    .materials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .materials-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Медиа-запросы для переключения режимов в модальном окне */
@media (max-width: 768px) {
    .material-modal-content {
        width: 95%;
        margin: 0 auto; /* Убираем верхний отступ */
        position: relative;
        top: 50%;
        transform: translateY(-50%);
        max-height: none; /* Убираем ограничение высоты */
        overflow-y: visible; /* Убираем прокрутку */
    }
    
    /* Скрываем сетку и показываем слайдер */
    .material-gallery {
        display: none;
    }
    
    .material-slider {
        display: block;
    }
    
    .material-navigation {
        display: flex;
    }
    
    .material-counter {
        display: block;
    }
    
    .material-nav-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .material-modal-content {
        margin: 5% auto;
    }
    
    .material-nav-btn {
        width: 32px;
        height: 32px;
    }
}
.help-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}
.help-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}
.help-navigation {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.help-navigation h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}
.help-navigation ul li {
    margin-bottom: 10px;
}
.help-navigation ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
}
.help-navigation ul li a:hover {
    color: var(--primary-color);
    background-color: rgba(62, 98, 89, 0.05);
}
.help-navigation ul li a.active {
    background-color: var(--primary-color);
    color: white;
}
.help-contacts {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}
.help-contacts h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.help-contact-methods {
    margin-top: 15px;
}
.help-contact {
    margin-bottom: 10px;
}
.help-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}
.help-section {
    display: none;
}
.help-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.help-section h2 {
    font-size: 32px;
    color: var(--text-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}
.help-item {
    margin-bottom: 40px;
}
.help-item:last-child {
    margin-bottom: 0;
}
.help-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.help-item h4 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}
.help-item p {
    margin-bottom: 15px;
}
.help-item ul, .help-item ol {
    margin-left: 20px;
    margin-bottom: 15px;
}
.help-item ul li, .help-item ol li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}
.help-item ul li {
    list-style-type: disc;
}
.help-item ol li {
    list-style-type: decimal;
}
.faq-item h3 {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 18px;
    position: relative;
    cursor: pointer;
}
.faq-content {
    padding: 15px 20px;
    display: none;
}
.faq-content.active {
    display: block;
}
/* Footer */
footer {
    background-color: var(--background-dark);
    color: var(--light-text);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.footer-logo {
    height: 40px;
    margin-bottom: 15px;
}
.footer-nav h4, .footer-contacts h4, .footer-social h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.footer-nav ul li {
    margin-bottom: 10px;
}
.footer-nav a, .footer-contacts a {
    color: var(--light-text);
    opacity: 0.8;
}
.footer-nav a:hover, .footer-contacts a:hover {
    opacity: 1;
    color: var(--secondary-color);
}
.footer-contacts p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.footer-contacts i {
    margin-right: 10px;
    color: var(--secondary-color);
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: var(--light-text);
    font-size: 24px;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}
/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleUp {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
/* Медиа-запросы для лучшей адаптивности */
/* Большие десктопы (больше 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}
/* Средние десктопы (1200-1399px) */
@media (max-width: 1399px) {
    .hero-content h2 {
        font-size: 42px;
    }
    .product-content {
        gap: 30px;
    }
}
/* Малые десктопы (992-1199px) */
@media (max-width: 1199px) {
    section {
        padding: 70px 0;
    }
    .products-grid {
        gap: 20px;
    }
    .catalog-layout {
        grid-template-columns: 220px 1fr;
        gap: 25px;
    }
    .help-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    .constructor-layout {
        grid-template-columns: 250px 1fr;
    }
    .checkout-steps::before {
        left: 15%;
        width: 70%;
    }
    .step-title {
        font-size: 13px;
    }
}
/* Планшеты (768-991px) */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 250px;
        --sidebar-collapsed-width: 0;
    }
    .header-contact-info {
        display: none;
    }
    /* Улучшенные стили для мобильного меню */
    header .container {
        flex-wrap: wrap;
    }
    header nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 1000;
        padding: 6rem 2rem 2rem;
        box-sizing: border-box;
        overflow-y: auto;
    }
    header.mobile-menu-active nav {
        display: block;
        animation: fadeIn 0.3s ease;
        height: 350vh;
        overflow-y: auto;
    }
    header nav ul {
        flex-direction: column;
        width: 100%;
        margin-bottom: 2rem;
    }
    header nav ul li {
        width: 100%;
        margin: 0;
        padding: 0;
        opacity: 0;
        transform: translateY(20px);
        animation: slideIn 0.1s forwards;
    }
    header.mobile-menu-active nav ul li:nth-child(1) { animation-delay: 0.01s; }
    header.mobile-menu-active nav ul li:nth-child(2) { animation-delay: 0.02s; }
    header.mobile-menu-active nav ul li:nth-child(3) { animation-delay: 0.03s; }
    header.mobile-menu-active nav ul li:nth-child(4) { animation-delay: 0.04s; }
    @keyframes slideIn {
        to { opacity: 1; transform: translateY(0); }
    }
    header nav ul li a {
        display: block;
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
        font-size: 1.2rem;
        font-weight: 500;
        transition: color 0.3s ease;
    }
    header nav ul li a:hover,
    header nav ul li a.active {
        color: var(--primary-color);
    }
    /* Добавляем дополнительную информацию в меню */
    .mobile-menu-info {
        display: none;
        color: white;
        margin-top: 3rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 2rem;
        text-align: center;
    }
    header.mobile-menu-active .mobile-menu-info {
        display: block;
        opacity: 0;
        animation: fadeIn 0.01s forwards 0.01s;
    }
    .mobile-menu-info div {
        margin-bottom: 1rem;
    }
    .mobile-menu-info i {
        margin-right: 0.5rem;
        color: var(--primary-color);
    }
    .mobile-menu-info .menu-phone a {
        color: white;
        font-weight: bold;
        font-size: 1.1rem;
    }
    .mobile-menu-info .menu-phone a:hover {
        color: var(--primary-color);
    }
    .mobile-menu-info .menu-address,
    .mobile-menu-info .menu-hours {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }
    .contact-phone {
        margin-right: auto;
    }
    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        width: 40px;
        height: 40px;
        position: relative;
        z-index: 1001;
    }
    /* Стиль для иконки гамбургер-меню */
    header.mobile-menu-active .mobile-menu-button {
    color: white;
    }
    
    header.mobile-menu-active .mobile-menu-button .fa-bars:before {
        content: "\f00d"; /* Иконка крестика */
        color: white; /* Белый цвет крестика */
        font-size: 32px;
    }
}
/* Малые планшеты и большие смартфоны (576-674px) */
@media (max-width: 674px) {
    header .container {
        padding: 10px 15px;
    }
    .logo img {
        height: 40px;
    }
    .logo h1 {
        font-size: 20px;
    }
    h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    .contact-phone {
        font-size: 16px;
    }
    .hero {
        padding: 80px 0;
        text-align: center;
    }
    .hero-content {
        margin: 0 auto;
    }
    .hero-content h2 {
        font-size: 28px;
    }
    .hero-buttons {
        justify-content: center;
    }
    section {
        padding: 50px 0;
    }
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .catalog-layout {
        grid-template-columns: 1fr;
    }
        .about-content {
        display: flex;
        flex-direction: column;
    }
    .about-image {
        order: 1; /* Отображается первым */
        margin-bottom: 30px;
    }
    .about-text {
        order: 2; /* Отображается вторым */
    }
    .about-text h2 {
        text-align: center;
    }
    .filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-bottom: 100px;
    }
    .filters.active {
        left: 0;
    }
    .filter-close {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 20px;
        background: none;
        border: none;
        cursor: pointer;
    }
    .product-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .product-gallery {
        order: 1; /* Размещаем галерею первой */
        position: static;
        margin-bottom: 0;
    }
    .product-info {
        order: 2; /* Размещаем информацию после галереи */
    }
    .main-image {
        height: 300px; /* Регулируем высоту изображения для мобильных устройств */
    }
    .thumbnails {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
    }
    .thumbnail {
        flex: 0 0 50px;
        height: 50px;
        margin-bottom: 0;
    }
    .nav-btn {
        width: 35px;
        height: 35px;
        background-color: rgba(255, 255, 255, 0.8);
    }
    .product-actions {
        margin-top: 15px;
        flex-wrap: nowrap;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .quantity-selector {
        width: 100%;
        max-width: 150px; /* Ограниченная ширина */
        margin: 0 auto 15px; /* Центрирование */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .product-actions .btn,
    .product-actions .btn-secondary {
        padding: 12px 15px;
        width: 100%;
    }
    /* Отступ для заголовка после перестроения */
    .product-info h1 {
        margin-top: 0;
    }
    .cart-headers {
        display: none;
    }
    .cart-item {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
        position: relative;
    }
    .cart-item-actions {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    .cart-item-total {
        font-size: 16px;
    }
    .cart-item-options,
    .cart-item-price,
    .cart-item-quantity,
    .cart-item-total {
        padding-left: 0;
    }
    .cart-summary {
        margin-top: 20px;
    }
    .help-layout {
        grid-template-columns: 1fr;
    }
    .help-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    .constructor-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .constructor-layout {
        grid-template-columns: 1fr;
    }
    .preview-image {
        height: 350px;
    }
}
/* Смартфоны (до 575px) */
@media (max-width: 575px) {
    h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    .hero-content h2 {
        font-size: 24px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .advantage-item {
        padding: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    .footer-company {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-contacts p {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .product-image {
        height: 200px;
    }
    .catalog-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .catalog-sort {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    .catalog-sort label {
        margin-bottom: 5px;
    }
    .search-box {
        width: 100%;
    }
    .product-details-tabs .tab-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
    .thumbnails {
        justify-content: flex-start;
        gap: 8px;
    }
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    .nav-btn {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    .cart-actions .btn,
    .cart-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .modal-header h3 {
        font-size: 16px;
    }
    .modal-image img {
        max-height: 300px;
    }
}
/* Маленькие смартфоны (до 400px) */
@media (max-width: 400px) {
    .logo h1 {
        font-size: 18px;
    }
    .contact-phone {
        display: none;
    }
    .hero-content h2 {
        font-size: 22px;
    }
    .product-buttons {
        flex-direction: column;
    }
    .product-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    .modal-nav-btn {
        width: 22px;
        height: 22px;
    }
    #modal-prev {
        left: 5px;
    }
    #modal-next {
        right: 5px;
    }
}
/* Поддержка горизонтальной ориентации на мобильных устройствах */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }
    .modal-image img {
        max-height: 200px;
    }
    .filters {
        padding-top: 60px;
    }
}
/* Улучшения для touch-устройств */
@media (hover: none) {
    .nav-btn,
    .zoom-btn {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.8);
    }
    .product-card:hover {
        transform: none;
    }
    .product-card:active {
        transform: translateY(-2px);
    }
}
/* Исправления для печати */
@media print {
    header, footer, .breadcrumbs, .sidebar,
    .product-actions, .related-products,
    .checkout-steps, .cart-actions, nav,
    .mobile-menu-button {
        display: none !important;
    }
    body {
        background-color: white;
    }
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    .product-content, .cart-items, .checkout-content,
    .order-details-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .product-gallery img, .cart-item-image img {
        max-height: 200px;
    }
    a {
        text-decoration: none !important;
        color: black !important;
    }
    .order-success {
        text-align: center;
    }
}