:root {
    --primary: #FF6B00; 
    --accent: #00AEEF;
    --dark: #1A1A1A;
    --gray-light: #F7F7F9;
    --white: #ffffff;
    --radius: 16px;
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
}

/* RESET GERAL */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, button, input, select, textarea, h1, h2, h3, p, span, div { 
    font-family: 'DM Sans', sans-serif; color: var(--dark);
}

body { background-color: var(--gray-light); overflow-x: hidden; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 5%; }
button { border: none; outline: none; cursor: pointer; background: none; }
/* IMPORTANTE: max-width: 100% evita que imagens estourem a tela, 
   mas vamos tratar a logo separadamente depois */
img { display: block; max-width: 100%; }
input, select { outline: none; }

/* --- HEADER --- */
header { 
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; 
    padding: 15px 0; background: transparent; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    color: var(--white); 
}
header.scrolled { 
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px); 
    padding: 10px 0; color: var(--dark); box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }

/* --- LOGO (CORREÇÃO DE ESPREMIMENTO) --- */
.logo { 
    position: relative; 
    display: flex; 
    align-items: center; 
    height: 50px; 
    width: 160px; /* Largura reservada para a animação */
}

.logo img { 
    position: absolute; 
    left: 0; 
    top: 50%; 
    transform: translateY(-50%); 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    height: 50px; /* Controla o tamanho pela altura */
    width: auto;  /* Largura automática proporcional */
    max-width: none; /* IMPORTANTE: Impede que a logo seja espremida no mobile */
}

/* Estado 1: Topo (Só ícone) */
.logo-icon { opacity: 1; transform: translateY(-50%) scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.logo-full { opacity: 0; transform: translateY(-50%) translateX(-20px) scale(0.9); pointer-events: none; }

/* Estado 2: Rolado (Logo Completa) */
header.scrolled .logo-icon { opacity: 0; transform: translateY(-50%) scale(0.5) rotate(-10deg); }
header.scrolled .logo-full { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); height: 40px; }

/* --- BUSCA --- */
.search-box { flex: 1; max-width: 500px; margin: 0 40px; position: relative; }
.search-input { width: 100%; padding: 12px 20px 12px 45px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); color: var(--white); font-size: 15px; transition: 0.3s; }
.search-input::placeholder { color: rgba(255,255,255,0.9); }
header.scrolled .search-input { background: var(--gray-light); border-color: transparent; color: var(--dark); }
header.scrolled .search-input::placeholder { color: #999; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #ffffff; z-index: 5; pointer-events: none; transition: 0.3s; opacity: 1 !important; }
header.scrolled .search-icon { color: #555555; }

/* --- ÍCONES --- */
.nav-icons { display: flex; gap: 20px; font-size: 22px; align-items: center; }
.icon-btn { cursor: pointer; position: relative; transition: 0.3s; color: #ffffff !important; }
header.scrolled .icon-btn { color: var(--dark) !important; }
.icon-btn:hover { transform: scale(1.1); color: var(--primary) !important; }
.badge { position: absolute; top: -5px; right: -8px; background: var(--primary); color: white; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,0.3); }
header.scrolled .badge { border-color: var(--white); }

/* --- BANNER --- */
.hero-slider { height: 100vh; width: 100%; position: relative; cursor: grab; }
.hero-slider:active { cursor: grabbing; }
.swiper-slide { background-size: cover; background-position: center; }
.overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7)); display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-content { color: white; max-width: 800px; padding: 0 20px; margin-top: 60px; }
.hero-content h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); color: #ffffff !important; }
.hero-content p { font-size: 1.3rem; margin-bottom: 30px; opacity: 0.95; font-weight: 500; color: #ffffff !important; }
.btn-cta { padding: 18px 50px; background: var(--primary); color: white; border-radius: 50px; font-weight: 700; font-size: 18px; transition: 0.3s; box-shadow: 0 10px 30px rgba(255, 107, 0, 0.4); }
.btn-cta:hover { transform: scale(1.05); background: var(--white); color: var(--primary); }
.swipe-hint { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.9); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 10; pointer-events: none; }
.hand-icon { font-size: 26px; animation: swipeAnim 2s infinite ease-in-out; }
@keyframes swipeAnim { 0% { transform: translateX(0); opacity: 0.6; } 50% { transform: translateX(-12px); opacity: 1; } 100% { transform: translateX(0); opacity: 0.6; } }
.scroll-down-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: white; animation: bounce 2s infinite; font-size: 20px; cursor: pointer; z-index: 10; opacity: 0.6; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform:translateY(0) translateX(-50%);} 40% {transform:translateY(-10px) translateX(-50%);} }

/* --- LOJA --- */
#loja-principal { position: relative; background: var(--gray-light); z-index: 2; border-radius: 30px 30px 0 0; margin-top: -30px; padding-top: 30px; }
.mobile-search-wrapper { display: none; margin-bottom: 25px; padding: 0 10px; }
.mobile-search-inner { position: relative; }
.mobile-input { width: 100%; padding: 15px 15px 15px 45px; border-radius: 50px; border: none; background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.05); font-size: 16px; outline: none; }
.mobile-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #999; }

