/* 1. CONFIGURAÇÕES GLOBAIS E PALETA DE CORES */
:root {
  --cor-fundo: #F8F9FA;
  --cor-primaria: #1A3356;    
  --cor-secundaria: #343A40;
  --cor-destaque: #007BFF;    
  --cor-sucesso: #28A745;     
  --cor-perigo: #DC3545;      
  --cor-texto: #212529;
  --cor-texto-suave: #6C757D;
  --cor-branco: #FFFFFF;
  --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.07);
  --raio-borda: 8px;
  --facebook-blue: #1877F2;
  --instagram-color: #E1306C;
  --instagram-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
body { background-color: var(--cor-fundo); color: var(--cor-texto); line-height: 1.6; }
html { scroll-behavior: smooth; }

h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--cor-primaria); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.page { animation: fadeInPage 0.5s ease-in-out; }
@keyframes fadeInPage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 2. HEADER */
#main-header {
  background-color: var(--cor-branco);
  padding: 0.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 100px; 
}
.logo-link { line-height: 0; }
#main-header .logo { height: 85px; width: auto; }

.desktop-nav { margin: 0 auto; }
.desktop-nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; padding-left: 0; }
.desktop-nav ul li a { text-decoration: none; color: var(--cor-secundaria); font-weight: 600; font-size: 1rem; padding: 10px 0; border-bottom: 2px solid transparent; transition: all 0.3s ease; }
.desktop-nav ul li a:hover, .desktop-nav ul li a.active { color: var(--cor-destaque); border-bottom-color: var(--cor-destaque); }

.header-actions { display: flex; align-items: center; gap: 1.5rem; }

.user-menu { position: relative; }
.user-menu-btn { background: none; border: none; cursor: pointer; padding: 5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.user-menu-btn svg { width: 28px; height: 28px; color: var(--cor-secundaria); }

.dropdown-content {
  display: none; position: absolute; right: 0; top: 120%;
  background-color: var(--cor-branco); min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-radius: var(--raio-borda);
  z-index: 1001; overflow: hidden; border: 1px solid #eee;
}
.dropdown-content.show { display: block; }
.dropdown-content a { color: var(--cor-secundaria); padding: 12px 16px; text-decoration: none; display: block; font-weight: 500; }
.dropdown-content a:hover { background-color: #f1f1f1; }
.dropdown-content hr { border: 0; border-top: 1px solid #eee; margin: 5px 0; }

.nav-toggle { display: none; }
.mobile-nav { display: none; }

/* 3. HERO SECTION */
.hero-section {
  position: relative;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cor-branco);
  overflow: hidden;
  background-color: #1A3356;
}

.hero-background-swiper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-background-swiper .swiper-slide { width: 100%; height: 100%; }

/* COVER para o banner */
.hero-background-swiper .swiper-slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center center;
}

.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(26, 51, 86, 0.7); z-index: 2; }

.hero-content { 
    position: relative; 
    z-index: 3; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 { 
    font-size: 3rem; margin-bottom: 1rem; color: #ffffff !important; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); 
}
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.7); color: #fff; }

