/* ============================================
   INDEX.CSS - Стили главной страницы
   ============================================ */

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-lightest) 0%, var(--primary-lighter) 100%);
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 10 L90 50 L50 90 L10 50 Z' fill='%23ffffff' opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.5;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content .highlight {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-primary);
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--primary-color);
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--primary-color);
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: var(--primary-lightest);
    transform: translateY(-2px);
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.hero-feature i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.hero-feature span {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background: var(--bg-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero-image-placeholder i {
    font-size: 8rem;
    color: var(--primary-light);
}

/* Hero Slider */
.hero-slider {
    width: 100%;
    max-width: 500px;
    height: 400px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--bg-primary);
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* ============================================
   SECTION COMMON STYLES
   ============================================ */
.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ============================================
   POPULAR PRODUCTS SECTION
   ============================================ */
.products-section {
    padding: 70px 20px;
    background: var(--bg-secondary);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.products-header h2 {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 1.05rem;
}

.view-all-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* Контейнер слайдера */
.products-slider-container {
    position: relative;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 50px;
}

/* Горизонтальный слайдер товаров */
.products-slider {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 10px 0;
}

.products-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Фиксированная ширина карточек в слайдере */
.products-slider .product-card {
    flex: 0 0 280px;
    min-width: 280px;
}

/* Кнопки навигации */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.slider-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider-nav-prev {
    left: 0;
}

.slider-nav-next {
    right: 0;
}

/* Скрытие кнопок на мобильных */
@media (max-width: 768px) {
    .slider-nav {
        display: none;
    }

    .products-slider-container {
        padding: 0;
    }
}

/* Сообщение когда нет товаров */
.no-products {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Legacy grid (для других страниц) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.product-card {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    border: 1px solid var(--border-light);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
}

.product-favorite {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-light);
    border: 1px solid var(--border-light);
    z-index: 1;
}

.product-favorite:hover {
    color: var(--accent-pink);
    transform: scale(1.1);
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-lightest) 0%, var(--bg-secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image i {
    font-size: 4rem;
    color: var(--primary-light);
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-name a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars {
    color: var(--accent-yellow);
    font-size: 0.9rem;
}

.rating-value {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-old {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.btn-cart {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-light);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cart:hover {
    background: var(--primary-color);
    transform: scale(1.02);
}

/* ============================================
   PROMO BANNER
   ============================================ */
.promo-banner {
    padding: 70px 20px;
    background: linear-gradient(135deg, var(--accent-blue-light) 0%, var(--primary-lightest) 100%);
}

.promo-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow-xl);
}

.promo-content h2 {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.promo-content .promo-highlight {
    color: var(--accent-pink);
    font-size: 3rem;
}

.promo-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.promo-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-feature i {
    color: var(--accent-green);
    font-size: 1.3rem;
}

.promo-feature span {
    color: var(--text-secondary);
    font-size: 1rem;
}

.promo-image-placeholder {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--primary-lightest) 0%, var(--accent-blue-light) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-image-placeholder i {
    font-size: 6rem;
    color: var(--primary-light);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    padding: 70px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-container h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.newsletter-container p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 16px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter-btn {
    padding: 16px 40px;
    background: var(--bg-primary);
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* ============================================
   RESPONSIVE - Index Page
   ============================================ */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        order: -1;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .promo-container {
        grid-template-columns: 1fr;
        padding: 35px;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
    }

    .hero-image-placeholder {
        height: 300px;
    }

    .hero-image-placeholder i {
        font-size: 5rem;
    }

    .hero-slider {
        max-width: 100%;
        height: 280px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

    .section-header h2,
    .products-header h2 {
        font-size: 1.8rem;
    }

    .products-section {
        padding: 50px 15px;
    }

    .promo-banner {
        padding: 50px 15px;
    }

    .promo-container {
        padding: 25px;
    }

    .promo-content h2 {
        font-size: 1.8rem;
    }

    .promo-content .promo-highlight {
        font-size: 2.2rem;
    }

    .newsletter-section {
        padding: 50px 15px;
    }

    .newsletter-container h2 {
        font-size: 1.8rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-input {
        padding: 14px 20px;
    }

    .newsletter-btn {
        padding: 14px 30px;
        justify-content: center;
    }
}
