/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #B5E61D;
    --primary-dark: #8FB817;
    --secondary-color: #e9c46a;
    --accent-color: #f4a261;
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --light-text: #f5f5f7;
    --medium-text: #aaa;
    --border-color: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка - компактная */
.header {
    position: fixed;
    top: -5px;
    width: 100%;
    height: 48px;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 8px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-main h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--light-text);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--medium-text);
    margin-top: 1px;
    font-weight: 400;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 25px;
}

.nav a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover {
    color: var(--primary-color);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.cart-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    background-color: var(--darker-bg);
    border-radius: 20px;
    transition: background-color 0.3s;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.cart-icon:hover {
    background-color: var(--primary-dark);
}

.cart-count {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-left: 6px;
}

/* Основные секции */
.section {
    padding: 80px 0 40px;
}

.section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: var(--light-text);
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    margin: 12px auto;
    border-radius: 2px;
}

/* Секция About с каруселью - ДЕСКТОПНАЯ ВЕРСИЯ */
#about {
    position: relative;
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Контент поверх карусели - ДЕСКТОП */
.about-content {
    position: absolute;
    top: 10%;
    left: 0;
    right: 0;
    z-index: 20;
    text-align: center;
    padding: 0 20px;
}

.about-content .container {
    margin-bottom: 30px;
}

/* О нас - салатовый текст */
.about-description {
    color: var(--primary-color) !important;
    font-size: 20px;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    text-shadow: 
        0.5px 0.5px 0 rgba(0, 0, 0, 0.8),
        -0.5px -0.5px 0 rgba(0, 0, 0, 0.8),
        0.5px -0.5px 0 rgba(0, 0, 0, 0.8),
        -0.5px 0.5px 0 rgba(0, 0, 0, 0.8),
        0 0.5px 0 rgba(0, 0, 0, 0.8),
        0 -0.5px 0 rgba(0, 0, 0, 0.8),
        0.5px 0 0 rgba(0, 0, 0, 0.8),
        -0.5px 0 0 rgba(0, 0, 0, 0.8);
}

/* Карусель-галерея - ДЕСКТОП */
.carousel-gallery {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1200px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    transform-style: preserve-3d;
}

/* Стили для слайдов - ДЕСКТОП */
.carousel-slide {
    position: absolute;
    left: 50%;
    width: 400px; /* Увеличили ширину для естественного размера */
    height: 600px; /* Увеличили высоту для естественного размера */
    transition: all 0.8s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.prev {
    transform: translateX(-150%) scale(0.8) rotateY(15deg);
    opacity: 0.6;
    z-index: 1;
    filter: brightness(0.7);
}

.carousel-slide.active {
    transform: translateX(-50%) scale(1) rotateY(0);
    opacity: 1;
    z-index: 2;
    filter: brightness(1);
}

.carousel-slide.next {
    transform: translateX(50%) scale(0.8) rotateY(-15deg);
    opacity: 0.6;
    z-index: 1;
    filter: brightness(0.7);
}

.carousel-slide.hidden {
    opacity: 0;
    z-index: 0;
}

/* ИСПРАВЛЕНИЕ: ЕСТЕСТВЕННЫЙ РАЗМЕР БЕЗ ОБРЕЗКИ */
.carousel-slide img,
.carousel-slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Сохраняем пропорции без обрезки */
    border-radius: 12px;
    background-color: var(--darker-bg);
}

/* Индикаторы карусели */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 15;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background-color: var(--primary-color);
}

/* Кнопка призыва к действию - ДЕСКТОП */
.carousel-cta {
    position: absolute;
    bottom: -130%;
    left: 0;
    right: 0;
    text-align: center;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(181, 230, 29, 0.4);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(181, 230, 29, 0.6);
}

/* Фильтры по категориям */
.category-filters {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    color: var(--medium-text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--light-text);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    background-color: var(--darker-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.product-gallery {
    display: flex;
    height: 280px;
    position: relative;
    overflow: hidden;
    margin-top: 3px;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: var(--dark-bg);
    cursor: zoom-in;
    border-radius: 8px;
    margin: 4px;
}

.gallery-main.zoomed {
    cursor: grab;
    overflow: auto;
}

.gallery-main.zoomed img {
    cursor: grab;
    transform: scale(2);
    transition: transform 0.3s ease;
}

.gallery-main:active.zoomed {
    cursor: grabbing;
}

.gallery-main:active.zoomed img {
    cursor: grabbing;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
    border-radius: 6px;
}

.gallery-thumbs {
    width: 70px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: var(--dark-bg);
    border-left: 1px solid var(--border-color);
    overflow: visible;
}

.gallery-thumb {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    border: 2px solid transparent;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.product-info {
    padding: 18px;
}

.product-name {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--light-text);
}

.product-description {
    color: var(--medium-text);
    font-size: 13px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--medium-text);
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--light-text);
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--dark-bg);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.quantity-btn {
    background: none;
    border: none;
    color: var(--light-text);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: var(--primary-dark);
}

