/* Основные стили для витрины */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #000000;
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Специальный стиль для страницы продукта */
body:has(.product-detail-container) .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Заголовок */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    min-height: 60px; /* Уменьшили с 72px до 60px */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 0;
    padding: 6px 40px; /* Уменьшили с 8px до 6px */
    border: none;
    width: 100%;
    min-height: 60px; /* Уменьшили с 72px до 60px */
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    height: 60px; /* Уменьшили с 88px до 60px для более компактной шапки */
    width: auto;
    display: inline-block;
}

.site-logo.mini {
    height: 28px;
}

.title-logo {
    height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #0044cc;
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}

.logo-placeholder::before {
    content: "ЛОГО";
}

.header-text h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    color: #000000;
    text-align: left;
}

.header-text .subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666666;
    margin: 0;
    text-align: left;
}

.header-center {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Вкладки категорий */
.category-tabs {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 4px;
    border: none;
    margin-bottom: 20px;
}

.contacts {
    display: flex;
    gap: 15px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 500;
    border: none;
}

.contact-link:hover {
    color: #ffffff;
    background: #333333;
    border-color: #333333;
}

.contact-link.telegram-link {
    color: #0088cc !important;
}

.contact-link.telegram-link:hover {
    color: #ffffff !important;
    background: #0088cc !important;
}

.whatsapp-link {
    color: #25D366 !important;
}

.whatsapp-link:hover {
    color: #ffffff !important;
    background: #25D366 !important;
}

.contact-link svg {
    transition: all 0.3s ease;
}

.contact-link:hover svg {
    transform: scale(1.1);
}

.tab-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #000000;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    color: #333333;
    background: rgba(102, 102, 102, 0.1);
}

.tab-btn.active {
    background: #c0c0c0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

/* Поиск в шапке */
.search-container {
    position: relative;
    margin-bottom: 0;
    width: 100%;
}

.search-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-box:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-input {
    flex: 1;
    padding: 16px 20px 16px 24px;
    background: transparent;
    border: none;
    color: #333333;
    font-size: 16px;
    font-weight: 400;
    outline: none;
    letter-spacing: 0.3px;
    border-radius: 25px 0 0 25px;
}

.search-input::placeholder {
    color: #666666;
    font-weight: 400;
}

.search-btn {
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: none;
    border-radius: 0 25px 25px 0;
}

.search-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.clear-search-btn {
    padding: 16px 18px;
    background: transparent;
    border: none;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: none;
    border-radius: 0 25px 25px 0;
}

.clear-search-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Основной контент с разделением на две части */
.main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
    padding: 20px 40px;
    margin-top: 90px; /* Оптимизированный отступ для более компактной шапки */
    width: 100%;
    box-sizing: border-box;
}

/* Левая часть - фильтры */
.filters-sidebar {
    flex: 0 0 320px; /* Увеличиваем ширину для лучшего использования пространства */
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 90px; /* Отступ от закрепленной шапки с учетом нового отступа */
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.filters-section {
    width: 100%;
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000000;
    text-align: center;
    letter-spacing: 0.5px;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: #000000;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(192, 192, 192, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    color: #333333;
    background: rgba(102, 102, 102, 0.1);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #c0c0c0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

/* Правая часть - товары */
.products-section {
    flex: 1;
    min-width: 0; /* Позволяет контенту сжиматься */
    position: relative; /* Для позиционирования overlay результатов поиска */
}

/* Сетка товаров - адаптивная */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
    width: 100%;
}

/* Карточка товара - стиль как на Летуаль */
.product-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px; /* Скругленные углы как на Летуаль */
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Легкая тень */
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px); /* Больше поднимаем карточку */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); /* Более выраженная тень */
    border-color: #e0e0e0;
}

/* Убираем серую подсветку для товаров не в наличии - стили удалены */

/* Изображение товара - оптимальные пропорции для парфюмерии */
.product-image {
    position: relative;
    height: 0;
    padding-bottom: 75%; /* Пропорции 4:3 для парфюмерии */
    overflow: hidden;
    background: #ffffff;
    border-bottom: none;
    display: block;
    border-radius: 12px 12px 0 0; /* Скругляем только верхние углы */
    margin: 8px 8px 0 8px; /* Небольшие отступы от краев карточки */
    border: 1px solid #f0f0f0;
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain; /* Показываем изображение полностью */
    object-position: center center; /* По умолчанию центрируем изображения */
    transition: all 0.3s ease; /* Плавный переход для всех свойств */
    background: #ffffff;
    border-radius: 12px 12px 0 0; /* Скругление только верхних углов */
}

