/* ═══════════════════════════════════════════
   Casa Mia — Estilos Globais
   css/style.css
═══════════════════════════════════════════ */

/* ── Loading ── */
@keyframes logoPulse {
    0%, 100% { transform: scale(1);     opacity: 1;    }
    50%       { transform: scale(1.04); opacity: 0.85; }
}

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
    40%            { transform: translateY(-8px); opacity: 1;   }
}

body.loading-active { overflow: hidden; }

/* ── Fade-in scroll ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hero animações ── */
.hero-text {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.hero-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-img-main {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.9s ease-out 0.2s, transform 0.9s ease-out 0.2s;
}
.hero-img-main.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-img-float {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.hero-img-float.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-img-float:nth-child(2) { transition-delay: 0.15s; }
.hero-img-float:nth-child(3) { transition-delay: 0.30s; }

/* ── Dot grid ── */
.dot-grid {
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ── Badge flutuante ── */
.badge-float { animation: badgeFloat 3s ease-in-out infinite; }

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

/* ── Botão primário efeito underline ── */
.btn-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: white;
    transition: width 0.3s ease;
    border-radius: 2px;
}
.btn-primary:hover::after { width: 100%; }

/* ── Footer logo wrapper ── */
.footer-logo-wrap {
    display: inline-block;
    background: white;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}
/* ── Product card ── */
.product-card img { cursor: zoom-in; }
/* ── Produto Detalhe ── */
#main-product-img {
    cursor: zoom-in;
    transition: opacity 0.25s ease, transform 0.5s ease;
}
#main-product-img:hover { transform: scale(1.05); }

.thumb-btn.active {
    border-color: #2e3192;
    box-shadow: 0 0 0 3px rgba(46,49,146,0.2);
}

/* Modal */
#image-modal { opacity: 0; transition: opacity 0.3s ease; }
#image-modal.modal-visible { opacity: 1; }

#modal-wrapper {
    overflow: auto;
    max-width: 95vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#modal-image {
    transform-origin: center center;
    transition: transform 0.25s ease, opacity 0.15s ease;
    cursor: zoom-in;
    border-radius: 0.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    width: auto;
    height: auto;
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
}
#modal-image.zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
    transform: scale(2.2);
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 60;
}
.modal-nav-btn:hover { background: rgba(255,255,255,0.3); }
#modal-prev { left: 16px; }
#modal-next { right: 16px; }

#modal-label {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 999px;
    pointer-events: none;
    white-space: nowrap;
}
/* ── Carrossel de produtos ── */
.carousel-container { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.4s ease; }
.carousel-track img { min-width: 100%; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0; transition: opacity 0.2s;
}
.carousel-container:hover .carousel-btn { opacity: 1; }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 4px; }
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; cursor: pointer; transition: background 0.2s;
}
.carousel-dot.active { background: #2e3192; }

/* Loading screen */
body.loading-active { overflow: hidden; }