/* Базовые стили */

/* Экран брендов */
.brands-content {
    padding: 20px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    /* Отключаем горизонтальные свайпы */
    touch-action: pan-y;
    /* Предотвращаем проваливание контента */
    box-sizing: border-box;
    position: relative;
}

/* Специальные стили для экрана брендов */
#brands-screen {
    overflow: visible;
}

#brands-screen .brands-content {
    flex: 1;
    overflow-y: auto;
    /* Кастомный скроллбар для лучшего UX */
    scrollbar-width: thin;
    scrollbar-color: #6B8E6B #f0f0f0;
}

/* Кастомный скроллбар для WebKit браузеров */
#brands-screen .brands-content::-webkit-scrollbar {
    width: 6px;
}

#brands-screen .brands-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

#brands-screen .brands-content::-webkit-scrollbar-thumb {
    background: #6B8E6B;
    border-radius: 3px;
}

#brands-screen .brands-content::-webkit-scrollbar-thumb:hover {
    background: #5a7a5a;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Индикатор загрузки брендов */
.brands-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.brands-loading-indicator .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.brands-loading-indicator p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Прогресс-бар для загрузки товаров брендов */
.loading-progress {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    color: #666;
    font-size: 14px;
    margin: 0;
    text-align: center;
}

.brand-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #6B8E6B;
}

.brand-card:active {
    transform: translateY(0);
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.empty-brands-content {
    text-align: center;
    padding: 60px 20px;
}

.empty-brands-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-brands-content h3 {
    font-size: 20px;
    color: #666;
    margin: 0 0 10px;
}

.empty-brands-content p {
    color: #999;
    margin: 0;
}

/* Стили для пустых категорий */
.empty-category {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-category h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 18px;
}

.empty-category p {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Фильтры */
.filters-container {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
}

.brand-filter {
    margin-bottom: 15px;
    display: none; /* Скрываем по умолчанию */
}

.brand-filter.hidden {
    display: none;
}

.brand-filter-chip {
    display: inline-flex;
    align-items: center;
    background: #6B8E6B;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    gap: 8px;
}

.brand-filter-label {
    font-weight: 500;
}

.brand-filter-name {
    font-weight: 600;
}

.brand-filter-remove {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.brand-filter-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Адаптивность для брендов */
@media (max-width: 480px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .brand-card {
        padding: 15px;
    }
    
    .brand-name {
        font-size: 14px;
    }
    
    .brands-content {
        padding: 15px;
        max-height: calc(100vh - 50px);
    }
}

/* Специальные стили для мини-аппа Telegram */
@media (max-width: 400px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .brand-card {
        padding: 12px;
    }
    
    .brand-name {
        font-size: 13px;
    }
    
    .brands-content {
        padding: 12px;
        max-height: calc(100vh - 45px);
    }
}

/* Модальное меню бургера - современный дизайн */
.burger-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.burger-menu-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.burger-menu-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.burger-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.burger-menu-content {
    position: relative;
    background: white;
    width: 300px;
    height: 100%;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.burger-menu-modal:not(.hidden) .burger-menu-content {
    transform: translateX(0);
}

/* Минималистичный верхний бар */
.burger-menu-top-bar {
    height: 4px;
    background: linear-gradient(90deg, #6B8E6B 0%, #8FBC8F 100%);
    flex-shrink: 0;
}

/* Основное содержимое меню */
.burger-menu-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Пункты меню */
.burger-menu-items {
    padding: 24px 0 16px 0;
    flex: 1;
}

.burger-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    color: #2c3e50;
    transition: all 0.2s ease;
    gap: 16px;
    position: relative;
    border-radius: 0;
}

.burger-menu-item:hover {
    background: linear-gradient(90deg, rgba(107, 142, 107, 0.08) 0%, rgba(107, 142, 107, 0.04) 100%);
    color: #6B8E6B;
    transform: translateX(4px);
}

.burger-menu-item:active {
    transform: translateX(2px);
    background: linear-gradient(90deg, rgba(107, 142, 107, 0.12) 0%, rgba(107, 142, 107, 0.06) 100%);
}

.burger-menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.burger-menu-item:hover .burger-menu-icon {
    transform: scale(1.1);
}

.burger-menu-text {
    font-size: 16px;
    font-weight: 500;
    color: inherit;
    letter-spacing: 0.3px;
}

/* Разделитель */
.burger-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 20%, #e0e0e0 80%, transparent 100%);
    margin: 8px 24px;
}

/* Футер с кнопкой закрытия */
.burger-menu-footer {
    padding: 16px 24px 24px 24px;
    flex-shrink: 0;
}

.burger-menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.burger-menu-close-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.burger-menu-close-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.burger-menu-close-icon {
    font-size: 14px;
    opacity: 0.7;
}

.burger-menu-close-text {
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Индикатор загрузки для брендов */
.brand-loading-indicator {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #6B8E6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-loading-indicator h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.brand-loading-indicator p {
    color: #666;
    margin: 0;
    font-size: 14px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    height: 100vh;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100vw;
    overflow: hidden;
}

#app {
    position: relative;
    height: 100vh;
    width: 100vw;
    background: #fff;
    overflow: hidden;
}

/* Экраны */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Отключаем свайпы и жесты */
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Ограничиваем высоту для Android */
    max-height: 100vh;
    box-sizing: border-box;
}

.screen.active {
    transform: translateX(0);
    display: flex !important;
}

.screen.prev {
    transform: translateX(-100%);
}

/* Шапка */
.header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px clamp(15px, 4vw, 40px);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.burger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.burger-line {
    width: 20px;
    height: 2px;
    background: #333;
    transition: 0.3s;
}

.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: #6B8E6B;
    font-weight: bold;
}

.app-title,
.screen-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    text-align: center;
    margin: 0 10px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
    margin: 0 35px 0 5px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #6B8E6B;
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.1);
}