/* Удалены неиспользуемые классы для управления отображением */

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.05); /* Увеличиваем масштаб с сохранением центрирования */
}

.product-card:hover .product-image {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Добавляем тень при наведении */
    border-color: #e0e0e0;
}

.no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0044cc;
    font-size: 14px;
    background: #ffffff;
    font-weight: 300;
    z-index: 1;
}

/* Индикатор наличия под названием */
.stock-indicator {
    margin-top: 4px;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.stock-indicator.in-stock {
    color: #4CAF50;
}

/* Счетчик изображений */
.image-count {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 123, 255, 0.9);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    z-index: 4;
    border: 1px solid #007bff;
    letter-spacing: 0.3px;
}

/* Галерея изображений */
.image-gallery {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.gallery-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 0;
    background: rgba(192, 192, 192, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: rotate(45deg);
}

.dot.active {
    background: #ffffff;
    transform: rotate(45deg) scale(1.3);
}

.gallery-arrows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 3;
}

.gallery-arrow {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: auto;
}

.gallery-arrow.prev {
    left: 10px;
}

.gallery-arrow.next {
    right: 10px;
}

.gallery-arrow:hover {
    background: rgba(255, 255, 255, 1);
    color: #000000;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Информация о товаре - стиль как на Летуаль */
.product-info {
    padding: 16px 16px 20px 16px; /* Увеличиваем отступы */
    background: #ffffff;
    transition: background 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px; /* Увеличиваем расстояние между элементами */
}

.product-card:hover .product-info {
    background: #ffffff;
}

.product-name {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #000000;
    line-height: 1.2;
    letter-spacing: 0.2px;
    padding: 0 4px;
    text-align: center;
}


/* Цены */
.prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: none;
    padding: 6px 4px 8px 4px;
    text-align: center;
}

.price-simple {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.5px;
    text-align: center;
}

.price-multi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.price-line {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 12px;
    color: #0044cc;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.2px;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: #007bff;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #007bff;
    border-top: 2px solid #ffffff;
    border-radius: 0;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
    transform: rotate(45deg);
}

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

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #007bff;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Стили для результатов поиска */
.search-results {
    position: absolute;
    top: 100%; /* Прямо под строкой поиска */
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin-top: 8px; /* Небольшой отступ от строки поиска */
    border: 1px solid #e9ecef;
    max-height: calc(100vh - 140px); /* Учитываем высоту шапки */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-results-header {
    margin-bottom: 20px;
}

.search-results-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    text-align: center;
}

.search-results-divider {
    width: 100%;
    height: 2px;
    background: #000000;
    margin-bottom: 0;
    border-radius: 1px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #007bff;
}

.search-result-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.search-result-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #666666;
    font-size: 12px;
    text-align: center;
    font-weight: 400;
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.search-result-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.search-result-name a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-name a:hover {
    color: #007bff;
}