.quantity-display {
    margin: 0 8px;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.add-to-cart {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    flex-grow: 1;
}

.add-to-cart:hover {
    background-color: var(--primary-dark);
}

/* FAQ */
.faq-item {
    margin-bottom: 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: var(--darker-bg);
    padding: 18px;
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

.faq-item h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--light-text);
}

.faq-item p {
    text-align: left;
    color: var(--medium-text);
    font-size: 15px;
}

/* Модальное окно корзины */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--darker-bg);
    margin: 5% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close {
    color: var(--medium-text);
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--light-text);
}

.cart-items {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 500;
    color: var(--light-text);
    font-size: 14px;
}

.cart-item-price {
    color: var(--medium-text);
    font-size: 13px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin: 0 12px;
}

.cart-item-total {
    font-weight: 600;
    color: var(--light-text);
    min-width: 70px;
    text-align: right;
    font-size: 14px;
}

.remove-item {
    background: none;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s;
    padding: 4px;
}

.remove-item:hover {
    transform: scale(1.2);
}

.cart-total {
    text-align: right;
    font-size: 18px;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--light-text);
}

/* Форма оформления заказа */
.checkout-form {
    margin-top: 25px;
}

.checkout-form h3 {
    margin-bottom: 15px;
    color: var(--light-text);
    font-size: 18px;
}

.checkout-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--light-text);
    font-size: 14px;
    transition: border 0.3s;
}

.checkout-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkout-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-form button:hover {
    background-color: var(--primary-dark);
}

/* Уведомление */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
    font-size: 14px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .header .container {
        padding: 0 15px;
    }
    
    .logo-main h1 {
        font-size: 18px;
    }
    
    .logo-subtitle {
        font-size: 9px;
    }
    
    .nav {
        display: none;
    }
    
    .cart-icon {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
    
    .section {
        padding: 70px 0 30px;
    }
    
    .section h2 {
        font-size: 26px;
    }
    
    .about-description {
        font-size: 18px;
    }
    
    .cta-button {
        padding: 14px 32px;
        font-size: 16px;
    }
    
    /* Карусель для планшетов */
    .carousel-slide {
        width: 320px;
        height: 480px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-gallery {
        flex-direction: column;
        height: auto;
    }
    
    .gallery-thumbs {
        width: 100%;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border-color);
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px;
    }
    
    .gallery-thumb {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity-controls {
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .category-filters {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .cart-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cart-item-info {
        flex-basis: 100%;
    }
    
    .cart-item-quantity {
        margin: 0;
        order: 2;
    }
    
    .cart-item-total {
        order: 1;
        text-align: left;
        min-width: auto;
    }
    
    .remove-item {
        order: 3;
    }
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 480px) {
    .header .container {
        padding: 0 10px;
    }
    
    .logo-main h1 {
        font-size: 16px;
    }
    
    .logo-subtitle {
        font-size: 8px;
    }
    
    .cart-icon {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .section {
        padding: 60px 0 20px;
    }
    
    .section h2 {
        font-size: 22px;
    }
    
    .about-description {
        font-size: 16px;
        padding: 0 10px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    /* ПОЛНАЯ ПЕРЕДЕЛКА СЕКЦИИ ABOUT ДЛЯ МОБИЛЬНЫХ */
    #about {
        position: relative;
        min-height: auto;
        display: block;
        padding: 80px 0 40px;
    }
    
    /* ТЕКСТ ВЫШЕ КАРУСЕЛИ НА МОБИЛЬНЫХ */
    .about-content {
        position: relative;
        top: auto;
        margin-bottom: 30px;
    }
    
    .about-content .container {
        margin-bottom: 20px;
    }
    
    /* КАРУСЕЛЬ НИЖЕ ТЕКСТА */
    .carousel-gallery {
        position: relative;
        top: auto;
        height: 400px;
        margin-bottom: 30px;
    }
    
    /* КНОПКА В НОРМАЛЬНОМ ПОЛОЖЕНИИ */
    .carousel-cta {
        position: relative;
        bottom: auto;
        margin-top: 20px;
    }
    
    /* КАРУСЕЛЬ ДЛЯ МОБИЛЬНЫХ - ЕСТЕСТВЕННЫЙ РАЗМЕР */
    .carousel-slide {
        width: 280px;
        height: 420px;
    }
    
    /* БОКОВЫЕ СЛАЙДЫ БОЛЬШЕ И БЛИЖЕ */
    .carousel-slide.prev {
        transform: translateX(-120%) scale(0.8) rotateY(15deg);
    }
    
    .carousel-slide.next {
        transform: translateX(20%) scale(0.8) rotateY(-15deg);
    }
    
    /* УБИРАЕМ ПЕРСПЕКТИВУ ДЛЯ ЛУЧШЕЙ ВИДИМОСТИ */
    .carousel-container {
        perspective: 800px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 16px;
    }
    
    .current-price {
        font-size: 18px;
    }
    
    .add-to-cart {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .category-filters {
        gap: 4px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .faq-item {
        padding: 15px;
    }
    
    .faq-item h3 {
        font-size: 18px;
    }
}

/* Сообщение об отсутствии товаров */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--medium-text);
    font-size: 16px;
    padding: 30px;
}