/* CATEGORIAS */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { height: 200px; border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; box-shadow: var(--shadow-sm); background-size: cover; background-position: center; transition: 0.3s; }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cat-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.cat-title { color: white !important; font-size: 20px; font-weight: 700; }
.section-title { font-size: 28px; font-weight: 700; margin-bottom: 30px; text-align: center; }

/* --- GRADE DE OFERTAS (RESPONSIVO) --- */
.flyer-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* 4 colunas no PC */
    gap: 20px; 
    margin-bottom: 40px; 
}
.flyer-card { 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
    transition: 0.3s; 
}
.flyer-card img { width: 100%; height: auto; display: block; transition: 0.4s; }
.flyer-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

/* PRODUTOS */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 80px; }
.product-card { background: var(--white); border-radius: 24px; padding: 12px; position: relative; border: 1px solid rgba(0,0,0,0.04); display: flex; flex-direction: column; box-shadow: 0 10px 25px rgba(0,0,0,0.06); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(255, 107, 0, 0.15); border-color: rgba(255, 107, 0, 0.3); }
.card-img-wrap { height: 160px; background: #f4f4f6; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; overflow: hidden; }
.card-img { max-height: 90%; max-width: 90%; mix-blend-mode: multiply; transition: transform 0.4s ease; }
.product-card:hover .card-img { transform: scale(1.15); }
.card-info { flex: 1; display: flex; flex-direction: column; padding: 0 5px; }
.card-cat { font-size: 10px; color: #999; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 8px; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.card-price { font-size: 20px; font-weight: 800; color: var(--primary); margin-top: auto; letter-spacing: -0.5px; }
.btn-add { width: 42px; height: 42px; border-radius: 14px; background: var(--dark); display: flex; align-items: center; justify-content: center; position: absolute; bottom: 12px; right: 12px; color: var(--white); transition: 0.2s; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.btn-add:hover { background: var(--primary); transform: scale(1.1); }
.tags { position: absolute; top: 20px; left: 20px; z-index: 2; }
.tag.sale { background: #FF4757; color:white; padding:4px 10px; border-radius:8px; font-size:10px; font-weight:800; text-transform:uppercase; box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3); }

/* SKELETON */
.skeleton-card { height: 320px; background: #eee; border-radius: 24px; background-image: linear-gradient(to right, #eee 0%, #f9f9f9 20%, #eee 40%, #eee 100%); background-size: 800px 100px; animation: shimmer 1s linear infinite forwards; }
@keyframes shimmer { 0%{background-position: -400px 0} 100%{background-position: 400px 0} }

/* MODAIS */
.drawer-overlay, .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: none; }
.drawer { position: fixed; top: 0; right: -450px; width: 450px; height: 100%; background: var(--white); z-index: 2001; transition: 0.4s; padding: 30px; display: flex; flex-direction: column; }
.drawer.open { right: 0; }
.modal-box { background: white; width: 500px; max-width: 90%; border-radius: 20px; padding: 30px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); max-height: 90vh; overflow-y: auto; z-index: 2002; }
.form-input { width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 10px; background: #fafafa; margin-bottom: 10px; }
.btn-block { width: 100%; padding: 16px; background: var(--primary); color: white; border-radius: 12px; font-weight: 700; margin-top: 15px; }
.step-content { display: none; animation: fadeIn 0.4s; }
.step-content.active { display: block; }
@keyframes fadeIn { from{opacity:0; transform: translateY(10px);} to{opacity:1; transform: translateY(0);} }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.payment-option { border: 1px solid #ddd; padding: 10px; border-radius: 8px; text-align: center; font-size: 12px; cursor: pointer; }
.payment-option.selected { background: var(--primary); color: white; border-color: var(--primary); }
.close-absolute { position: absolute; top:20px; right:20px; cursor:pointer; }
.close-btn-round { background:#eee; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; cursor:pointer; }
.lbl { font-size:12px; font-weight:bold; }

/* --- MOBILE (MEDIA QUERIES) --- */
@media(max-width: 768px) { 
    .search-box { display: none; } /* Esconde busca no header */
    .mobile-search-wrapper { display: block; } /* Mostra busca na loja */
    
    .hero-content h1 { font-size: 2.8rem; }
    .section-title { font-size: 22px; }
    
    /* Logo Mobile */
    .logo { width: 140px; } /* Garante espaço para a logo deslizar */
    header.scrolled .logo-full { height: 35px; } /* Ajusta altura da logo full no mobile */

    /* Grids */
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-card { height: 110px; }
    
    /* Ofertas Mobile: 2 Colunas */
    .flyer-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Produtos Mobile */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 10px; border-radius: 20px; }
    .card-img-wrap { height: 120px; border-radius: 14px; }
    .card-title { font-size: 13px; height: 35px; }
    .card-price { font-size: 16px; }
    .btn-add { width: 35px; height: 35px; bottom: 10px; right: 10px; border-radius: 10px; }
    
    /* Gaveta */
    .drawer { width: 100%; right: -100%; }
}
