/* GD Condimentos - Estilos Otimizados */

/* Variáveis CSS */
:root {
  --primary: #445434;
  --primary-light: #5a7249;
  --primary-dark: #2d3a23;
  --secondary: #E8E6D9;
  --secondary-dark: #d4d0c0;
  --accent: #8b9d6f;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --border-color: #ddd;
  --white: #fff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.2rem; line-height: 1.3; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo img {
  height: 155px;
  width: auto;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary);
}

/* Submenu */
.submenu {
  position: relative;
}

.submenu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.submenu-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 1000;
}

.submenu:hover .submenu-content {
  display: block;
}

.submenu-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
}

.submenu-content a:last-child {
  border-bottom: none;
}

.submenu-content a:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

/* Botão WhatsApp */
.whatsapp-btn {
  background-color: #25d366;
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.whatsapp-btn:hover {
  background-color: #1eaa50;
  transform: scale(1.05);
}

/* Botão Flutuante WhatsApp */
.whatsapp-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  animation: pulse 2s infinite;
}

.whatsapp-floating a {
  color: var(--white);
  font-size: 1.5rem;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #f0ede0 100%);
  padding: 4rem 0;
  display: flex;
  align-items: center;
  min-height: 500px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* Seção de Produtos */
.products-section {
  padding: 4rem 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: var(--secondary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  margin-bottom: 0.5rem;
}

.product-info p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.product-buttons {
  display: flex;
  gap: 1rem;
}

.product-buttons .btn {
  flex: 1;
  text-align: center;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-logo img {
  height: 120px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Página de Produto */
.product-detail {
  padding: 3rem 0;
}

.product-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-detail-image {
  width: 100%;
  height: auto;
}

.product-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.product-detail-info h1 {
  margin-bottom: 1rem;
}

.product-specs {
  background-color: var(--secondary);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.spec-item:last-child {
  border-bottom: none;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-image {
  width: 100%;
  height: 200px;
  background-color: var(--secondary);
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.blog-content h3 {
  margin-bottom: 0.5rem;
}

.blog-content p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Galeria */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Responsivo */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  nav ul {
    gap: 1rem;
    flex-direction: column;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .product-detail-content {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  
  nav ul {
    gap: 0.5rem;
  }
  
  .product-buttons {
    flex-direction: column;
  }
}

/* Lazy Loading */
img[loading="lazy"] {
  background-color: var(--secondary);
}

/* Otimizações */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
