/* style.css */
:root {
    --primary: #FF8BA7;
    --secondary: #59C3C3;
    --accent: #FFC75F;
    --dark: #2D3436;
    --gray: #636E72;
    --light: #FAFAFA;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #FF8BA7 0%, #FFC75F 100%);
    --shadow: 0 10px 40px rgba(0,0,0,0.08);
    --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Nunito', sans-serif;
    background-color: #F0F4F8;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-size: 1.8rem; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex; align-items: center; gap: 10px;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 1rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.header-actions { display: flex; gap: 20px; align-items: center; }
.icon-btn { position: relative; font-size: 1.2rem; cursor: pointer; color: var(--dark); }
.badge {
    position: absolute; top: -8px; right: -8px;
    background: var(--primary); color: white;
    font-size: 0.7rem; width: 18px; height: 18px;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-weight: 700;
}
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* HERO */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}
.hero-content { width: 100%; z-index: 2; }
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.2rem; color: var(--gray); margin-bottom: 40px; max-width: 600px; margin: 0 auto 40px; }

.btn {
    display: inline-block; padding: 15px 40px;
    background: var(--gradient); color: white;
    border-radius: 50px; font-weight: 700; font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(255, 139, 167, 0.4);
    border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(255, 139, 167, 0.6); }

/* CATALOG & GRID */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 1rem; }
.section-subtitle { text-align: center; color: var(--gray); margin-bottom: 3rem; }

.filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
    padding: 10px 25px; border: 2px solid #EEE;
    background: transparent; border-radius: 30px;
    font-weight: 600; cursor: pointer; transition: 0.3s; color: var(--gray);
}
.filter-btn.active, .filter-btn:hover { border-color: var(--secondary); background: var(--secondary); color: white; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: 0.3s; position: relative; border: 1px solid #f0f0f0;
}
.product-card:hover { transform: translateY(-10px); }
.product-img {
    height: 400px;
    width: 100%;
    object-fit: cover;          /* Заполняет всё пространство */
    object-position: center;    /* Фокус на середине (по умолчанию) */
    background: #f9f9f9;
    border-radius: 15px;
    margin-bottom: 15px;
}
.product-info { padding: 20px; }
.product-cat { font-size: 0.8rem; color: var(--secondary); font-weight: 700; text-transform: uppercase; }
.product-title { font-size: 1.2rem; margin: 5px 0; font-weight: 700; }
.product-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 10px 0;
    line-height: 1.6;
    white-space: pre-line;  /* ← Переносы строк работают */
}
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
.price { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.add-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--light); border: none; color: var(--primary);
    font-size: 1.2rem; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.add-btn:hover { background: var(--primary); color: white; }

/* GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; height: 300px; position: relative; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white; opacity: 0; transition: 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ABOUT & CONTACTS */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info { background: white; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; font-size: 1.1rem; }
.contact-item i { color: var(--primary); font-size: 1.5rem; }