.search-result-stock {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.search-result-stock.in-stock {
    color: #28a745;
}

.search-result-stock.out-of-stock {
    color: #dc3545;
}

.search-result-price {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.2px;
}

.no-search-results {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-size: 1.1rem;
    font-weight: 400;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Адаптивность для результатов поиска */
@media (max-width: 768px) {
    .search-results {
        padding: 15px;
        left: -15px; /* Расширяем на padding */
        right: -15px; /* Расширяем на padding */
        border-radius: 12px;
        margin-top: 8px;
        max-height: calc(100vh - 120px);
    }
    
    .search-result-item {
        gap: 12px;
        padding: 10px;
    }
    
    .search-result-image {
        width: 60px;
        height: 60px;
    }
    
    .search-result-name {
        font-size: 1rem;
    }
    
    .search-result-stock {
        font-size: 0.85rem;
    }
    
    .search-result-price {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-results {
        padding: 12px;
        left: -12px; /* Расширяем на padding */
        right: -12px; /* Расширяем на padding */
        border-radius: 12px;
        margin-top: 8px;
        max-height: calc(100vh - 110px);
    }
    
    .search-result-item {
        gap: 10px;
        padding: 8px;
    }
    
    .search-result-image {
        width: 50px;
        height: 50px;
    }
    
    .search-result-name {
        font-size: 0.95rem;
    }
    
    .search-result-stock {
        font-size: 0.8rem;
    }
    
    .search-result-price {
        font-size: 0.85rem;
    }
    
    .search-results-header h3 {
        font-size: 1.2rem;
    }
}

/* Адаптивность */
@media (min-width: 1600px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .filters-sidebar {
        flex: 0 0 280px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .main-content {
        padding: 15px 20px;
        margin-top: 100px; /* Оптимизированный отступ для компактной мобильной шапки */
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px; /* Уменьшили с 15px до 10px */
        padding: 10px 15px; /* Оптимизировали паддинг */
    }
    
    .header-center {
        order: 3;
        margin: 0;
        max-width: 100%;
        justify-content: center; /* На мобильных центрируем поиск */
    }
    
    .header-left {
        order: 1;
    }
    
    .header-right {
        order: 2;
    }
    
    .header-left {
        justify-content: center;
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .contacts {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .contact-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .search-container {
        margin-bottom: 20px;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .search-btn, .clear-search-btn {
        padding: 14px 16px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .filters-sidebar {
        flex: none;
        position: static;
        width: 100%;
        padding: 20px;
    }
    
    .filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-info {
        padding: 8px 12px 10px 12px;
    }
    
    .product-image {
        padding-bottom: 85%; /* Немного больше квадрата для мобильных */
    }
    
    .prices {
        padding: 3px 4px 5px 4px;
        gap: 2px;
    }
    
    .gallery-arrow {
        width: 36px;
        height: 36px;
    }
    
    .gallery-arrow.prev {
        left: 8px;
    }
    
    .gallery-arrow.next {
        right: 8px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .price-simple {
        font-size: 18px;
    }
    
    .price-line {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-top: 110px; /* Оптимизированный отступ для компактной шапки на маленьких экранах */
    }
    
    .header-text h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .header-text .subtitle {
        font-size: 0.9rem;
    }
    
    .logo-placeholder {
        width: 40px;
        height: 40px;
        font-size: 9px;
    }
    
    .contact-link span {
        display: none;
    }
    
    .contact-link {
        padding: 8px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-info {
        padding: 8px 12px 10px 12px;
    }
    
    .product-image {
        padding-bottom: 90%; /* Почти квадрат для маленьких экранов */
    }
    
    .prices {
        padding: 3px 4px 5px 4px;
        gap: 1px;
    }
    
    .gallery-arrow {
        width: 32px;
        height: 32px;
    }
    
    .gallery-arrow.prev {
        left: 6px;
    }
    
    .gallery-arrow.next {
        right: 6px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .price-simple {
        font-size: 17px;
    }
    
    .price-line {
        font-size: 15px;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Стили для страницы карточки товара */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.back-btn {
    color: #000000 !important;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    background: transparent;
    font-weight: 600;
}

.back-btn:hover {
    background: #f8f9fa;
    color: #000000 !important;
    border-color: #007bff;
}

.header-spacer {
    width: 120px; /* Компенсирует ширину кнопки "Назад" */
}

.product-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding-top: 110px; /* Увеличенный отступ между шапкой и изображениями товара */
    position: relative; /* Для позиционирования overlay результатов поиска */
}

.product-detail {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Верхняя часть: изображение слева, название и цена справа */
.product-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Нижняя часть: описание и кнопки на всю ширину */
.product-bottom-section {
    width: 100%;
}

.product-images {
    position: relative;
    background: #ffffff;
    border-radius: 16px; /* Увеличиваем скругление как на Летуаль */
    overflow: hidden;
    border: 1px solid #f0f0f0; /* Более светлая граница */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Добавляем тень */
    height: 500px; /* Фиксированная высота блока изображений */
    display: flex;
    flex-direction: column;
}

.main-image-container {
    position: relative;
    margin-bottom: 20px;
    background: #ffffff;
    flex: 1; /* Занимаем оставшееся место */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.main-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain; /* Показываем изображение полностью */
    object-position: center center;
    border-radius: 8px; /* Небольшое скругление */
    cursor: pointer; /* Возвращаем указатель клика */
    transition: none; /* Убираем анимации */
    background: #ffffff;
    display: block;
}

/* Удалены альтернативные классы для управления отображением */

/* Убираем эффект hover для простого отображения */

.main-image[src*="data:image/svg"] {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Модальное окно для зума изображения */
.image-zoom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.zoomed-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.zoom-close:hover {
    color: #ff6b6b;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    height: 80px; /* Фиксированная высота для миниатюр */
    align-items: center;
}

.thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail.active {
    border-color: #007bff;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.3s ease;
}

.thumbnail:hover img {
    transform: scale(1.05);
}

.image-counter {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 10;
}

/* Кнопка поделиться в углу изображения */
.share-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.share-button:hover {
    background: rgba(0, 123, 255, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.share-button:active {
    transform: scale(0.95);
}

.share-button svg {
    transition: transform 0.3s ease;
}

.share-button:hover svg {
    transform: rotate(15deg);
}

/* Стрелки навигации по изображениям */
.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
}

.image-nav-arrow:hover {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.image-nav-prev {
    left: 15px;
}

.image-nav-next {
    right: 15px;
}

/* Скрываем стрелки когда изображений меньше двух */
.image-nav-arrow.hidden {
    display: none;
}

/* Старый класс product-info для совместимости - теперь не используется на странице товара */
.product-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
}

/* Новый контейнер для правой части (название и цены) */
.product-info-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    padding: 0;
    height: 500px; /* Точная высота как у блока изображений */
}

/* Блок доставки между названием и ценами */
.product-delivery-section {
    margin: 8px 0;
    width: 100%;
    flex-shrink: 0; /* Не сжимается */
}

.delivery-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.delivery-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #000000;
}

.delivery-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: #007bff;
}

.delivery-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px 0;
    text-align: left;
}

.delivery-divider {
    width: 100%;
    height: 1px;
    background: #000000;
    margin-bottom: 10px;
    border-radius: 1px;
}

.delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-method {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
}

.delivery-method:last-child {
    border-bottom: none;
}

.delivery-method:hover {
    background: rgba(0, 123, 255, 0.02);
    padding-left: 6px;
    padding-right: 6px;
    border-radius: 3px;
}

.delivery-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.delivery-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    color: #000000;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.delivery-icon svg {
    width: 20px;
    height: 20px;
}

.delivery-method:hover .delivery-icon {
    transform: scale(1.1);
    color: #333333;
}

.delivery-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.2px;
}

.delivery-description {
    font-size: 0.75rem;
    color: #666666;
    font-weight: 400;
    line-height: 1.2;
    margin-left: 0;
    padding-left: 0;
}

/* Описание теперь отдельно внизу */
.product-description-section {
    margin-top: 40px;
    margin-bottom: 60px; /* Отступ от нижней границы страницы */
    width: 100%;
    padding: 0;
}

.description-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title-section {
    margin-bottom: 10px;
    text-align: left;
    width: 100%;
    flex-shrink: 0; /* Не сжимается */
}

.product-title-main {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.2;
}


.product-prices-section {
    margin-top: 8px;
    width: 100%;
    flex: 1; /* Занимает все оставшееся место */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Выравниваем к низу контейнера */
}

.price-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px 0;
    text-align: left;
}

.price-divider {
    width: 100%;
    height: 1px;
    background: #000000;
    margin-bottom: 10px;
    border-radius: 1px;
}

.price-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.price-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #000000;
}

.price-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: #007bff;
}

.price-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: center;
}

.price-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 5px;
}

.product-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #000000;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-prices-inline {
    margin-bottom: 0;
}

.product-prices-inline .price-inline {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.3;
    letter-spacing: 0.2px;
    text-align: center;
    display: block;
    position: relative;
    margin: 0;
    padding: 4px 0;
}

.product-name-link {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 700;
}

.product-name-link:hover {
    color: #0044cc;
}

.product-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #666666;
    font-weight: 400;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.product-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
}

.product-prices {
    margin-bottom: 30px;
}

.price-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #000000;
    font-weight: 400;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.price-item:last-child {
    border-bottom: none;
}

.price-label {
    color: #007bff;
    font-weight: 300;
}

.price-value {
    color: #000000;
    font-weight: 500;
    font-size: 1.1rem;
}

.product-status {
    margin-bottom: 30px;
}

.stock-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background: #2d5a2d;
    color: #90ee90;
}

.stock-badge.out-of-stock {
    background: #5a2d2d;
    color: #ff6b6b;
}

.product-meta {
    margin-bottom: 40px;
    padding: 20px;
    background: #222;
    border-radius: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    color: #c0c0c0;
    font-size: 0.9rem;
}

.meta-value {
    color: #000000;
    font-size: 0.9rem;
}

/* Старые стили для product-actions больше не используются */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #0044cc;
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background: #003399;
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-telegram {
    background: #0044cc;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
}

.btn-telegram:hover {
    background: #003399;
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
}

.btn-whatsapp:hover {
    background: #1ea952;
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.product-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Удалены стили для кнопок управления отображением изображений */

.product-not-found {
    text-align: center;
    padding: 60px 20px;
}

.product-not-found h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #000000;
}

.product-not-found p {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 30px;
}

/* Ссылки в карточках товаров на главной странице */
.image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
    z-index: 1;
}

