/* Основные стили сайта */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2D2D2D;
    background-color: #ffffff;
    overflow-x: hidden;
}

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

/* Типография */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
}

.btn-primary {
    background-color: #585E92;
    color: white;
}

.btn-primary:hover {
    background-color: #d94848;
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background-color: var(--coffee);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #585E92;
    color: #585E92;
}

.btn-outline:hover {
    background-color: #585E92;
    color: white;
}

.btn-florist {
    background-color: #ffffff;
    color: #000000;
}

.btn-call {
    background-color: #585E92;
    color: white;
    white-space: nowrap;
}

.btn-call:hover {
    background-color: #d94848;
    transform: translateY(-2px);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-hero {
    padding: 16px 32px;
    margin: 0 10px 10px 0;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Секции */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-family: Kudryashev Display Sans;
    font-size: 2.5rem;
}

/* Шапка */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 15px 0;
}

/* Логотип: двухстрочный текст + анимированные цветочки по углам */
.logo {
    flex-shrink: 0;
}

.logo-link {
    display: block;
}

.logo-link.logo-wordmark {
    line-height: normal;
}

.logo-wordmark {
    color: #585e92;
    text-decoration: none;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.logo-wordmark:hover {
    color: #4a507c;
}

.logo-wordmark:focus-visible {
    outline: 2px solid #585e92;
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-wordmark__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.06;
    padding: 2px 12px 4px;
    min-height: 2.85rem;
}

.logo-wordmark__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Цветы: появление → подсветка → исчезновение (разнесённые по фазе) */
.logo-bloom {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    animation: logo-bloom-cycle 5.4s ease-in-out infinite;
    animation-delay: var(--logo-bloom-delay, 0s);
    will-change: opacity, transform, filter;
}

/* Ближе к буквам, без зеркальной симметрии углов */
.logo-bloom--tl {
    top: 1px;
    left: -4px;
}

.logo-bloom--tr {
    top: 6px;
    right: 1px;
}

.logo-bloom--bl {
    bottom: -3px;
    left: 5px;
}

.logo-bloom--br {
    bottom: 2px;
    right: -5px;
}

.logo-bloom__svg {
    display: block;
    overflow: visible;
}

.logo-bloom--tl .logo-bloom__svg {
    transform: rotate(-7deg);
}

.logo-bloom--tr .logo-bloom__svg {
    transform: rotate(11deg) translate(1px, -1px);
}

.logo-bloom--bl .logo-bloom__svg {
    transform: rotate(4deg) translate(-2px, 1px);
}

.logo-bloom--br .logo-bloom__svg {
    transform: rotate(-13deg) translate(2px, 0);
}

@keyframes logo-bloom-cycle {
    0%, 7% {
        opacity: 0;
        transform: scale(0.32) rotate(-18deg);
        filter: brightness(1);
    }
    20% {
        opacity: 1;
        transform: scale(1) rotate(2deg);
        filter: brightness(1.12) drop-shadow(0 0 4px rgba(88, 94, 146, 0.85)) drop-shadow(0 0 12px rgba(120, 130, 190, 0.55));
    }
    36% {
        opacity: 1;
        transform: scale(1.09) rotate(-6deg);
        filter: brightness(1.28) drop-shadow(0 0 8px rgba(72, 78, 130, 0.9)) drop-shadow(0 0 18px rgba(140, 150, 210, 0.45));
    }
    55% {
        opacity: 0.35;
        transform: scale(0.84) rotate(5deg);
        filter: brightness(1.04) drop-shadow(0 0 3px rgba(88, 94, 146, 0.35));
    }
    72%, 100% {
        opacity: 0;
        transform: scale(0.42) rotate(12deg);
        filter: brightness(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-bloom {
        animation: none;
        opacity: 0.5;
        transform: scale(0.88);
        filter: drop-shadow(0 0 4px rgba(88, 94, 146, 0.4));
    }
}

.logo-wordmark--drawer .logo-bloom {
    display: none;
}

.logo-wordmark__line {
    font-family: 'Playfair Display', 'Times New Roman', Times, Georgia, serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    display: block;
    text-align: center;
}

.logo-wordmark__line--lg {
    font-size: 1.48rem;
}

.logo-wordmark__line--sm {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    margin-top: 0.12em;
    font-weight: 500;
}

.logo-wordmark--drawer .logo-wordmark__line--lg {
    font-size: 1.18rem;
}

.logo-wordmark--drawer .logo-wordmark__line--sm {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
}

/* Скрытый текст для SEO и экранных читалок */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .logo-wordmark__line--lg {
        font-size: 1.22rem;
    }

    .logo-wordmark__line--sm {
        font-size: 0.8rem;
        letter-spacing: 0.14em;
    }

    .logo-wordmark__inner {
        padding: 2px 10px 4px;
    }

    .logo-bloom--tl .logo-bloom__svg {
        width: 16px;
        height: 16px;
    }

    .logo-bloom--tr .logo-bloom__svg {
        width: 20px;
        height: 20px;
    }

    .logo-bloom--bl .logo-bloom__svg {
        width: 12px;
        height: 12px;
    }

    .logo-bloom--br .logo-bloom__svg {
        width: 17px;
        height: 17px;
    }

    .logo-bloom--tl {
        left: -2px;
    }

    .logo-bloom--tr {
        top: 4px;
        right: 0;
    }

    .logo-bloom--bl {
        left: 3px;
    }

    .logo-bloom--br {
        right: -3px;
    }

    .header-inner {
        padding: 12px 0;
    }
}

.mobile-menu-header .logo {
    flex: 1;
    min-width: 0;
}

.mobile-menu-header .logo-wordmark {
    align-items: flex-start;
}

.mobile-menu-header .logo-wordmark__inner {
    align-items: flex-start;
    padding-left: 0;
    padding-right: 0;
}

.mobile-menu-header .logo-wordmark__stack {
    align-items: flex-start;
}

.mobile-menu-header .logo-wordmark__line {
    text-align: left;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(0.45rem, 1.1vw, 1.15rem);
}

.main-nav li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1.2;
    padding: 0.35rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #2d2d2d;
}

.main-nav a.active {
    color: #585e92;
    font-weight: 600;
}

.main-nav a:hover {
    color: #585e92;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 1rem;
}

.site-header .header-actions .btn-florist {
    white-space: nowrap;
}

@media (min-width: 993px) and (max-width: 1160px) {
    .site-header .main-nav ul {
        gap: 0.4rem;
    }

    .site-header .main-nav a {
        font-size: 0.875rem;
    }
}

.phone a {
    font-weight: 500;
    white-space: nowrap;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-count {
    background-color: #585E92;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #585E92;
    border-radius: 3px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 300px;
    height: 100%;
    background-color: white;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.close-menu {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.mobile-nav ul {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    margin-bottom: 1rem;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-contacts {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* Нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: none;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 0.7rem;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #585E92;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Объединенная секция герой + категории */
.hero-with-categories {
    padding: 28px 0 56px;
    /* фон и тема — css/hero-themes.css (data-hero-theme на секции) */
}

.hero-categories-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

/* Левая часть: герой-контент */
.hero-main-content {
    max-width: 600px;
    padding-top: 0;
}

/*
 * Главная: визуальный центр левого блока ≈ середина зазора между 1-м и 2-м рядом карточек «поводов»
 * (под заголовком «Выберите повод», сетка 3×2 на ≥992px). Значение с clamp — под разную высоту карточек.
 */
@media (min-width: 993px) {
    .home-page .hero-with-categories .hero-main-content {
        padding-top: clamp(4.25rem, 9vh, 7.5rem);
    }
}

.hero-main-content .hero-title {
    margin-top: 0;
    margin-bottom: 0.65rem;
}

.hero-main-content .hero-title.hero-title-primary {
    margin-bottom: 1.3rem;
    font-size: clamp(1.85rem, 4.2vw, 2.55rem);
    line-height: 1.2;
    max-width: 22em;
}

.hero-main-content .hero-tagline {
    margin: 0 0 0.65rem;
    font-size: clamp(1.65rem, 3.6vw, 2.2rem);
    line-height: 1.18;
    max-width: 22em;
    font-weight: 600;
}

.hero-main-content .hero-subtitle {
    margin: 0 0 0.65rem;
    max-width: 36rem;
}

.hero-main-content .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin-top: 0.85rem;
}

/* Главная: одинаковые «воздушные» зазоры между заголовками, текстом и кнопками */
.home-page .hero-with-categories .hero-main-content {
    --hero-stack-rhythm: clamp(0.875rem, 1.85vw, 1.35rem);
}

.home-page .hero-with-categories .hero-main-content .hero-title.hero-title-primary {
    margin-bottom: var(--hero-stack-rhythm);
}

.home-page .hero-with-categories .hero-main-content .hero-tagline {
    margin-top: 0;
    margin-bottom: var(--hero-stack-rhythm);
}

.home-page .hero-with-categories .hero-main-content .hero-subtitle {
    margin-top: 0;
    margin-bottom: var(--hero-stack-rhythm);
    line-height: 1.58;
}

.home-page .hero-with-categories .hero-main-content .hero-buttons {
    margin-top: 0;
}

/* Правая часть: категории */
.hero-categories-sidebar {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.hero-categories-title {
    font-size: 2rem;
    font-family: Kudryashev Display Sans;
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #585E92;
    text-align: left;
}

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

@media (min-width: 992px) {
    .hero-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.hero-category-item {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.hero-category-item:hover {
    transform: translateY(-5px);
    border-color: #585E92;
    box-shadow: 0 8px 25px rgba(217, 72, 72, 0.1);
}

.hero-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}

.hero-category-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
}

.hero-category-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color:#585E92
}

.hero-category-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Адаптивность для объединенной секции */
@media (max-width: 992px) {
    .hero-categories-container {
        grid-template-columns: 1fr;
        /* gap: 40px;*/
    }
    
    .hero-main-content {
        max-width: 100%;
    }
    
    .hero-categories-title {
        text-align: center;
    }
    
    .hero-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .hero-category-item {
        padding: 1.25rem;
    }

    .hero-category-icon {
        max-width: 120px;
    }
}

@media (max-width: 576px) {
    .hero-with-categories {
        padding: 24px 0 40px;
    }
    
    .hero-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-category-item {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-category-icon {
        max-width: 112px;
    }
}

/* Товары */
.products-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all {
    color: #585E92;
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

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

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #d94848;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #d94848;
}

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

/* Шаги */
.steps-section {
    padding: 60px 0;
    background-color: var(--cream-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: #585E92;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 1.5rem;
}

/* Преимущества */
.features-section {
    padding: 60px 0;
}

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

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.feature h3 {
    margin: 0 0 0.5rem;
}

.feature p {
    margin: 0;
    max-width: 22rem;
}

/* Отзывы */
.reviews-section {
    padding: 60px 0;
    background-color: var(--cream-light);
}

.reviews-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.review-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.review-author {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.review-text {
    margin-bottom: 1rem;
    font-style: italic;
}

.review-rating {
    color: #FFD700;
    font-size: 1.2rem;
}

/* CTA секция */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #585E92 0%, #858fdf 100%);
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-family: Kudryashev Display Sans;
    margin-bottom: 1rem;
    color: #ffffff;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: white;
    color: #585E92;
}

.btn-secondary:hover {
    background-color: var(--cream);
}


/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

.florist-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 2rem;
}

.florist-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.florist-option:hover {
    background-color: var(--cream-light);
    transform: translateX(5px);
}

.option-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.option-content h3 {
    margin-bottom: 0.25rem;
}

.option-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.florist-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Лоадер */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

/* Анимации для текста */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #585E92;
    }
}

@keyframes textReveal {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для анимированного заголовка - ТОЛЬКО НАЧАЛЬНЫЕ СОСТОЯНИЯ */
.hero-title.lines-animated,
.hero-tagline.lines-animated {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Изначально скрываем строки */
.hero-title.lines-animated .line,
.hero-tagline.lines-animated .line {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

/* Анимация через CSS без JavaScript - просто добавьте эти классы в HTML */
.hero-title.animated .line:nth-child(1) {
    animation: textReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 0.3s;
}

.hero-title.animated .line:nth-child(2) {
    animation: textReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 1.2s;
}

.hero-tagline.animated .line:nth-child(1) {
    animation: textReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 0.85s;
}

.hero-tagline.animated .line:nth-child(2) {
    animation: textReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 1.55s;
}

/* Для других элементов - начальные состояния */
.animated-subtitle {
    opacity: 0;
}

.animated-btn {
    opacity: 0;
    transform: translateY(20px);
}

.animated-title {
    opacity: 0;
    transform: translateY(20px);
}

.animated-category {
    opacity: 1;
    transform: translateY(0);
}

/* На главной (hero) элементы появляются через .animate */
.hero-with-categories .animated-category {
    opacity: 0;
    transform: translateY(20px);
}

/* Анимации при добавлении класса .animate */
.hero-with-categories.animate .animated-subtitle {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.8s;
}

.hero-with-categories.animate .animated-btn:nth-child(1) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 2.3s;
}

.hero-with-categories.animate .animated-btn:nth-child(2) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 2.5s;
}

.hero-with-categories.animate .animated-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-with-categories.animate .animated-category:nth-child(1) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-with-categories.animate .animated-category:nth-child(2) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-with-categories.animate .animated-category:nth-child(3) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

.hero-with-categories.animate .animated-category:nth-child(4) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1.0s;
}

.hero-with-categories.animate .animated-category:nth-child(5) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

.hero-with-categories.animate .animated-category:nth-child(6) {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

/* Убираем старые классы */
.fade-in,
.slide-up {
    /* Убираем стили, чтобы не конфликтовали */
    opacity: 1;
    animation: none;
}

/* Главная: карусель "Самые тёплые букеты" (не влияет на каталог) */
.products-section .products-carousel-wrapper{
    position: relative;
}

.products-section .products-carousel{
    display: flex;
    gap: 30px;
    overflow: hidden;
    scroll-behavior: smooth;
    padding: 6px 44px; /* место под стрелки */
}

.products-section .products-carousel .product-card{
    flex: 0 0 250px;
}

.products-section .carousel-btn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    z-index: 2;
}

.products-section .carousel-prev{ left: 0; }
.products-section .carousel-next{ right: 0; }

@media (max-width: 768px){
    .products-section .products-carousel{
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 6px 12px;
    }
    .products-section .products-carousel .product-card{
        flex: 0 0 72%;
        scroll-snap-align: start;
    }
    .products-section .carousel-btn{ display: none; }
}


/* ALL CATALOG: сетка категорий (ПК 3 колонки, моб 2) */
@media (min-width: 992px) {
    .all-catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .all-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