/* FOOTER */
footer { background: var(--dark); color: white; padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; color: var(--primary); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ccc; }
.footer-col ul li a:hover { color: white; }
.socials { display: flex; gap: 15px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.socials a:hover { background: var(--primary); }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; color: #777; font-size: 0.9rem; }

/* MODAL */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
    justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.modal-content {
    background: white; padding: 40px; border-radius: var(--radius);
    width: 90%; max-width: 500px; position: relative; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-modal { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer; color: var(--gray); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 2px solid #EEE; border-radius: 10px; font-family: inherit; font-size: 1rem; }
.form-group input:focus { border-color: var(--secondary); outline: none; }
.cart-items { max-height: 200px; overflow-y: auto; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; }

/* MEDIA */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .about-grid { grid-template-columns: 1fr; }
}

/* ========== LIGHTBOX (просмотр изображений) ========== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}

.lightbox-content:hover {
    transform: scale(1.02);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 3001;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    user-select: none;
}

.lightbox-nav:hover {
    background: var(--primary);
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .lightbox-content { max-width: 95%; max-height: 70vh; }
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; padding: 10px; }
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
    .lightbox-close { top: 15px; right: 25px; font-size: 30px; }
}

/* ========== HERO СЛАЙД-ШОУ ========== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 0.3;  /* Прозрачность чтобы текст читался */
}

/* Затемнение */
.hero-slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ========== БЕГУЩАЯ СТРОКА ========== */
.marquee-container {
    background: var(--gradient);
    padding: 15px 0;
    margin: 30px auto 40px;
    border-radius: 50px;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(255, 139, 167, 0.4);
}

.marquee {
    display: flex;
    width: fit-content;
    animation: scroll 30s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;  /* Пауза при наведении */
}

.marquee-item {
    flex-shrink: 0;
    padding: 0 40px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marquee-item:not(:last-child) {
    border-right: 2px solid rgba(255,255,255,0.3);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);  /* Прокручиваем на половину (дубликаты) */
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .marquee-container {
        margin: 20px 10px 30px;
        padding: 12px 0;
        border-radius: 30px;
    }
    
    .marquee {
        animation: scroll 20s linear infinite;  /* Быстрее на мобильном */
    }
    
    .marquee-item {
        padding: 0 25px;
        font-size: 0.9rem;
    }
    
    .hero {
        min-height: 90vh;
        padding: 140px 0 80px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Убираем старые декоративные шары если есть */
.bg-ballon {
    display: none;  /* Или оставь если хочешь */
}

/* ========== ЛОГОТИП ШАРИК.РУ ========== */
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FF8BA7 0%, #FFC75F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-balloons {
    display: inline-flex;
    position: relative;
    width: 60px;
    height: 50px;
    /* ← Убедились что это НЕ наследует прозрачность */
    -webkit-text-fill-color: initial !important;
}

.logo-balloon {
    font-size: 2.5rem;
    position: absolute;
    display: inline-block;
    line-height: 1;
    /* ← ВОЗВРАЩАЕМ ЦВЕТ эмодзи */
    -webkit-text-fill-color: initial !important;
    color: #FF8BA7;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
}

.balloon-1 {
    left: 0;
    top: 0;
    animation: dance1 2s ease-in-out infinite, colorChange1 3s ease-in-out infinite;
}

.balloon-2 {
    right: 0;
    top: 0;
    animation: dance2 2s ease-in-out infinite, colorChange2 3s ease-in-out infinite;
}

@keyframes dance1 {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-10px) rotate(-15deg); }
}

@keyframes dance2 {
    0%, 100% { transform: translateY(0) rotate(10deg); }
    50% { transform: translateY(-10px) rotate(15deg); }
}

@keyframes colorChange1 {
    0%, 100% { filter: hue-rotate(0deg) drop-shadow(0 3px 5px rgba(0,0,0,0.2)); }
    50% { filter: hue-rotate(90deg) drop-shadow(0 5px 10px rgba(0,0,0,0.3)); }
}

@keyframes colorChange2 {
    0%, 100% { filter: hue-rotate(180deg) drop-shadow(0 3px 5px rgba(0,0,0,0.2)); }
    50% { filter: hue-rotate(270deg) drop-shadow(0 5px 10px rgba(0,0,0,0.3)); }
}

@media (max-width: 768px) {
    .logo { font-size: 1.4rem; }
    .logo-balloon { font-size: 2rem; }
    .logo-balloons { width: 50px; height: 40px; }
}

/* Танец первого шарика */
@keyframes dance1 {
    0%, 100% { 
        transform: translateY(0) rotate(-10deg) scale(1); 
    }
    25% { 
        transform: translateY(-8px) rotate(-15deg) scale(1.1); 
    }
    50% { 
        transform: translateY(-5px) rotate(-5deg) scale(1); 
    }
    75% { 
        transform: translateY(-10px) rotate(-12deg) scale(1.05); 
    }
}

/* Танец второго шарика */
@keyframes dance2 {
    0%, 100% { 
        transform: translateY(0) rotate(10deg) scale(1); 
    }
    25% { 
        transform: translateY(-10px) rotate(15deg) scale(1.05); 
    }
    50% { 
        transform: translateY(-5px) rotate(5deg) scale(1); 
    }
    75% { 
        transform: translateY(-8px) rotate(12deg) scale(1.1); 
    }
}

/* Переливание цвета - первый шарик */
@keyframes colorChange1 {
    0%, 100% { 
        filter: hue-rotate(0deg) drop-shadow(0 5px 10px rgba(255, 139, 167, 0.4)); 
    }
    50% { 
        filter: hue-rotate(45deg) drop-shadow(0 5px 15px rgba(255, 199, 95, 0.6)); 
    }
}

/* Переливание цвета - второй шарик */
@keyframes colorChange2 {
    0%, 100% { 
        filter: hue-rotate(180deg) drop-shadow(0 5px 10px rgba(89, 195, 195, 0.4)); 
    }
    50% { 
        filter: hue-rotate(225deg) drop-shadow(0 5px 15px rgba(255, 139, 167, 0.6)); 
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .logo {
        font-size: 1.4rem;
    }
    .logo-balloon {
        font-size: 1.8rem;
    }
    .logo-balloons {
        width: 40px;
        height: 40px;
    }
}