.image-link:hover .main-image {
    transform: scale(1.05);
}

.product-name-link {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 700;
}

.product-name-link:hover {
    color: #0044cc;
}

/* Элементы управления изображением */
.image-controls {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.control-group label {
    min-width: 80px;
    font-size: 14px;
    color: #c0c0c0;
}

.control-group input[type="range"] {
    flex: 1;
    height: 5px;
    background: #404040;
    border-radius: 5px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="number"] {
    width: 60px;
    padding: 5px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 12px;
}

.control-group span {
    min-width: 40px;
    font-size: 12px;
    color: #c0c0c0;
}

#imageControls .btn {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 12px;
}

/* Адаптивность для карточки товара */
@media (max-width: 768px) {
    .product-detail-container {
        padding-top: 130px; /* Увеличенный отступ между шапкой и контентом на планшетах */
    }
    
    .product-detail {
        gap: 30px;
    }
    
    .product-top-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-info-right {
        height: auto; /* Убираем фиксированную высоту на мобильных */
        min-height: auto;
        padding: 0;
        align-items: stretch;
        width: 100%;
        margin-top: 20px;
    }
    
    .product-delivery-section {
        margin: 15px 0;
    }
    
    .delivery-container {
        padding: 14px 12px;
        border-radius: 5px;
    }
    
    .delivery-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
        letter-spacing: 0.6px;
    }
    
    .delivery-divider {
        height: 1px;
        margin-bottom: 8px;
    }
    
    .delivery-methods {
        gap: 8px;
    }
    
    .delivery-method {
        padding: 6px 0;
    }
    
    .delivery-header {
        margin-bottom: 3px;
        gap: 8px;
    }
    
    .delivery-icon {
        width: 22px;
        height: 22px;
        border-radius: 0;
    }
    
    .delivery-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .delivery-name {
        font-size: 0.85rem;
    }
    
    .delivery-description {
        font-size: 0.7rem;
    }
    
    .product-description-section {
        margin-top: 30px;
        margin-bottom: 40px; /* Отступ от нижней границы на мобильных */
        width: 100%;
    }
    
    .description-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .product-description {
        font-size: 1.1rem;
        padding: 18px;
        border-radius: 8px;
    }
    
    .product-title-section {
        margin-bottom: 20px;
    }
    
    .product-title-main {
        font-size: 1.8rem;
        letter-spacing: 0.8px;
        margin-bottom: 12px;
    }
    
    
    .product-prices-section {
        margin-top: 15px;
        width: 100%;
    }
    
    .price-title {
        font-size: 0.9rem;
        letter-spacing: 0.6px;
        margin-bottom: 8px;
        color: #000000;
    }
    
    .price-divider {
        height: 1px;
        margin-bottom: 8px;
        background: #000000;
    }
    
    .price-container {
        padding: 14px 12px;
        border-radius: 5px;
    }
    
    .product-prices-inline .price-inline {
        font-size: 1.2rem;
        padding: 3px 0;
        color: #000000;
        text-align: center;
    }
    
    .product-images {
        height: 400px; /* Уменьшенная высота для мобильных */
    }
    
    .main-image-container {
        min-height: 320px; /* Уменьшенная высота для мобильных */
    }
    
    .main-image {
        max-height: 300px;
    }
    
    .product-title {
        font-size: 1.8rem;
        letter-spacing: 0.3px;
    }
    
    .product-prices-inline .price-inline {
        font-size: 1.5rem;
        letter-spacing: 0.3px;
    }
    
    .product-description {
        font-size: 1.1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px; /* Уменьшили с 20px до 12px */
        text-align: center;
        padding: 8px 15px; /* Добавили оптимизированный паддинг */
    }
    
    .header-spacer {
        display: none;
    }
    
    .price-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .price-actions .btn {
        flex: none;
        width: 100%;
        min-width: auto;
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .thumbnails {
        justify-content: center;
        padding: 8px;
        height: 60px; /* Уменьшенная высота для мобильных */
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .main-image {
        max-height: 300px;
    }
    
    /* Адаптивность для кнопки поделиться */
    .share-button {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .share-button svg {
        width: 18px;
        height: 18px;
    }
    
    .image-counter {
        top: 10px;
        left: 10px;
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    /* Адаптивность для стрелок навигации */
    .image-nav-arrow {
        width: 36px;
        height: 36px;
    }
    
    .image-nav-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .image-nav-prev {
        left: 10px;
    }
    
    .image-nav-next {
        right: 10px;
    }
}

/* Дополнительные отступы для очень маленьких экранов */
@media (max-width: 480px) {
    .product-detail-container {
        padding-top: 140px; /* Увеличенный отступ между шапкой и контентом на маленьких экранах */
    }
    
    .product-description-section {
        margin-bottom: 30px; /* Меньший отступ для маленьких экранов */
    }
    
    .product-description {
        font-size: 1rem;
        padding: 16px;
        border-radius: 8px;
    }
}