.search-box {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: var(--raio-borda);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}
.search-box input { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }
.search-box button { background-color: var(--cor-destaque); color: white; border: none; padding: 0 25px; border-radius: 4px; cursor: pointer; font-weight: bold; transition: background 0.3s; }
.search-box button:hover { background-color: #0056b3; }

/* 4. TRUST SECTION */
.trust-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; padding: 4rem 10%; background: var(--cor-branco); text-align: center; border-bottom: 1px solid #eee; }
.trust-item h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.trust-item p { color: var(--cor-texto-suave); font-size: 0.95rem; }

/* 5. CARDS (ESTOQUE) */
.stock-section { padding: 4rem 0; background-color: var(--cor-fundo); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; position: relative; display: inline-block; padding-bottom: 10px; }
.section-header h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background-color: var(--cor-destaque); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.card { background: var(--cor-branco); border-radius: var(--raio-borda); box-shadow: var(--sombra-suave); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* Card Image: Cover */
.card-image-container {
  height: 280px; width: 100%; position: relative; overflow: hidden; 
  background-color: #eee;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #eee;
}
.card-image-container img {
  width: 100%; height: 100%; 
  object-fit: cover; 
  object-position: center center; transition: transform 0.5s ease;
}
.card:hover .card-image-container img { transform: scale(1.05); }

.out-of-stock-badge { position: absolute; top: 10px; right: 10px; background-color: var(--cor-perigo); color: white; padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.card-info { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-info h3 { margin-bottom: 1rem; font-size: 1.2rem; color: var(--cor-primaria); }
.card-specs-grid { display: flex; gap: 1rem; margin-bottom: 1rem; color: var(--cor-texto-suave); font-size: 0.9rem; }
.spec-item { display: flex; align-items: center; gap: 5px; background: #f8f9fa; padding: 4px 8px; border-radius: 4px; }
.card-price { font-size: 1.4rem; font-weight: 700; color: var(--cor-destaque); margin-top: auto; margin-bottom: 1rem; }
.btn { display: inline-block; padding: 0.8rem 1.5rem; background-color: var(--cor-destaque); color: white; text-align: center; border-radius: var(--raio-borda); font-weight: 600; cursor: pointer; border: none; transition: background 0.3s ease; text-decoration: none; }
.btn:hover { background-color: #0056b3; }
.btn-disabled { background-color: #ccc; cursor: not-allowed; }
.view-all-btn-container { text-align: center; margin-top: 2rem; }

/* 6. PÁGINA DE DETALHES */
.product-detail-container { background: #fff; padding: 2rem; border-radius: var(--raio-borda); box-shadow: var(--sombra-suave); }
.product-detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; }
.product-gallery-container { position: relative; }

.main-image-container { 
  position: relative; width: 100%; height: 500px; 
  border-radius: var(--raio-borda); overflow: hidden; margin-bottom: 1rem; 
  cursor: crosshair; background-color: #fff; border: 1px solid #eee;
  display: flex; align-items: center; justify-content: center;
}
/* Detalhes: Cover */
.main-image-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center center;
}

.thumbnail-gallery { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail-img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; transition: 0.3s; border: 2px solid transparent; }
.thumbnail-img:hover, .thumbnail-img.active { opacity: 1; border-color: var(--cor-destaque); }

.img-zoom-loupe { position: absolute; border: 1px solid #d4d4d4; width: 100px; height: 100px; display: none; background: rgba(255, 255, 255, 0.4); pointer-events: none; }
.img-zoom-result { position: absolute; top: 0; left: 105%; width: 400px; height: 500px; border: 1px solid #d4d4d4; display: none; z-index: 100; background-repeat: no-repeat; box-shadow: 0 5px 15px rgba(0,0,0,0.2); background-color: white; }

.product-info h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.product-info .price { font-size: 2rem; color: var(--cor-destaque); font-weight: bold; margin-bottom: 2rem; }
.specs-list { list-style: none; margin-bottom: 2rem; background: #f8f9fa; padding: 1.5rem; border-radius: var(--raio-borda); }
.specs-list li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.specs-list li:last-child { border-bottom: none; }
.whatsapp-tracker { background-color: var(--cor-sucesso); width: 100%; display: block; text-align: center; font-size: 1.1rem; }
.whatsapp-tracker:hover { background-color: #218838; }

/* 7. ADMIN */
.form-container { max-width: 800px; margin: 2rem auto; background: #fff; padding: 2rem; border-radius: var(--raio-borda); box-shadow: var(--sombra-suave); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }
.form-group input:focus { border-color: var(--cor-destaque); outline: none; }
.admin-table-container { overflow-x: auto; background: #fff; border-radius: var(--raio-borda); box-shadow: var(--sombra-suave); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background-color: #f8f9fa; font-weight: 600; color: var(--cor-primaria); }
.btn-secondary { background-color: #6c757d; font-size: 0.9rem; padding: 0.5rem 1rem; }
.btn-secondary:hover { background-color: #5a6268; }
.btn-danger { background-color: var(--cor-perigo); font-size: 0.9rem; padding: 0.5rem 1rem; }
.btn-danger:hover { background-color: #c82333; }

/* GERENCIADOR DE IMAGENS */
#image-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--cor-fundo);
    border-radius: var(--raio-borda);
}
.image-edit-thumbnail {
    position: relative;
    border: 2px solid #ddd;
    border-radius: var(--raio-borda);
    overflow: hidden;
    height: 100px;
    background-color: #fff;
    cursor: grab;
}
.image-edit-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.image-edit-thumbnail.is-primary { border-color: var(--cor-destaque); box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); }
.image-edit-thumbnail.is-primary::before { content: 'Capa'; position: absolute; top: 0; left: 0; background: var(--cor-destaque); color: white; font-size: 0.7rem; padding: 2px 6px; z-index: 2; }
.image-edit-thumbnail .actions {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); display: flex;
    flex-direction: row; align-items: center; justify-content: center; gap: 8px;
    opacity: 0; transition: opacity 0.3s ease;
}
.image-edit-thumbnail:hover .actions { opacity: 1; }
.image-edit-thumbnail .actions button {
    background: white; border: none; color: #333; cursor: pointer;
    width: 25px; height: 25px; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; border-radius: 4px; font-weight: bold;
}
.image-edit-thumbnail .actions button:hover { background-color: var(--cor-destaque); color: white; }
.image-edit-thumbnail .actions button.delete-btn:hover { background-color: var(--cor-perigo); color: white; }

/* 8. TOAST */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast { min-width: 250px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); padding: 15px; border-radius: 5px; color: #fff; }
.whatsapp-float { position: fixed; bottom: 25px; right: 25px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 100; transition: transform 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* 9. RODAPÉ */
#main-footer { background-color: #0B1C33; color: #fff; padding: 4rem 0 0 0; margin-top: auto; font-family: 'Roboto', sans-serif; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; padding-bottom: 3rem; align-items: start; text-align: left; }
.footer-col h4 { color: #fff; margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-bottom: 3px solid var(--cor-destaque); display: inline-block; padding-bottom: 5px; }
.footer-links, .contact-list { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: #ccc; text-decoration: none; transition: 0.3s; font-size: 0.95rem; }
.footer-links a:hover { color: #fff; padding-left: 5px; color: var(--cor-destaque); }
.footer-logo { width: 160px; height: auto; margin-bottom: 1rem; }
.footer-desc { color: #ccc; font-size: 0.9rem; line-height: 1.6; max-width: 300px; }
.contact-list li { margin-bottom: 1rem; color: #ccc; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.social-links { display: flex; gap: 15px; margin-top: 1.5rem; }
.social-btn { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; background: transparent; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; color: #fff; text-decoration: none; font-size: 0; transition: 0.3s; }
.social-btn:hover { background: var(--cor-destaque); border-color: var(--cor-destaque); transform: translateY(-3px); }
.footer-bottom { background-color: #081424; text-align: center; padding: 1.5rem 0; font-size: 0.85rem; color: #777; margin-top: 0; border-top: 1px solid rgba(255,255,255,0.05); }

/* --- SEÇÃO SOBRE NÓS --- */
.about-container {
    background-color: var(--cor-branco);
    padding: 3rem;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-suave);
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.about-container p {
    margin-bottom: 1.5rem;
    color: var(--cor-texto-suave);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- BOTÕES PÁGINA DE CONTATO (CORRIGIDOS) --- */
.contact-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.contact-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px; /* Formato Pílula */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 160px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.contact-social-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Estilo Facebook */
.contact-social-btn.facebook {
    background-color: #fff;
    border-color: #1877F2;
    color: #1877F2;
}
.contact-social-btn.facebook:hover {
    background-color: #1877F2;
    color: #fff;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
    transform: translateY(-2px);
}

/* Estilo Instagram */
.contact-social-btn.instagram {
    background-color: #fff;
    border-color: #E1306C;
    color: #E1306C;
}
.contact-social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.3);
    transform: translateY(-2px);
}

/* 10. RESPONSIVIDADE */
@media (max-width: 768px) {
  #main-header { padding: 1rem; flex-wrap: nowrap; }
  .desktop-nav { display: none; }
  .header-actions { display: flex; margin-right: 3rem; }
  .nav-toggle { display: block; background: none; border: none; font-size: 1.8rem; color: var(--cor-primaria); cursor: pointer; position: absolute; right: 1rem; top: 1.5rem; }
  .mobile-nav { display: none; width: 100%; background: #fff; border-top: 1px solid #eee; margin-top: 1rem; }
  .mobile-menu-open .mobile-nav { display: block; animation: slideDown 0.3s ease; }
  @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
  .mobile-nav ul { list-style: none; padding: 1rem 0; }
  .mobile-nav li { border-bottom: 1px solid #f0f0f0; }
  .mobile-nav a { display: block; padding: 1rem; color: var(--cor-primaria); text-decoration: none; font-weight: 600; }
  .hero-content h1 { font-size: 2rem; }
  .search-box { flex-direction: column; }
  .search-box button { padding: 15px; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .main-image-container { height: auto; min-height: 250px; }
  .img-zoom-result { display: none !important; }
  .grid { grid-template-columns: 1fr; }
  .card-image-container { height: 250px; }
  
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col h4 { border-bottom: none; border-top: 2px solid var(--cor-destaque); padding-top: 10px; margin-top: 20px; display: block; }
  .contact-list li { justify-content: center; }
  .social-links { justify-content: center; }
  .footer-desc { margin: 0 auto; }
  
  .about-container { padding: 1.5rem; }
  
  .contact-buttons-container { flex-direction: column; align-items: center; }
  .contact-social-btn { width: 100%; max-width: 300px; }
}