/* style.css - Outlet JC (Versão Final: Swipe Mobile + WhatsApp Footer) */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Helvetica+Neue&display=swap');

:root {
    --gradient-brand: linear-gradient(135deg, #ff4070 0%, #ff8c5a 100%);
    --primary: #ff4070;
    --text-dark: #333;
    --success: #25d366; /* Verde do WhatsApp */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-brand: 'Pacifico', cursive; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    background-color: #fcfcfc;
    color: var(--text-dark);
    padding-bottom: 80px; 
}

/* --- CABEÇALHO --- */
header {
    background: var(--gradient-brand);
    padding: 15px; 
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 64, 112, 0.3);
    position: sticky; top: 0; z-index: 1000;
}

/* LOGO (IMAGEM) */
.brand {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    text-decoration: none;
}
.brand img {
    max-width: 250px; 
    height: auto;
    display: inline-block;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); 
}
.brand img:hover { transform: scale(1.05); }

@media (min-width: 768px) {
    .brand img { max-width: 300px; }
}

.search-container { max-width: 500px; margin: 0 auto; }
#searchInput {
    width: 100%; padding: 12px 20px; border-radius: 30px;
    border: none; font-size: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.1); outline: none;
}

/* --- FILTROS --- */
.filters {
    padding: 15px; overflow-x: auto; white-space: nowrap;
    text-align: center; background: #fff; border-bottom: 1px solid #eee;
}
.filter-btn {
    background: #f0f0f0; border: none; padding: 8px 18px; border-radius: 20px;
    margin: 0 4px; cursor: pointer; font-size: 0.9rem; color: #555; transition: 0.3s;
}
.filter-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(255, 64, 112, 0.4); }

