/* Оптимизация производительности */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #2a2a2a;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background-color: #2a2a2a;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff6b35;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.logo-text:hover {
    color: #ff6b35;
}

.logo-text:visited {
    color: #ffffff;
}

.logo-text:focus {
    outline: none;
    color: #ff6b35;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    will-change: color;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b35;
}

/* Hero Slider */
.hero-slider {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.slider-content {
    position: relative;
    height: 300px;
    user-select: none;
    touch-action: pan-y;
    contain: layout style paint;
}

/* Оптимизация для анимируемых элементов */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    will-change: opacity, transform;
    transform: translateX(100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-title {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-subtitle {
    font-size: 1.5rem;
    color: #ff6b35;
    margin-bottom: 30px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    will-change: transform, background-color;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.slider-dot.active {
    background-color: #ff6b35;
    transform: scale(1.2);
}

/* Мобильная версия */
@media (max-width: 768px) {
    .hero-slider {
        padding: 60px 0;
    }
    
    .slider-content {
        height: 250px;
    }
    
    .slide-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .slide-subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}

/* Products Section */
.products-section {
    padding: 40px 0;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.weight-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.weight-badge {
    background-color: #ffffff;
    color: #2a2a2a;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Добавляем contain для изоляции перерисовки */
.product-card {
    text-align: center;
    contain: layout style paint;
    background-color: #404040;
    border-radius: 20px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image-container {
    position: relative;
    background-color: transparent;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

/* Оптимизация изображений для PNG без фона */
.product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: 15px;
}

.add-to-cart-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background-color: #ff6b35;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    will-change: transform, background-color;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #e55a2b;
    transform: scale(1.1);
}

.product-info {
    text-align: left;
    padding: 0 5px;
}

.product-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

.product-description {
    color: #cccccc;
    margin-bottom: 10px;
    font-size: 14px;
}

.product-weight {
    background-color: #ff6b35;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b35;
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.add-to-cart:hover {
    background-color: #ff6b35;
    border-color: #ff6b35;
}

/* Subscription Section */
.subscription-section {
    padding: 60px 0;
    background-color: #333333;
}

.subscription-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Оптимизация переходов - используем только необходимые свойства */
.subscription-card {
    background-color: #404040;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    will-change: transform;
    transition: transform 0.3s ease;
}

.subscription-period {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.subscription-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.subscription-icon {
    width: 40px;
    height: 40px;
    background-color: #ff6b35;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.cta-button {
    background-color: #ff6b35;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e55a2b;
}

/* Delivery Section */
.delivery-section {
    padding: 60px 0;
}

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.delivery-card {
    background-color: #404040;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.delivery-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.delivery-description {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.delivery-details {
    font-size: 14px;
    opacity: 0.6;
}

/* Subscription Benefits */
.subscription-benefits {
    margin: 30px 0;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: #ff6b35;
}

.social-icon {
    width: 24px;
    height: 24px;
}

.footer-text {
    color: #888888;
    font-size: 14px;
}



/* Modals */
.cart-modal, .order-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.cart-modal.show, .order-modal.show {
    display: block !important;
}

.cart-content, .order-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2a2a2a;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-header, .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-close, .order-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #404040;
    contain: layout style paint;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    image-rendering: auto;
}

.cart-item-info {
    flex: 1;
    margin-right: 15px;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 16px;
}

.cart-item-info p {
    margin: 0 0 10px 0;
    color: #ccc;
    font-size: 14px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-controls button {
    background-color: #ff6b35;
    color: #ffffff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, background-color;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cart-item-controls button:hover {
    background-color: #e55a2b;
    transform: scale(1.1);
}

.cart-item-controls span {
    min-width: 30px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cart-item-price span {
    color: #ff6b35;
    font-weight: bold;
    font-size: 16px;
}

.remove-item {
    width: 25px;
    height: 25px;
    border: none;
    border-radius: 50%;
    background-color: #666;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background-color: #ff4444;
}

/* Удаляем стили для weight-badge, так как элемент больше не используется */

.cart-footer {
    text-align: center;
}

.cart-total-header {
    margin-left: 8px;
    font-weight: 600;
    color: #ff6b35;
    display: none;
    pointer-events: none;
}

.order-button, .submit-button {
    background-color: #ff6b35;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-form input, .order-form textarea {
    background-color: #404040;
    border: none;
    border-radius: 10px;
    padding: 15px;
    color: #ffffff;
    font-size: 16px;
}

.order-form input::placeholder, .order-form textarea::placeholder {
    color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 30px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #2a2a2a;
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 20px 20px;
    }
    
    .nav.active {
        display: flex;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image-container {
        padding: 8px;
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-name {
        font-size: 20px;
    }
    
    .subscription-options {
        grid-template-columns: 1fr;
    }
    
    .delivery-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .slider-content {
        padding: 30px 20px;
    }
    
    .slide h2 {
        font-size: 24px;
    }
    
    .slide p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 25px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image-container {
        padding: 5px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .product-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .slider-content {
        padding: 25px 15px;
    }
    
    .slide h2 {
        font-size: 20px;
    }
    
    .slide p {
        font-size: 14px;
    }
}

.cart-icon {
    position: relative;
    cursor: pointer !important;
    padding: 10px;
    color: #ffffff;
    transition: color 0.3s;
    user-select: none;
    z-index: 10;
}

.cart-icon:hover {
    color: #ff6b35;
    opacity: 0.8;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff6b35;
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.secondary-button {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    flex: 1;
}

.secondary-button:hover {
    background-color: #ffffff;
    color: #2a2a2a;
}

/* Page Styles */
.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.page-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

.nav-link.active {
    color: #ff6b35;
}

/* Delivery Page */
.delivery-info {
    max-width: 800px;
    margin: 0 auto;
}

.info-section {
    margin-bottom: 40px;
    background-color: #404040;
    padding: 30px;
    border-radius: 20px;
}

.info-section h2 {
    color: #ff6b35;
    margin-bottom: 20px;
}

.delivery-zones {
    list-style: none;
}

.delivery-zones li {
    padding: 10px 0;
    border-bottom: 1px solid #555;
}

.delivery-zones li:last-child {
    border-bottom: none;
}

/* Subscription Page */
.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.subscription-card {
    background-color: #404040;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transition: transform 0.3s;
}

.subscription-card:hover {
    transform: translateY(-5px);
}

.subscription-card.featured {
    border: 2px solid #ff6b35;
}

.plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-duration {
    background-color: #ff6b35;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: #ff6b35;
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.plan-features {
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.feature-icon {
    width: 20px;
    height: 20px;
}

.plan-price {
    text-align: center;
    margin-bottom: 20px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b35;
    display: block;
}

.price-note {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

/* Contacts Page */
.contacts-info {
    max-width: 600px;
    margin: 0 auto;
}

.contact-section {
    margin-bottom: 40px;
    background-color: #404040;
    padding: 30px;
    border-radius: 20px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    color: #ff6b35;
    margin-bottom: 10px;
}

.contact-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.contact-link:hover {
    color: #ff6b35;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px 0;
}

.social-link.large {
    background-color: #404040;
    padding: 20px;
    border-radius: 15px;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-link.large:hover {
    background-color: #ff6b35;
}

.working-hours {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #555;
}

.hours-item:last-child {
    border-bottom: none;
}

.confirm-content {
    text-align: center;
    padding: 20px 0;
}

.confirm-content p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.continue-btn, .checkout-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-btn {
    background-color: #666;
    color: #fff;
}

.continue-btn:hover {
    background-color: #777;
}

.checkout-btn {
    background-color: #ff6b35;
    color: #fff;
}

.checkout-btn:hover {
    background-color: #e55a2b;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff6b35;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* Классы для иконок корзины */
.cart-icon-img {
    filter: brightness(0) invert(1);
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.cart-btn-img {
    filter: brightness(0) invert(1);
    width: 16px;
    height: 16px;
}

/* Оптимизация для модальных окон */
.modal {
    contain: layout style paint;
}