.search-input::placeholder {
    color: #999;
    font-size: 13px;
}

.search-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #666;
}

.cart-container {
    position: relative;
}

.cart-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.cart-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cart-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.cart-icon {
    width: 24px;
    height: 24px;
    color: #333;
    fill: currentColor;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #6B8E6B;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(107, 142, 107, 0.3), 0 1px 2px rgba(0,0,0,0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cart-badge.hidden {
    display: none;
}

.cart-total {
    font-weight: bold;
    color: #6B8E6B;
}

/* Основной контент */
.main-content,
.catalog-content,
.products-content,
.cart-content {
    padding: 20px clamp(15px, 4vw, 40px);
    width: 100%;
    flex: 1;
    /* Отключаем горизонтальные свайпы */
    touch-action: pan-y;
    overflow-y: auto;
    overflow-x: hidden;
    /* Ограничиваем высоту для Android */
    max-height: calc(100vh - 60px);
    box-sizing: border-box;
    /* Предотвращаем проваливание контента */
    position: relative;
}

/* Главный экран - Hero секция */
.hero-section {
    position: relative;
    height: 400px;
    background-image: url('images/1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 16px;
}

/* Fallback для фонового изображения */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-section[data-bg-error="true"]::before {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
    color: white;
}

.hero-logo {
    margin-bottom: 15px;
}

.hero-logo img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.hero-title {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(14px, 3vw, 16px);
    margin-bottom: 25px;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    line-height: 1.4;
}

.hero-catalog-btn {
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    display: inline-block;
    text-decoration: none;
    min-width: 160px;
    text-align: center;
}

.hero-catalog-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(107, 142, 107, 0.6);
    background: linear-gradient(135deg, #7BA07B 0%, #5A7A5A 100%);
}

.hero-catalog-btn:active {
    transform: translateY(-1px);
}

/* Блок "О компании" */
.about-section {
    margin: 40px 0;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.about-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.about-text h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.about-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 12px;
    text-align: left;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Блок "Контакты" */
.contacts-section {
    margin: 40px 0;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.3s;
}

.contacts-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contacts-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 2px 0;
}

.contact-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-text {
    font-size: 16px;
    line-height: 1.5;
    color: #666;
    flex: 1;
}

/* Блок "Консультация" */
.consultation-section {
    margin: 40px 0;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

.consultation-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.consultation-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.consultation-text h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.consultation-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 12px;
    text-align: left;
}

.consultation-text p:last-of-type {
    margin-bottom: 20px;
}

.consultation-btn-container {
    text-align: center;
}

.consultation-btn {
    display: inline-block;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    width: auto;
    box-sizing: border-box;
}

.consultation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    color: white;
}