/* --- BANNER --- */
.banner-container { width: 100%; background: #fff0f5; text-align: center; padding: 30px 20px; border-bottom: 1px solid #ffe0e9; }
.banner-content h2 { font-family: var(--font-brand); font-size: 2.2rem; color: var(--primary); margin-bottom: 10px; font-weight: 400; }
.btn-cta {
    display: inline-block; background: var(--gradient-brand); color: #fff; padding: 10px 25px;
    margin-top: 15px; text-decoration: none; border-radius: 25px; font-weight: bold;
}

/* --- GRADE PRODUTOS --- */
.container { max-width: 1200px; margin: 20px auto; padding: 10px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.product-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer;
    display: flex; flex-direction: column; border: 1px solid #f5f5f5; position: relative;
}
.card-img { width: 100%; height: 220px; object-fit: cover; background: #eee; }
.card-info { padding: 10px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { 
    font-size: 0.95rem; font-weight: 600; margin-bottom: 5px; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 38px; line-height: 1.2;
}
.card-price-vista { font-size: 1.1rem; color: var(--primary); font-weight: bold; margin-top: auto; }
.card-price-card { font-size: 0.8rem; color: #999; }

/* Selos */
.badge-last-units {
    position: absolute; top: 10px; right: 10px; background: #ff9800; color: white;
    font-size: 0.75rem; font-weight: bold; padding: 4px 10px; border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 5; animation: pulse 2s infinite;
}
.badge-new {
    position: absolute; top: 10px; left: 10px; background: #00bcd4; color: white;
    font-size: 0.75rem; font-weight: bold; padding: 4px 10px; border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 5; text-transform: uppercase;
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* --- MODAL ESTRUTURA --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); display: none;
    justify-content: center; align-items: center; z-index: 2000; padding: 15px;
}
.modal-content {
    background: #fff; width: 100%; max-width: 800px; border-radius: 15px;
    display: flex; flex-direction: column; 
    max-height: 85vh; overflow-y: auto; position: relative;
}

/* --- GALERIA DE FOTOS --- */
.modal-gallery {
    position: relative;        
    background-color: #f9f9f9; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-shrink: 0; 
    min-height: 350px;
}
.modal-main-img {
    max-width: 100%;
    max-height: 450px; /* PC */
    object-fit: contain;    
    display: block;
    transition: opacity 0.3s ease-in-out; 
    opacity: 1;
    z-index: 1;
}
#modalImg.fade-out { opacity: 0; }

#dotsContainer {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    width: auto;
    z-index: 5;
    padding: 5px 10px;
    border-radius: 20px;
}

/* --- AJUSTES ESPECÍFICOS PARA CELULAR (PREENCHIMENTO TOTAL) --- */
@media (max-width: 767px) {
    .modal-gallery {
        display: block; 
        padding: 0;
        /* AUMENTAMOS O COBERTOR: De 55vh para 72vh */
        /* Isso faz a caixa ficar mais alta, cabendo o corpo todo */
        height: 65vh; 
        min-height: 400px;
        max-height: 80vh;
        background: #fff;
        position: relative;
    }

    .modal-main-img {
        width: 100%;
        height: 100%; 
        max-height: none; 
        object-fit: cover; 
        
        /* TRUQUE EXTRA: Mudamos de 'top center' para 'center center' */
        /* Assim ele tenta equilibrar cabeça e pé. */
        object-position: center top; 
        margin: 0;
    }
    /* Esconde as setas no celular */
    .gallery-nav { display: none !important; }

    #dotsContainer {
        position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
        margin-top: 0;
        background-color: rgba(255, 255, 255, 0.7); 
        backdrop-filter: blur(2px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
}

@media (min-width: 768px) {
    .modal-content { flex-direction: row; }
    .modal-gallery { width: 50%; height: auto; align-self: flex-start; }
}

.gallery-nav { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    background: none; color: #333; border: none; padding: 10px; 
    cursor: pointer; font-size: 2.5rem; z-index: 10; 
    transition: color 0.3s ease, transform 0.2s ease; opacity: 0.6; 
    text-shadow: 0 2px 5px rgba(255,255,255,0.8); 
}
.gallery-nav:hover { color: var(--primary); opacity: 1; transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 5px; } .gallery-nav.next { right: 5px; }

.dot { 
    height: 10px; width: 10px; background-color: #bbb; border-radius: 50%; 
    display: inline-block; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent; 
}
.dot.active { background-color: var(--primary); transform: scale(1.2); }

/* Detalhes */
.modal-details { padding: 20px; flex: 1; }
.modal-close {
    position: absolute; top: 10px; right: 15px; font-size: 2rem;
    border: none; background: none; cursor: pointer; z-index: 10; color: #333;
}
.modal-title-text { font-family: var(--font-brand); color: var(--primary); font-size: 2.2rem; margin-bottom: 10px; font-weight: 400; }
.modal-colors { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.color-option { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #ddd; overflow: hidden; cursor: pointer; }
.color-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 64, 112, 0.2); }
.color-option img { width: 100%; height: 100%; object-fit: cover; }
.size-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.size-btn { padding: 8px 15px; border: 1px solid #ddd; border-radius: 5px; background: #fff; cursor: pointer; }
.size-btn.selected { background: var(--text-dark); color: #fff; border-color: var(--text-dark); }

/* Botões Gerais */
.btn-whatsapp {
    width: 100%; background: #25d366; color: white; padding: 15px;
    border-radius: 50px; border: none; font-size: 1rem; font-weight: bold;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3); transition: 0.2s;
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4); }
.btn-share {
    background: #f0f0f0; color: #555; border: none; padding: 10px;
    border-radius: 50px; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-bottom: 10px; width: 100%; transition: 0.2s;
}
.btn-share:hover { background: #e0e0e0; color: #333; }

/* Carrinho Flutuante */
#cartFloat { 
    position: fixed; bottom: 20px; right: 20px; 
    background: var(--primary); color: white; 
    padding: 12px 20px; border-radius: 50px; 
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    z-index: 2000; display: flex; align-items: center; gap: 10px; transition: 0.3s; 
}
#cartFloat:hover { transform: scale(1.05); }
.cart-icon { position: relative; font-size: 1.5rem; }
#cartCount { 
    position: absolute; top: -5px; right: -10px; 
    background: white; color: var(--primary); 
    font-size: 0.8rem; font-weight: bold; 
    width: 20px; height: 20px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
}
.cart-item { display: flex; gap: 10px; border-bottom: 1px solid #eee; padding: 10px 0; align-items: center; }
.cart-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; }
.cart-info { flex: 1; }
.btn-remove { color: red; cursor: pointer; font-size: 1.2rem; padding: 5px; }

/* --- RODAPÉ (AJUSTADO PARA INSTAGRAM + WHATSAPP) --- */
footer { background: #fff0f5; padding: 30px 20px; text-align: center; margin-top: 40px; border-top: 2px solid #ffe0e9; }
.social-links { margin-bottom: 15px; }
.social-btn {
    display: inline-block; width: 45px; height: 45px; line-height: 45px;
    background: white; border-radius: 50%; color: var(--primary);
    font-size: 1.5rem; margin: 0 8px; box-shadow: 0 3px 8px rgba(0,0,0,0.1); 
    transition: 0.3s; text-decoration: none;
}
.social-btn:hover { transform: translateY(-3px); }

/* Cores específicas dos botões do rodapé */
.social-btn.instagram:hover { background: #E1306C; color: white; } /* Cor do Insta */
.social-btn.whatsapp { color: #25d366; } /* Ícone verde */
.social-btn.whatsapp:hover { background: #25d366; color: white; } /* Fundo verde ao passar mouse */

.footer-text { color: #666; font-size: 0.9rem; }