:root {
  --primary: #3aa97f;
  --primary-dark: #2e8b63;
  --secondary: #7fd4b0;
  --accent: #c9eee0;
  --bg-cream: #eaf7f1;
  --text-dark: #1f3d31;
  --text-muted: #5d7a6e;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--text-dark);
}

.navbar {
  background: linear-gradient(135deg, #1f6e4e, #2e8b63) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}

.promo-banner {
  background: linear-gradient(135deg, #1f6e4e, #2e8b63);
  color: white;
  font-size: 0.85rem;
  padding: 8px 0;
}

.promo-banner a { color: white; text-decoration: underline; }
.promo-banner strong { color: #eaf7f1; }

.hero {
  background: linear-gradient(135deg, #2e7d5b, #3aa97f, #7fd4b0);
  padding: 80px 0;
  color: white;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-cream), transparent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-subtitle { font-size: 1.2rem; opacity: 0.9; }

.section-title {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.categorias-section, .destacados-section, .info-section { padding: 60px 0; }

.categoria-card {
  background: white;
  border-radius: 16px;
  padding: 25px 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  color: var(--text-dark);
  height: 100%;
}

.categoria-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  box-shadow: 0 8px 25px rgba(139,94,60,0.15);
}

.categoria-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(139,94,60,0.12);
}

.product-img-wrap {
  position: relative;
  padding-top: 100%;
  background: #e0f2e9;
  overflow: hidden;
}

.product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.badge-oferta {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc3545;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.badge-oferta-detalle {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #dc3545;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 1;
}

.badge-agotado {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #6c757d;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.product-info { padding: 12px; }

.product-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price { margin-top: 5px; }

.price {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 0.85rem;
  margin-right: 6px;
}

.price-offer {
  font-weight: 700;
  color: #dc3545;
  font-size: 1.1rem;
}

.product-actions { display: flex; gap: 5px; }
.product-actions .btn { flex: 1; font-size: 0.8rem; }

.product-detail-img {
  position: relative;
  background: #e0f2e9;
  border-radius: 16px;
  overflow: hidden;
}

.product-detail-img img { width: 100%; }

.product-detail-title { font-family: var(--font-display); font-weight: 700; }
.product-detail-price .price-offer { font-size: 2rem; }
.product-detail-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  white-space: pre-line;
}

.info-card {
  background: white;
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: 100%;
}

.info-card > i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.footer {
  background: var(--primary-dark);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline !important; }

.page-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 30px 0;
}

.page-header h1 { font-family: var(--font-display); font-weight: 700; }
.page-header .breadcrumb { margin: 0; background: transparent; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb-item.active { color: white; }

.filtros-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cart-table td { vertical-align: middle; }
.cart-badge { font-size: 0.6rem; }

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

.btn-outline-secondary:hover {
  background-color: var(--accent);
  border-color: var(--primary);
  color: var(--primary);
}

.galeria-thumb {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.75;
  transition: all 0.2s;
}

.galeria-thumb.active { border-color: var(--primary); opacity: 1; }
.galeria-thumb:hover { opacity: 1; }

.checkout-resumen-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.checkout-resumen-line.total {
  border-top: 1px solid #dee2e6;
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 1.15rem;
}

.checkout-resumen-line.oferta { color: #dc3545; font-weight: 600; }

.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: #25d366;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}

.wa-float:hover { transform: scale(1.08); color: white; }

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero { padding: 50px 0; }
}