/* ============================================================
   mestofoto.ru — Lottie Animations CSS
   ============================================================ */

/* ── ПРЕЛОАДЕР ──────────────────────────────────────────────── */
#mf-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    /* transition управляется из JS для разных эффектов */
    overflow: hidden;
}

#mf-preloader.mf-preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Эффект: blur overlay (для Reveal+Blur) ─────────────────── */
#mf-blur-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, backdrop-filter 0.6s ease, visibility 0.6s ease;
}

#mf-blur-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Эффект: particle dissolve ─────────────────────────────── */
.mf-particle {
    position: absolute;
    background: #fff;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.mf-preloader__anim {
    width: 280px;
    height: 280px;
    max-width: 65vw;
    max-height: 65vw;
}

.mf-preloader__text {
    margin-top: 20px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: #e8a0b4;
    background: linear-gradient(90deg, #f4a7be, #e06090, #f4a7be);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: mf-shimmer 2.4s linear infinite;
}

@keyframes mf-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@media (max-width: 600px) {
    .mf-preloader__anim {
        width: 180px;
        height: 180px;
    }
    .mf-preloader__text {
        font-size: 15px;
    }
}

/* ── ПУСТАЯ КОРЗИНА ─────────────────────────────────────────── */
.mf-empty-cart .bx-sbb-empty-cart-image {
    display: flex;
    justify-content: center;
    background: none !important;
    margin-top: -100px; /* поднимаем весь блок вверх */
}

.mf-empty-cart-anim {
    width: 220px;
    height: 220px;
}

@media (max-width: 600px) {
    .mf-empty-cart .bx-sbb-empty-cart-image {
        margin-top: -50px;
    }
    .mf-empty-cart-anim {
        width: 160px;
        height: 160px;
    }
}

/* ── 404 СТРАНИЦА ───────────────────────────────────────────── */
.mf-404-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    text-align: center;
}

#mf-404-anim {
    width: 340px;
    height: 340px;
    max-width: 80vw;
    max-height: 80vw;
}

.mf-404-wrap h1 {
    font-size: 2rem;
    margin: 16px 0 8px;
    color: #222;
}

.mf-404-wrap p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 24px;
}

.mf-404-wrap .mf-btn-home {
    display: inline-block;
    padding: 12px 32px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s;
}

.mf-404-wrap .mf-btn-home:hover {
    background: #555;
}

.mf-404-fallback {
    font-size: 120px;
    font-weight: 700;
    color: #eee;
    line-height: 1;
}

@media (max-width: 600px) {
    #mf-404-anim {
        width: 220px;
        height: 220px;
    }
    .mf-404-wrap h1 { font-size: 1.5rem; }
}

/* ── КОРЗИНА — POPUP ────────────────────────────────────────── */
.mf-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.mf-cart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 99999;
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    min-width: 260px;
}

.mf-cart-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.mf-cart-popup__anim {
    width: 160px;
    height: 160px;
}

.mf-cart-popup__text {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-align: center;
}

@media (max-width: 480px) {
    .mf-cart-popup {
        padding: 24px 24px;
        min-width: 220px;
    }
    .mf-cart-popup__anim {
        width: 120px;
        height: 120px;
    }
}
