/* style.css - СОЧИ-ШАРИК.РУ */

/* ===== 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; cursor: pointer; }

.container { 
    max-width: 1400px; 
    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: 8px;
    text-decoration: none;
    margin-left: 20px;  /* ✅ СДВИГАЕМ ЛОГОТИП ЛЕВЕЕ */
}

.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) 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)); }
}

/* Навигация */
.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;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* Иконки контактов */
.header-icons {
    display: flex;
    gap: 10px;
    padding-right: 15px;
    border-right: 1px solid rgba(0,0,0,0.1);
    margin-right: 10px;
}

.header-icons .icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-icons .icon-circle:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.header-icons .icon-circle .fa-telegram,
.header-icons .icon-circle .fa-whatsapp {
    font-size: 1rem;
}

/* Корзина */
.icon-btn {
    position: relative;
    font-size: 1.3rem;
    color: var(--dark);
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

.icon-btn .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.3rem;
    color: var(--dark);
    padding: 8px;
}

/* ===== HERO SECTION ===== */
.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;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 139, 167, 0.6);
}

/* Слайд-шоу на фоне */
.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);
}

/* Бегущая строка */
.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%); }
}

/* ===== 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;
}

/* ===== 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; }

/* ===== DADATA ПОДСКАЗКИ ===== */
.address-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.address-suggestions .suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.address-suggestions .suggestion-item:hover {
    background: #f0f7ff;
}

.address-suggestions .suggestion-item small {
    color: #666;
    font-size: 0.9em;
    display: block;
    margin-top: 2px;
}

input.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1) !important;
}

/* ===== TOAST УВЕДОМЛЕНИЯ ===== */
.toast {
    position: fixed;
    top: 20px; right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: toastSlideIn 0.3s ease, toastFadeOut 0.3s ease 4.7s forwards;
    max-width: 320px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast.info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-message { flex: 1; }

.toast-message small {
    display: block;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 4px;
    font-size: 0.9em;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
    .header-icons {
        gap: 8px;
        padding-right: 10px;
    }
    .header-icons .icon-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    /* Header */
    .logo { font-size: 1.4rem; margin-left: 15px; }
    .logo-balloon { font-size: 1.8rem; }
    .logo-balloons { width: 40px; height: 40px; }
    
    .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; }
    
    .header-actions { gap: 10px; }
    .header-icons {
        gap: 6px;
        padding-right: 8px;
        margin-right: 8px;
    }
    .header-icons .icon-circle {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    /* Hero */
    .hero {
        min-height: 90vh;
        padding: 140px 0 80px;
    }
    .hero h1 { font-size: 2.2rem; }
    
    /* Marquee */
    .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; }
    
    /* About */
    .about-grid { grid-template-columns: 1fr; }
    
    /* Lightbox */
    .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; }
    
    /* Dadata */
    .address-suggestions {
        max-height: 200px;
        font-size: 13px;
    }
    
    /* Toast */
    .toast {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 14px 20px;
    }
    @keyframes toastFadeOut {
        from { opacity: 1; transform: translateY(0); }
        to { opacity: 0; transform: translateY(20px); }
    }
}

@media (max-width: 480px) {
    .header-icons { display: none; }
    .header-actions { gap: 12px; }
    .icon-btn { font-size: 1.4rem; }
}

/* ===== ОТСТУП ЛОГОТИПА ОТ МЕНЮ ===== */
.logo {
    margin-right: 80px !important;
}

/* Для мобильных меньше отступ */
@media (max-width: 768px) {
    .logo {
        margin-right: 15px !important;
    }
}

/* Большие SVG иконки в контактах */
.icon-svg-large {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

/* Hover эффект для кнопок контактов */
.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ===== КОНТАКТЫ В ФУТЕРЕ ===== */

/* По умолчанию скрыто (на десктопе) */
.footer-contacts {
    display: none;
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.footer-contact-item:hover {
    transform: translateY(-3px);
}

.footer-icon {
    width: 36px;
    height: 36px;
}

/* Показываем только на мобильных */
@media (max-width: 768px) {
    .footer-contacts {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 30px;
        padding: 20px 20px 15px;
        background: var(--dark);
        border-bottom: none;
    }
    
    footer {
        padding: 0 0 15px;
    }
    
    .copyright {
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 15px;
        font-size: 0.85rem;
    }
    
    /* Убираем отступ у body */
    body {
        padding-bottom: 0;
    }
    
    /* Скрываем иконки в шапке на мобильных */
    .header-icons {
        display: none;
    }
}
