/* home.css - СТИЛИ ТОЛЬКО ДЛЯ ГЛАВНОЙ СТРАНИЦЫ */

/* Hero Section с видео-фоном */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    width: 100%;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    min-width: 100%;
    min-height: 100%;
}

.video-background video {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(46, 125, 50, 0.2) 0%,
        rgba(76, 175, 80, 0.15) 50%,
        rgba(255, 152, 0, 0.15) 100%
    );
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Кнопка переключения видео */
.video-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 4;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    display: none;
    transition: all 0.3s ease;
}

.video-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Класс для скрытия видео */
.video-hidden .video-background {
    display: none;
}

.video-hidden .video-toggle {
    background: var(--accent-color);
}

.video-hidden.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Advantages - С ПОДСВЕТКОЙ */
.advantages {
    background: var(--white);
}

.advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.advantage-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(46, 125, 50, 0.25);
    border-color: rgba(46, 125, 50, 0.2);
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.advantage-card:hover .advantage-icon {
    transform: scale(1.1);
}

.advantage-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.advantage-card:hover h3 {
    color: var(--secondary-color);
}

/* Categories - С ПОДСВЕТКОЙ */
.categories {
    background: var(--background-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.category-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 152, 0, 0.25);
    border-color: rgba(255, 152, 0, 0.2);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.category-card:hover h3 {
    color: var(--accent-color);
}

/* Products - С ПОДСВЕТКОЙ */
.products {
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.25);
    border-color: rgba(76, 175, 80, 0.3);
}

.product-images {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.product-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-images img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.product-card:hover .product-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.product-card:hover .product-title {
    color: var(--secondary-color);
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.product-card:hover .product-description {
    color: #555;
}

.product-characteristics {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.product-card:hover .product-characteristics {
    background: #e8f5e8;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.characteristic {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-rating {
    color: #ffc107;
}

.product-reviews {
    color: #666;
    font-size: 0.8rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.product-card:hover .current-price {
    color: var(--secondary-color);
}

.old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.product-stock {
    color: #28a745;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-cart {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-cart:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-favorite {
    background: none;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.btn-favorite:hover {
    color: #dc3545;
    border-color: #dc3545;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

/* Delivery Info - С ПОДСВЕТКОЙ */
.delivery-info {
    background: var(--background-light);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.info-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.info-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.info-card:hover::after {
    width: 100%;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(46, 125, 50, 0.25);
    border-color: rgba(46, 125, 50, 0.2);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.info-card:hover h3 {
    color: var(--secondary-color);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.info-card:hover li::before {
    color: var(--accent-color);
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card:hover li {
    border-bottom-color: #e0e0e0;
}

/* Адаптивность для главной */
@media (min-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h2 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .video-toggle {
        bottom: 10px;
        right: 10px;
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .advantage-card:hover,
    .category-card:hover,
    .product-card:hover,
    .info-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
        min-height: 300px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 1200px) {
    .video-background video {
        width: 100vw !important;
        height: 100vh !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-background video {
        display: none;
    }

    .advantage-card,
    .category-card,
    .product-card,
    .info-card {
        transition: none !important;
    }

    .advantage-card:hover,
    .category-card:hover,
    .product-card:hover,
    .info-card:hover {
        transform: none !important;
    }
    /* Стили для отсутствующих товаров на главной */
.product-card .out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.product-card .out-of-stock-overlay span {
    background: #dc3545;
    color: white;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-25deg);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.product-card.product-out-of-stock:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.15);
}
}