/* public/css/fofi-media.css - Renderização inteligente e responsiva de imagens Fofi Donuts */

.fofi-img-frame {
    position: relative;
    width: 100%;
    aspect-ratio: var(--fofi-aspect, auto);
    overflow: hidden;
    background: linear-gradient(135deg, #fff5f8 0%, #fff0f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .fofi-img-frame {
        aspect-ratio: var(--fofi-aspect-mobile, var(--fofi-aspect, auto));
        max-height: var(--fofi-max-h-mobile, 68vh);
    }
}

.fofi-img-frame .fofi-img-el {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.35s ease;
}

.fofi-img-frame.fofi-mode-cover .fofi-img-el {
    object-fit: cover;
}

.fofi-img-frame.fofi-mode-contain .fofi-img-el {
    object-fit: contain;
    padding: 8px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.14));
}

.fofi-img-frame.fofi-thumb-sm.fofi-mode-contain .fofi-img-el {
    padding: 2px;
    filter: none;
}

/* Camadas de fundo para modo Contain (Mostrar inteiro sem cortar) */
.fofi-blur-bg {
    position: absolute;
    inset: -18px;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.92) saturate(1.1);
    transform: scale(1.15);
    z-index: 1;
}

.fofi-pastel-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, #ffe4ec 0%, #fff5f8 55%, #f3e5f5 100%);
    z-index: 1;
}

.fofi-white-bg {
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: 1;
}

/* Fallback elegante (nunca exibe ícone de imagem quebrada) */
.fofi-empty-icon,
.fofi-broken-icon {
    font-size: 2.4rem;
    color: #ff91a4;
    opacity: 0.65;
    z-index: 2;
}

.fofi-broken-icon {
    display: none;
}

.fofi-img-frame.fofi-img-broken .fofi-broken-icon {
    display: inline-flex;
}

.fofi-img-frame.fofi-img-broken .fofi-blur-bg,
.fofi-img-frame.fofi-img-broken .fofi-zoom-badge {
    display: none;
}

.fofi-img-frame.fofi-thumb-sm .fofi-empty-icon,
.fofi-img-frame.fofi-thumb-sm .fofi-broken-icon {
    font-size: 1.1rem;
}

.fofi-img-frame.fofi-thumb-md .fofi-empty-icon,
.fofi-img-frame.fofi-thumb-md .fofi-broken-icon {
    font-size: 1.8rem;
}

/* Zoom interativo para visitantes */
.fofi-zoomable {
    cursor: zoom-in;
}

.fofi-zoomable:hover .fofi-img-el {
    transform: scale(1.04);
}

.fofi-zoom-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #d63384;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    pointer-events: none;
}

.fofi-zoomable:hover .fofi-zoom-badge {
    transform: scale(1.1);
    background: #d63384;
    color: #ffffff;
}

@media (max-width: 767.98px) {
    .fofi-zoom-badge {
        width: 28px;
        height: 28px;
        font-size: 11px;
        bottom: 7px;
        right: 7px;
    }
}

/* Carrossel de Promoções Responsivo */
.fofi-promo-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    min-height: 340px;
    max-height: 460px;
    background-color: var(--fofi-pink, #ffb6c1);
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .fofi-promo-slide {
        aspect-ratio: var(--fofi-promo-aspect-mobile, 4 / 3);
        min-height: 230px;
        max-height: 410px;
    }
}