.consultation-btn:active {
    transform: translateY(0);
}

/* Список категорий */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: fit-content;
}

.category-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-item:hover {
    background: #f8f9fa;
    border-color: #6B8E6B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.category-arrow {
    font-size: 18px;
    color: #6B8E6B;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 170px);
    gap: 15px;
    padding-bottom: 20px;
    justify-content: center;
    min-height: fit-content;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    width: 170px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.product-image {
    width: 170px;
    height: 170px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
}

.product-image img {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #6B8E6B;
    margin-bottom: 10px;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 8px;
    height: 40px;
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    opacity: 0.9;
}

/* Корзина */
.cart-section {
    margin-bottom: 30px;
}

.cart-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.cart-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    min-height: 100px;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #f5f5f5;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 500;
    color: #999;
    margin: 0;
    line-height: 1.3;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    justify-content: flex-end;
    min-width: 200px; /* Фиксированная ширина для выравнивания */
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    width: 90px; /* Фиксированная ширина вместо min-width */
    justify-content: center;
    flex-shrink: 0; /* Не сжимается */
}

.quantity-btn {
    background: #6B8E6B;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background: #5A7A5A;
    transform: scale(1.1);
}

.quantity {
    font-weight: 700;
    color: #333;
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.item-total {
    font-weight: 700;
    color: #333;
    font-size: 16px;
    width: 80px; /* Фиксированная ширина вместо min-width */
    text-align: right;
    flex-shrink: 0;
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* Пустая корзина */
.cart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.empty-cart-content {
    text-align: center;
    max-width: 300px;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart-icon svg {
    width: 100%;
    height: 100%;
}

.empty-cart-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.empty-cart-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Футер корзины */
.cart-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #f0f0f0;
    position: sticky;
    bottom: 0;
}

.cart-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cart-total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #6B8E6B;
}

.proceed-btn {
    width: 100%;
    background: #6B8E6B;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.proceed-btn:hover {
    background: #5A7A5A;
    transform: translateY(-1px);
}

.proceed-btn:active {
    transform: translateY(0);
}

.remove-item-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart-content {
    max-width: 300px;
    margin: 0 auto;
}

.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-cart-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.continue-shopping-btn {
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
}

.continue-shopping-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

.cart-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 25px clamp(15px, 4vw, 40px);
    border-top: 1px solid #e0e0e0;
    margin: 0 -20px -20px;
    margin-left: calc(-1 * clamp(15px, 4vw, 40px));
    margin-right: calc(-1 * clamp(15px, 4vw, 40px));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.total-price {
    text-align: center;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.checkout-btn {
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    text-align: center;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

/* Страница оформления заказа */
.checkout-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    max-width: 500px;
    margin: 0 auto;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Предотвращаем проваливание контента */
    box-sizing: border-box;
    position: relative;
}

.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-sidebar {
    flex: 0 0 350px;
    min-width: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-align: left;
}

.payment-method-section,
.customer-info-section {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-option:hover {
    border-color: #6B8E6B;
    background: #f8fffe;
}

.payment-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #6B8E6B;
}

.payment-option input[type="radio"]:checked + .payment-option-content {
    color: #6B8E6B;
}

.payment-option:has(input:checked) {
    border-color: #6B8E6B;
    background: #f8fffe;
}

.payment-option-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.payment-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.payment-description {
    font-size: 14px;
    color: #666;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    flex: 1;
    min-width: 0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6B8E6B;
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #6B8E6B;
}

/* Убираем стили для delivery-fields, так как поля теперь всегда видны */

.order-summary {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    overflow: hidden;
}

.order-summary-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 150px;
    overflow-y: auto;
    flex-shrink: 0;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.checkout-item-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #e0e0e0;
    flex-shrink: 0;
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.checkout-item-details {
    font-size: 13px;
    color: #6B8E6B;
    font-weight: 500;
}

.checkout-item-total {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
    min-width: 80px;
}

.empty-cart-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.order-total {
    border-top: 2px solid #6B8E6B;
    padding-top: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
    margin-top: auto;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Кнопка теперь внутри order-summary */

.place-order-btn {
    width: 100%;
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    flex-shrink: 0;
    margin-top: auto;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

/* Модалка */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Принудительное позиционирование для Android */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: opacity;
    /* Жесткое центрирование для Android */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal.show {
    opacity: 1;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    max-width: clamp(280px, 30vw, 350px);
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.modal-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* Модалка товара */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    /* Принудительное позиционирование для Android */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

.product-modal-content {
    background: white;
    border-radius: 16px;
    width: 450px; /* Фиксированная ширина */
    max-height: 90vh;
    overflow: hidden; /* Убираем скролл с контейнера */
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    z-index: 1;
    transition: background-color 0.2s;
}

.product-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.product-modal-image {
    width: 100%;
    height: 60vh; /* Герой-зона занимает 60% высоты экрана */
    min-height: 300px;
    max-height: 500px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    flex-shrink: 0; /* Не сжимается */
    position: relative;
    padding: 20px; /* Добавляем отступы для картинки */
}

.product-modal-image img {
    max-width: calc(100% - 40px); /* Учитываем padding */
    max-height: calc(100% - 40px); /* Учитываем padding */
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
    border-radius: 8px; /* Добавляем скругление для картинки */
}

/* Лоадер для изображения */
.product-modal-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6B8E6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal-image.loading::before {
    opacity: 1;
}

.product-modal-image.loading img {
    opacity: 0;
}

/* Плейсхолдер для отсутствующего изображения */
.product-modal-image.no-image::after {
    content: 'Нет изображения';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    text-align: center;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.product-modal-info {
    padding: 20px;
    flex: 1; /* Занимает оставшееся место */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Убираем переполнение */
    min-height: 0; /* Позволяем flex-элементу сжиматься */
}

.product-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    flex-shrink: 0; /* Не сжимается */
}

.product-modal-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
    flex: 1; /* Занимает оставшееся место */
    overflow-y: auto; /* Скролл внутри описания */
    padding-right: 10px;
    margin-right: -10px; /* Компенсируем padding */
    min-height: 0; /* Позволяем flex-элементу сжиматься */
}

.product-modal-description p {
    margin: 0 0 12px 0;
}

.product-modal-description p:first-child {
    margin-top: 0;
}

.product-modal-description p:last-child {
    margin-bottom: 0;
}

.product-modal-description ul,
.product-modal-description ol {
    margin: 12px 0;
    padding-left: 20px;
}

.product-modal-description ul:first-child,
.product-modal-description ol:first-child {
    margin-top: 0;
}

.product-modal-description ul:last-child,
.product-modal-description ol:last-child {
    margin-bottom: 0;
}

.product-modal-description li {
    margin: 4px 0;
}

.product-modal-description strong {
    color: #4A6B4A;
    font-weight: 600;
}

.product-modal-description em {
    color: #6B8E6B;
    font-style: italic;
}

.product-modal-description a {
    color: #6B8E6B;
    text-decoration: underline;
}

.product-modal-description a:hover {
    color: #4A6B4A;
    text-decoration: none;
}

/* Стилизация скроллбара описания */
.product-modal-description::-webkit-scrollbar {
    width: 6px;
}

.product-modal-description::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.product-modal-description::-webkit-scrollbar-thumb {
    background: #6B8E6B;
    border-radius: 3px;
}

.product-modal-description::-webkit-scrollbar-thumb:hover {
    background: #4A6B4A;
}

.product-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto; /* Прижимается к низу */
    flex-shrink: 0; /* Не сжимается */
}

.product-modal-price {
    font-size: 24px;
    font-weight: 700;
    color: #6B8E6B;
    flex-shrink: 0;
}

.product-modal-add-btn {
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
    flex-shrink: 0;
    min-width: 120px;
}

.product-modal-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
    background: linear-gradient(135deg, #7BA07B 0%, #5A7A5A 100%);
}

.product-modal-add-btn:active {
    transform: translateY(0);
}

/* Стили для результатов поиска */
.no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.no-results-content {
    text-align: center;
    max-width: 400px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.no-results-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.no-results-content p:last-child {
    margin-bottom: 0;
}

.no-results-content strong {
    color: #6B8E6B;
    font-weight: 600;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для экрана поиска */
#search-screen {
    background: white;
    z-index: 1000;
    display: none;
    flex-direction: column;
    height: 100vh;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-input-container {
    flex: 1;
    position: relative;
    margin: 0 15px;
}

.search-main-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 2px solid #6B8E6B;
    border-radius: 25px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.search-main-input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.1);
}

.search-main-input::placeholder {
    color: #999;
    font-size: 15px;
}

.search-icon-container {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-main-icon {
    width: 20px;
    height: 20px;
    color: #6B8E6B;
}

.search-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-search-content {
    text-align: center;
    color: #666;
}

.empty-search-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    opacity: 0.5;
}

.empty-search-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.empty-search-content p {
    font-size: 14px;
    color: #999;
}

/* Стили для иконки поиска в каталоге */
.search-icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.search-icon-btn:hover {
    background-color: rgba(107, 142, 107, 0.1);
    transform: scale(1.1);
}

.search-icon-btn:active {
    background-color: rgba(107, 142, 107, 0.2);
    transform: scale(0.95);
}

.search-icon-btn .search-icon {
    width: 20px;
    height: 20px;
    color: #6B8E6B;
}

/* Утилиты */
.hidden {
    display: none !important;
}

/* Адаптивность */

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .product-modal {
        padding: 2px;
    }
    
    .product-modal-content {
        max-height: 99vh;
        border-radius: 6px;
    }
    
    .product-modal-info {
        padding: 10px;
    }
    
    .product-modal-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .product-modal-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .product-modal-price {
        font-size: 18px;
        text-align: center;
    }
    
    .product-modal-add-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: auto;
    }
    
    .product-modal-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: 6px;
        right: 6px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 170px);
        gap: 10px;
    }
    
    /* Адаптация hero секции для мобильных */
    .hero-section {
        height: 300px;
        margin: 15px 0;
    }
    
    .hero-content {
        padding: 15px;
        max-width: 100%;
    }
    
    .hero-logo {
        margin-bottom: 12px;
    }
    
    .hero-logo img {
        max-width: 60px;
        max-height: 60px;
        object-fit: contain;
    }
    
    .hero-title {
        font-size: clamp(20px, 5vw, 24px);
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: clamp(12px, 3vw, 14px);
        margin-bottom: 20px;
    }
    
    .hero-catalog-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 140px;
    }
    
    .search-container {
        max-width: 150px;
        margin: 0 30px 0 3px;
        gap: 6px;
    }
    
    .search-input {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .search-icon {
        width: 16px;
        height: 16px;
    }
    
    .search-btn {
        padding: 6px;
    }
    
    /* Адаптивные стили для экрана поиска */
    .search-header {
        padding: 12px 15px;
    }
    
    .search-input-container {
        margin: 0 10px;
    }
    
    .search-main-input {
        padding: 10px 45px 10px 14px;
        font-size: 15px;
        border-radius: 20px;
    }
    
    .search-main-icon {
        width: 18px;
        height: 18px;
    }
    
    .search-content {
        padding: 15px;
    }
    
    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .search-icon-btn {
        padding: 6px;
        margin-right: 8px;
    }
    
    .search-icon-btn .search-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Адаптация блоков для мобильных */
    .about-section,
    .contacts-section,
    .consultation-section {
        margin: 30px 0;
        padding: 0 15px;
    }
    
    .about-content,
    .contacts-content,
    .consultation-content {
        padding: 15px;
        gap: 15px;
    }
    
    .about-image,
    .consultation-image {
        height: 180px;
    }
    
    .about-text h3,
    .consultation-text h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .contacts-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .about-text p,
    .consultation-text p {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .contact-text {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .contact-item {
        padding: 10px 0;
        gap: 10px;
    }
    
    .contact-icon {
        font-size: 16px;
    }
    
    .consultation-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    /* Адаптация корзины для мобильных */
    .cart-content {
        padding: 10px;
    }
    
    .cart-item {
        padding: 12px;
        gap: 12px;
        min-height: auto;
        flex-wrap: wrap;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .cart-item-info {
        flex: 1;
        min-width: 0;
    }
    
    .cart-item-title {
        font-size: 14px;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .cart-item-price {
        font-size: 13px;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
        min-width: auto; /* Убираем фиксированную ширину на мобильных */
    }
    
    .quantity-controls {
        min-width: 70px;
        padding: 2px 6px;
    }
    
    .quantity-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .quantity {
        font-size: 12px;
        min-width: 16px;
    }
    
    .item-total {
        font-size: 14px;
        min-width: 50px;
    }
    
    .remove-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .cart-quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .remove-item-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    /* Адаптация оформления заказа для мобильных */
    .checkout-content {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .checkout-sidebar {
        flex: none;
        order: -1;
    }
    
    .order-summary {
        min-height: auto;
        padding: 12px;
    }
    
    .checkout-items-list {
        max-height: 200px;
        margin-bottom: 12px;
    }
    
    .checkout-item {
        padding: 10px;
        gap: 10px;
    }
    
    .checkout-item-image {
        width: 40px;
        height: 40px;
    }
    
    .checkout-item-name {
        font-size: 13px;
    }
    
    .checkout-item-details {
        font-size: 12px;
    }
    
    .checkout-item-total {
        font-size: 13px;
        min-width: 70px;
    }
    
    .order-total {
        padding-top: 12px;
        margin-bottom: 15px;
    }
    
    .total-line {
        font-size: 16px;
    }
    
    .place-order-btn {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .order-summary {
        position: static;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .payment-option {
        padding: 15px;
    }
    
    .payment-title {
        font-size: 14px;
    }
    
    .payment-description {
        font-size: 12px;
    }
    
    /* Адаптация модалки для мобильных */
    .product-modal {
        padding: 5px;
    }
    
    .product-modal-content {
        width: 100%; /* На мобильных занимаем всю ширину */
        max-width: 100%;
        max-height: 98vh; /* Почти весь экран */
        border-radius: 8px;
    }
    
    .product-modal-description {
        padding-right: 5px;
        margin-right: -5px;
    }
    
    .product-modal-image {
        border-radius: 8px 8px 0 0;
        height: 50vh; /* На мобильных герой-зона занимает 50% экрана */
        min-height: 200px;
        max-height: 300px;
        padding: 15px; /* Меньше отступы на мобильных */
    }
    
    .product-modal-info {
        padding: 12px;
    }
    
    .product-modal-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .product-modal-price {
        font-size: 20px;
    }
    
    .product-modal-add-btn {
        padding: 13px 18px;
        font-size: 15px;
        min-width: 110px;
    }
    
    .product-modal-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
}

/* Планшеты */
@media (min-width: 481px) and (max-width: 768px) {
    /* Адаптация hero секции для планшетов */
    .hero-section {
        height: 350px;
    }
    
    
    .hero-logo img {
        max-width: 70px;
        max-height: 70px;
        object-fit: contain;
    }
    
    .hero-title {
        font-size: clamp(26px, 5vw, 30px);
    }
    
    .hero-subtitle {
        font-size: clamp(15px, 3vw, 17px);
    }
    
    .hero-catalog-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    /* Адаптация блоков для планшетов */
    .about-content,
    .contacts-content,
    .consultation-content {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    
    .about-image,
    .consultation-image {
        flex: 0 0 250px;
        height: 200px;
    }
    
    .about-text,
    .consultation-text {
        flex: 1;
    }
    
    .product-modal {
        padding: 15px;
    }
    
    .product-modal-content {
        width: 90%;
        max-width: 500px;
    }
    
    .product-modal-info {
        padding: 18px;
    }
    
    .product-modal-title {
        font-size: 19px;
    }
    
    .product-modal-price {
        font-size: 22px;
    }
    
    .product-modal-add-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-width: 120px;
    }
}

/* Большие экраны */
@media (min-width: 769px) {
    /* Адаптация hero секции для больших экранов */
    .hero-section {
        height: 450px;
    }
    
    
    .hero-logo img {
        max-width: 90px;
        max-height: 90px;
        object-fit: contain;
    }
    
    .hero-title {
        font-size: clamp(28px, 5vw, 36px);
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: clamp(16px, 3vw, 18px);
        margin-bottom: 30px;
    }
    
    .hero-catalog-btn {
        padding: 14px 30px;
        font-size: 17px;
        min-width: 180px;
    }
    
    /* Адаптация блоков для больших экранов */
    .about-content,
    .contacts-content,
    .consultation-content {
        flex-direction: row;
        align-items: center;
        gap: 40px;
        padding: 30px;
    }
    
    .about-image,
    .consultation-image {
        flex: 0 0 300px;
        height: 220px;
    }
    
    .about-text,
    .consultation-text {
        flex: 1;
    }
    
    .about-text h3,
    .consultation-text h3 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .contacts-content h3 {
        font-size: 28px;
        margin-bottom: 25px;
    }
    
    .about-text p,
    .consultation-text p {
        font-size: 17px;
        margin-bottom: 15px;
    }
    
    .contact-text {
        font-size: 17px;
        line-height: 1.6;
    }
    
    .contact-item {
        padding: 15px 0;
        gap: 15px;
    }
    
    .contact-icon {
        font-size: 20px;
    }
    
    .consultation-btn {
        padding: 18px 35px;
        font-size: 17px;
        max-width: 300px;
    }
    
    .product-modal {
        padding: 20px;
    }
    
    .product-modal-content {
        width: 450px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .product-modal {
        padding: 5px;
    }
    
    .product-modal-content {
        max-height: 95vh;
        width: 90%;
        max-width: 600px;
    }
    
    .product-modal-image {
        height: 40vh; /* В ландшафте герой-зона занимает 40% экрана */
        min-height: 150px;
        max-height: 250px;
        padding: 10px; /* Еще меньше отступы в ландшафте */
    }
    
    .product-modal-info {
        padding: 10px;
    }
    
    .product-modal-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .product-modal-description {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .product-modal-add-btn {
        padding: 13px 18px;
        font-size: 15px;
    }
}

/* Очень большие экраны */
@media (min-width: 1200px) {
    .product-modal-content {
        width: 500px;
    }
    
    .product-modal-title {
        font-size: 22px;
    }
    
    .product-modal-description {
        font-size: 15px;
    }
    
    .product-modal-price {
        font-size: 26px;
    }
    
    .product-modal-add-btn {
        padding: 16px 24px;
        font-size: 18px;
        min-width: 140px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, 170px);
    }
    
    .welcome-section {
        padding: 60px 30px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, 170px);
    }
    
    .welcome-section {
        padding: 80px 40px;
    }
}

@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, 170px);
    }
    
    .welcome-section {
        padding: 100px 40px;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, 170px);
    }
    
    .cart-item {
        padding: 20px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Бейджи товаров */
.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge-backorder {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Селектор размеров */
.size-selector {
    margin: 8px 0;
}

.size-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.size-selector select:focus {
    outline: none;
    border-color: #6B8E6B;
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.1);
}

.size-selector select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* ===== ФИЛЬТР ПО ЦЕНЕ ===== */
.price-filter {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.price-filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.price-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.price-filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.price-filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.price-filter-btn:hover {
    border-color: #6B8E6B;
    color: #6B8E6B;
    background: #f8f9fa;
}

.price-filter-btn.active {
    background: #6B8E6B;
    border-color: #6B8E6B;
    color: white;
}

.price-filter-btn.active:hover {
    background: #5a7a5a;
    border-color: #5a7a5a;
}

/* Адаптивность для фильтра */
@media (max-width: 480px) {
    .price-filter {
        padding: 12px 15px;
    }
    
    .price-filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price-filter-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .price-filter-btn {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 12px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .price-filter {
        padding: 12px 18px;
    }
    
    .price-filter-container {
        gap: 12px;
    }
    
    .price-filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}
