/* ========== Hero ========== */
.hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    background: url('../H1.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.48);
}
.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
    padding: 1rem;
}
.animated-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    margin-bottom: 1rem;
    animation: glow 2.5s ease-in-out infinite alternate;
}
.animated-subtitle {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
    margin-bottom: 1rem;
    animation: glow 2.5s ease-in-out infinite alternate;
}
.hero-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #fff;
    margin-bottom: 2rem;
}

/* Декоративные плавающие элементы hero */
.hero-decor {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.7;
}
.hero-decor.d1 { top: 12%; left: 8%; animation: float 6s ease-in-out infinite; }
.hero-decor.d2 { top: 20%; right: 10%; animation: float 7s ease-in-out infinite 1s; }
.hero-decor.d3 { bottom: 15%; left: 12%; animation: float 5s ease-in-out infinite 0.5s; }
.hero-decor.d4 { bottom: 22%; right: 8%; animation: float 8s ease-in-out infinite 2s; }

/* ========== Секции ========== */
.section-title {
    text-align: center;
    margin: 3rem 0 2rem;
}
.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--pink);
    display: inline-block;
    padding: 0 20px;
}
.title-decor {
    width: 80px;
    height: 3px;
    background: var(--pink);
    margin: 10px auto;
    border-radius: 3px;
}

/* ========== Галерея на главной ========== */
.gallery-section {
    padding: 3.5rem 0;
    overflow: hidden;
}
.about-section { padding: 3.5rem 0; }
.news-section  { padding: 3.5rem 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(233,30,99,0.2);
}
.gallery-item svg,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    color: #fff;
    padding: 1.5rem 1rem 0.8rem;
    font-weight: 500;
    transform: translateY(10px);
    opacity: 0.9;
    transition: all 0.3s ease;
}
.gallery-item:hover .caption {
    transform: translateY(0);
    opacity: 1;
}

/* ========== About ========== */
.about-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.about-text {
    flex: 2;
    min-width: 280px;
    background: #fff;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.about-text p + p { margin-top: 1rem; }
.about-stats {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.stat-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 30px;
    text-align: center;
    font-weight: bold;
    color: var(--pink);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    font-size: 1.1rem;
    transition: transform 0.3s;
}
.stat-item:hover { transform: translateY(-3px); }

/* ========== Новости ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ========== Hero-баннер для МК и Новостей ========== */
.craft-hero {
    position: relative;
    background: transparent;
    padding: 3.5rem 0 3rem;
    text-align: center;
}
/* Локальные иллюстрации hero больше не нужны — их роль играет общий паттерн страницы */
.craft-hero-illustrations {
    display: none;
}
@media (max-width: 768px) {
    .craft-hero { padding: 1.8rem 0 1.4rem; }
    .craft-hero h1 { font-size: clamp(1.5rem, 5vw, 1.9rem); margin-bottom: 6px; }
    .craft-hero-sub { font-size: 0.9rem; }
    .craft-hero-eyebrow { margin-bottom: 8px; }
}
.craft-hero-content {
    position: relative;
    z-index: 1;
}
.craft-hero-eyebrow {
    display: inline-block;
    background: var(--pink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.craft-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.2;
}
.craft-hero-sub {
    color: var(--muted);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}
/* Шапка страницы магазина — поджимаем на мобильном */
@media (max-width: 768px) {
    .shop-page-header .container { padding: 1.2rem 0 0 !important; }
    .shop-page-header h1 { font-size: clamp(1.4rem, 5vw, 1.8rem); margin-bottom: 4px; }
    .shop-page-header p { font-size: 0.88rem; margin-bottom: 0; }
}
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}
.news-card .news-img {
    width: calc(100% - 20px);
    height: 210px;
    object-fit: cover;
    object-position: center top;
    display: block;
    margin: 10px auto 0;
    border-radius: 10px;
    background: #fff;
}
.news-card .news-img.loaded { background: #fff; animation: none; }
.news-card-content { padding: 1.2rem; flex: 1; }
.news-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--pink);
}
.news-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.8rem;
}

/* ========== Мастер-классы — блок на главной (слайдер) ========== */
.mc-home-section {
    background: linear-gradient(180deg, #fff9fb 0%, var(--bg) 100%);
    padding: 4.5rem 0 5.5rem;
    margin-top: 0;
}
.section-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.4rem;
}
.mc-home-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
    font-size: 1rem;
}

.mc-slider-wrap {
    position: relative;
    margin: 1.5rem 0 0;
}
/* Десктоп: 2 ряда горизонтальный скролл — как Netflix */
.mc-slider {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: clamp(400px, 28vw, 580px);
    gap: 1.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.5rem 1.2rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--pink-light) transparent;
}
.mc-slider::-webkit-scrollbar { height: 5px; }
.mc-slider::-webkit-scrollbar-track { background: transparent; }
.mc-slider::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 4px; }
.mc-slider::-webkit-scrollbar-thumb:hover { background: var(--pink); }

.mc-slider-arrow {
    position: absolute;
    top: calc(50% - 28px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: none;
    font-size: 1.6rem;
    color: var(--pink);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(233,30,99,0.18);
    z-index: 2;
    transition: transform 0.15s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.mc-slider-arrow:hover {
    background: var(--pink);
    color: #fff;
    transform: scale(1.08);
}
/* Стрелки показываем всегда — скролл теперь и на десктопе */
.mc-slider-prev { left: -8px; }
.mc-slider-next { right: -8px; }

/* Карточка: превью занимает ~65% высоты, контент ~35% */
.mc-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.mc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(233,30,99,0.15);
}
/* Превью: соотношение 16:8 — шире чем 16:9, много картинки */
.mc-card-cover {
    position: relative;
    aspect-ratio: 16 / 8;
    background: var(--pink-light);
    overflow: hidden;
    flex-shrink: 0;
}
.mc-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mc-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--pink);
    opacity: 0.6;
}
.mc-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0,0,0,0.35), rgba(0,0,0,0.05) 40%);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s;
}
.mc-play-icon::before {
    content: '';
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(233,30,99,0.92);
    display: block;
    position: relative;
}
.mc-play-icon::after {
    content: '';
    position: absolute;
    border-left: 15px solid #fff;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}
.mc-card:hover .mc-play-icon { opacity: 1; }

.mc-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
/* Контент под превью — компактный */
.mc-card-content {
    padding: 0.7rem 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mc-card-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Описание убираем из карточки — экономим место */
.mc-card-content p { display: none; }
.mc-card-footer {
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--muted);
}
.mc-card-products-count {
    color: var(--pink);
    font-weight: 600;
}

.mc-home-footer {
    text-align: center;
    margin-top: 1.5rem;
}
.btn-outline {
    background: transparent;
    color: var(--pink);
    border: 2px solid var(--pink);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
    background: var(--pink);
    color: #fff;
}
