@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@700;900&display=swap');

:root {
  --verde-oscuro: #1b5e20;
  --verde-medio: #2e7d32;
  --verde-vivo: #43a047;
  --crema: #f9f6f0;
  --texto: #222;
  --texto-suave: #666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--crema);
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--texto);
}

/* ── HEADER ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: var(--verde-oscuro);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 3px 16px rgba(0,0,0,0.25);
}

.logo img { height: 70px; }

nav { display: flex; gap: 2px; }

nav a {
  padding: 8px 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

nav a.active {
  background: rgba(255,255,255,0.15);
  color: #ffd54f;
}

.icons { display: flex; align-items: center; gap: 14px; color: white; font-size: 18px; }
.icons > i { cursor: pointer; opacity: 0.85; transition: opacity 0.2s; }
.icons > i:hover { opacity: 1; }

/* ── MENÚ USUARIO CIRCULAR ── */
.user-menu { position: relative; }

.btn-user-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.55);
  color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}
.btn-user-circle:hover { background: rgba(255,255,255,0.32); transform: scale(1.08); }

.btn-user-circle .session-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  background: #69f0ae;
  border: 2px solid #1b5e20;
  border-radius: 50%;
  display: none;
}
.user-menu.logueado .session-dot { display: block; }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px); right: 0;
  background: #fff;
  border-radius: 14px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  border: 1px solid #e4e7ec;
  overflow: hidden;
  z-index: 200;
  animation: dropIn 0.18s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-menu.open .user-dropdown { display: block; }

.user-drop-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e4e7ec;
}
.user-drop-header span {
  display: block; font-size: 13px; font-weight: 700; color: #222;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-drop-header small { font-size: 11px; color: #666; }

.user-drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13.5px; font-weight: 600;
  color: #1a1f2e; text-decoration: none; transition: background 0.12s;
}
.user-drop-item:hover { background: #f4f6f8; }
.user-drop-item i { width: 16px; text-align: center; color: #2e7d32; }
.user-drop-divider { height: 1px; background: #e4e7ec; margin: 2px 0; }
.user-drop-logout { color: #dc2626 !important; }
.user-drop-logout i { color: #dc2626 !important; }
.user-drop-logout:hover { background: #fee2e2 !important; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 60%, #0a3d0a 100%);
  text-align: center;
  padding: 64px 40px 56px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 14px;
}

.hero h1 span { color: #ffd54f; }

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-badge {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

/* ── BARRA CATEGORÍAS ── */
.categorias-bar {
  display: flex;
  gap: 10px;
  padding: 20px 48px;
  background: white;
  border-bottom: 1px solid #e8e8e8;
  flex-wrap: wrap;
  align-items: center;
}

.categorias-bar span {
  font-size: 13px;
  font-weight: 600;
  color: var(--texto-suave);
  margin-right: 6px;
}

.cat-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid #ddd;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--texto);
  font-family: 'DM Sans', sans-serif;
}

.cat-btn:hover, .cat-btn.activo {
  background: var(--verde-medio);
  border-color: var(--verde-medio);
  color: white;
}

/* ── TÍTULO SECCIÓN ── */
.seccion-titulo {
  padding: 32px 48px 4px;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--verde-oscuro);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.total-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: #e8f5e9;
  color: var(--verde-medio);
  padding: 4px 12px;
  border-radius: 50px;
}

/* ── CATÁLOGO ── */
.catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 22px;
  padding: 20px 48px 60px;
}

/* ── TARJETA ── */
.producto {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.producto:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.13);
}

.producto-img-wrap {
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.producto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.producto:hover img { transform: scale(1.07); }

.producto-info { padding: 14px 14px 16px; }

.producto h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.producto .precio {
  color: var(--verde-medio);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

.producto button {
  width: 100%;
  padding: 9px 0;
  border: none;
  background: var(--verde-vivo);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.producto button:hover { background: var(--verde-oscuro); }
.producto button:active { transform: scale(0.97); }

/* Empty state */
.empty-catalogo {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--texto-suave);
}
.empty-catalogo i { font-size: 48px; margin-bottom: 16px; color: #ccc; display: block; }
.empty-catalogo p { font-size: 16px; }

/* ── FOOTER ── */
footer {
  background: var(--verde-oscuro);
  color: rgba(255,255,255,0.7);
  padding: 36px 48px 20px;
  font-size: 13px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.footer-logo img { height: 60px; opacity: 0.9; }

.footer-pagos p,
.footer-redes p {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tarjetas { display: flex; gap: 10px; }

.tarjeta-icono {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.redes-iconos { display: flex; gap: 10px; }

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  text-decoration: none;
  color: white;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  transition: transform 0.2s, opacity 0.2s;
}
.social-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.social-btn i { font-size: 18px; }
.social-btn.instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.social-btn.facebook { background: #1877f2; }

.footer-copy {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}
.footer-copy strong { color: #ffd54f; }

/* ── HAMBURGER (oculto en desktop) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.2); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── CART BADGE ── */
.cart-icon-wrap { position: relative; cursor: pointer; }
.cart-badge {
  display: none;
  position: absolute;
  top: -8px; right: -8px;
  background: #ffd54f;
  color: var(--verde-oscuro);
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.cart-badge.show { display: flex; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  header {
    padding: 12px 20px;
    position: relative;
    flex-wrap: nowrap;
    min-height: 64px;
  }

  .hamburger { display: flex; }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--verde-oscuro);
    flex-direction: column;
    padding: 12px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100;
  }
  nav.open { display: flex; }

  nav a {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  nav a:last-child { border-bottom: none; }

  .catalogo { padding: 16px 20px 40px; gap: 14px; }
  .categorias-bar { padding: 16px 20px; }
  .seccion-titulo { padding: 24px 20px 4px; font-size: 22px; }
  .hero { padding: 40px 20px 36px; }
  .hero h1 { font-size: 36px; }
  footer { padding: 28px 20px 20px; }
  .footer-content { flex-direction: column; align-items: center; text-align: center; }
  .tarjetas, .redes-iconos { justify-content: center; }
}