/* =========================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
:root {
    /* Цветовая палитра */
    --color-bg: #FAFAFA;          /* Общий фон (очень светлый серый) */
    --color-white: #FFFFFF;       /* Белый для карточек и блоков */
    --color-text-main: #2B2B2B;   /* Основной текст (почти черный) */
    --color-text-muted: #6B6B6B;  /* Второстепенный текст */
    --color-accent: #FFD54F;      /* Солнечный желтый */
    --color-accent-hover: #FFC107;/* Желтый при наведении */
    --color-gradient-start: #FFE082;
    --color-gradient-end: #FFB74D;
    
    /* UI Элементы */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Тени и анимации */
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. КНОПКИ
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-text-main);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background-color: var(--color-bg);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background-color: #EAEAEA;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-text-main);
}

.w-100 { width: 100%; }

/* =========================================
   3. ГЛАВНЫЙ ЭКРАН (HERO)
   ========================================= */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--color-white);
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Затемнение 50% */
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    display: block;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    margin-top: 16px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   4. СЕТКА КАТАЛОГА (MERCHANT READY)
   ========================================= */
.catalog-section {
    padding: 80px 0;
}

.catalog-grid {
    display: grid;
    /* 3-4 карточки в ряд на desktop */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.card-media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #F0F0F0;
    overflow: hidden;
}

.card-media img,
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: opacity 0.4s ease;
}

.hover-video {
    opacity: 0;
    z-index: 2;
}

.product-card:hover .hover-video {
    opacity: 1;
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--color-white);
    color: #27AE60;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

/* =========================================
   5. СТРАНИЦА ТОВАРА (PRODUCT PAGE)
   ========================================= */
.product-page {
    padding: 60px 20px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 992px) {
    .product-layout {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }
}

/* Зум и галерея */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-white);
    cursor: crosshair;
    box-shadow: var(--shadow-soft);
}

.main-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* ЛИНЗА ЗУМА */
.zoom-lens {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    pointer-events: none;
    display: none;
    z-index: 10;
    background-repeat: no-repeat;
    background-color: var(--color-white);
}

.thumbnail-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px; /* Для скроллбара на мобильных */
}

.thumbnail-list::-webkit-scrollbar {
    height: 4px;
}
.thumbnail-list::-webkit-scrollbar-thumb {
    background: #DDD;
    border-radius: 4px;
}

.thumb {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    background: transparent;
    padding: 0;
}

.thumb img, .thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.active, .thumb:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Инфо блок товара */
.sku-stock {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.status-in {
    color: #27AE60;
    font-weight: 600;
}

.product-info h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 24px;
}

.price-block .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    display: block;
    margin-bottom: 32px;
}

.specs-list {
    list-style: none;
    margin-bottom: 40px;
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.specs-list li {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    justify-content: space-between;
}

.specs-list li:last-child {
    border-bottom: none;
}

.trust-blocks {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trust-item {
    background: #F9F9F9;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.product-description {
    margin-top: 80px;
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.product-description h2 {
    margin-bottom: 24px;
}

/* =========================================
   6. БЛОК КОНТАКТОВ (SOLAR)
   ========================================= */
.contacts-solar {
    margin: 80px 20px;
}

.contacts-wrapper {
    background: linear-gradient(135deg, var(--color-gradient-start) 0%, var(--color-gradient-end) 100%);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(255, 183, 77, 0.2);
    color: #333; /* Темный текст для контраста */
}

.sun-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 24px;
    display: inline-block;
    animation: pulseSun 3s ease-in-out infinite;
}

@keyframes pulseSun {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.contacts-wrapper h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 16px;
    font-weight: 800;
}

.contact-details {
    margin: 32px 0;
}

.contact-details .phone {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #111;
    text-decoration: none;
    margin-bottom: 8px;
    transition: var(--transition);
}

.contact-details .phone:hover {
    color: #fff;
}

.contact-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}
.btn-whatsapp:hover {
    background-color: #1EBE5C;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-dark {
    background-color: #2B2B2B;
    color: white;
}
.btn-dark:hover {
    background-color: #000;
}

/* =========================================
   7. АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================= */
@media (max-width: 768px) {
    .card-buttons {
        grid-template-columns: 1fr; /* Кнопки в карточке друг под другом на мобилке */
    }
    
    .contacts-solar {
        margin: 40px 10px;
    }
    
    .contacts-wrapper {
        padding: 40px 20px;
    }
    
    .product-description {
        padding: 24px;
        margin-top: 40px;
    }
}
/* --- КОРЗИНА --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px; /* Скрыта за экраном */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open { right: 0; }

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-info h4 { font-size: 0.95rem; margin-bottom: 5px; }
.cart-item-price { font-weight: bold; color: var(--color-text-main); }
.remove-item { color: #e74c3c; cursor: pointer; font-size: 0.8rem; border: none; background: none; }

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}
/* =========================================
   8. ШАПКА САЙТА (HEADER)
   ========================================= */
.main-header {
    background-color: var(--color-white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--color-accent-hover);
}

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

.header-phone {
    font-weight: 700;
    color: var(--color-text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-btn {
    background: var(--color-bg);
    border: 1px solid #EAEAEA;
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.cart-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.cart-count {
    background: #E74C3C;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* =========================================
   9. ПОДВАЛ САЙТА (FOOTER)
   ========================================= */
.main-footer {
    background-color: var(--color-white);
    border-top: 1px solid #EAEAEA;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    text-decoration: none;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--color-accent-hover);
}

.footer-col p {
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #EAEAEA;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Адаптив для шапки на мобильных */
@media (max-width: 992px) {
    .main-nav { display: none; } /* Скрываем меню на мобилках (нужен бургер) */
    .header-phone { display: none; }
}
/* =========================================
   СТИЛИ ДЛЯ КАРТОЧКИ ТОВАРА (ТВОЙ ВАРИАНТ)
   ========================================= */

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column; /* Важно для выравнивания кнопок */
    height: 100%; /* Карточки одной высоты в сетке */
    position: relative;
    border: 1px solid #F0F0F0;
}

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

/* Блок с картинкой/видео */
.card-media {
    position: relative;
    aspect-ratio: 4 / 5; /* Идеальные пропорции для штор */
    background: var(--color-bg);
    overflow: hidden;
}

/* Картинка в галерее */
.card-gallery, .card-gallery a {
    width: 100%;
    height: 100%;
    display: block;
}

.card-gallery img.main-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-gallery img.main-thumb {
    transform: scale(1.05); /* Эффект премиальности */
}

/* Видео (скрыто по умолчанию, поверх картинки) */
.hover-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Чтобы не мешало кликать */
}

.product-card:hover .hover-video {
    opacity: 1; /* Появляется при наведении */
}

/* Бейджик */
.badge.in-stock {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--color-white);
    color: #27AE60;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Информационный блок */
.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Растягивает блок, выталкивая кнопки вниз */
}

.product-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Максимум 2 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: var(--transition);
}

.product-title a:hover {
    color: var(--color-accent-hover);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 20px;
}

/* Кнопки прижаты к низу */
.card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto; /* ВОТ ЭТО прижимает кнопки к самому низу карточки! */
}

.btn-sm {
    padding: 10px 15px;
    font-size: 0.9rem;
    text-align: center;
}