@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ============================================
   VARIABLES Y RESET
============================================ */

:root {
  --verde-oscuro: #00534c;
  --verde-principal: #017a6e;
  --verde-claro: #00c9b1;
  --acento: #f0e040;
  --fondo: #f2f0eb;
  --fondo-card: #ffffff;
  --texto: #1a1a1a;
  --texto-suave: #5a5a5a;
  --sombra: 0 2px 20px rgba(0, 0, 0, 0.08);
  --sombra-hover: 0 12px 40px rgba(0, 83, 76, 0.18);
  --radio: 14px;
  --transicion: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--fondo);
  font-family: 'DM Sans', sans-serif;
  color: var(--texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER
============================================ */

header {
  background: var(--verde-oscuro);
  color: white;
  padding: 48px 30px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(0, 201, 177, 0.12);
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 5%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(240, 224, 64, 0.08);
  pointer-events: none;
}

header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

header h1 span {
  color: var(--acento);
}

header p {
  margin-top: 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

/* ============================================
   NAV CATEGORIAS
============================================ */

nav {
  display: flex;
  gap: 6px;
  background: var(--verde-oscuro);
  padding: 0 20px 16px;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--verde-claro);
}

nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
  transition: var(--transicion);
  border: 1.5px solid transparent;
}

nav a:hover,
nav a.activo {
  background: var(--acento);
  color: var(--verde-oscuro);
  border-color: var(--acento);
}

/* ============================================
   MAIN
============================================ */

main {
  max-width: 1140px;
  width: 100%;
  margin: auto;
  padding: 48px 24px 60px;
}

.seccion-titulo {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--verde-oscuro);
  display: flex;
  align-items: center;
  gap: 10px;
}

.seccion-titulo::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--verde-claro), transparent);
  border-radius: 2px;
}

/* ============================================
   GRID PRODUCTOS
============================================ */

.productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ============================================
   TARJETA PRODUCTO
============================================ */

.card {
  background: var(--fondo-card);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  transition: var(--transicion);
  border: 1.5px solid transparent;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-hover);
  border-color: rgba(0, 201, 177, 0.3);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--acento);
  color: var(--verde-oscuro);
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  z-index: 2;
}

.card-img-wrap {
  overflow: hidden;
  height: 200px;
  background: #eae8e3;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img {
  transform: scale(1.06);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--texto);
  line-height: 1.3;
}

.card p {
  font-size: 0.88rem;
  color: var(--texto-suave);
  line-height: 1.6;
  margin-bottom: 4px;
  flex: 1;
}

/* ============================================
   PRECIO
============================================ */

.precio {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--verde-principal);
  margin: 14px 0 4px;
  letter-spacing: -0.02em;
}

.precio-antes {
  font-size: 0.85rem;
  color: #aaa;
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

/* ============================================
   BOTON COMPRAR
============================================ */

.btn-comprar {
  background: var(--verde-principal);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  display: block;
  text-align: center;
  margin-top: 14px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: var(--transicion);
  border: 2px solid var(--verde-principal);
  position: relative;
  overflow: hidden;
}

.btn-comprar::after {
  content: '->';
  margin-left: 6px;
  display: inline-block;
  transition: transform var(--transicion);
}

.btn-comprar:hover {
  background: var(--verde-oscuro);
  border-color: var(--verde-oscuro);
  color: var(--acento);
}

.btn-comprar:hover::after {
  transform: translateX(4px);
}

.btn-outline {
  background: transparent;
  color: var(--verde-principal);
  border: 2px solid var(--verde-principal);
}

.btn-outline:hover {
  background: var(--verde-principal);
  color: white;
}

/* ============================================
   ESTADOS
============================================ */

.estado-vacio,
.estado-cargando,
.estado-error {
  grid-column: 1 / -1;
  background: var(--fondo-card);
  border-radius: var(--radio);
  padding: 28px 24px;
  box-shadow: var(--sombra);
  text-align: center;
  color: var(--texto-suave);
}

.estado-vacio strong,
.estado-cargando strong,
.estado-error strong {
  display: block;
  color: var(--verde-oscuro);
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* ============================================
   FOOTER
============================================ */

footer {
  background: var(--verde-oscuro);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 32px 20px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--verde-claro), var(--acento), var(--verde-claro));
}

footer strong {
  color: white;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

footer a {
  color: var(--verde-claro);
  text-decoration: none;
  transition: color var(--transicion);
}

footer a:hover {
  color: var(--acento);
}

/* ============================================
   UTILIDADES
============================================ */

.tag {
  display: inline-block;
  background: rgba(0, 201, 177, 0.12);
  color: var(--verde-principal);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 600px) {
  main {
    padding: 32px 16px 48px;
  }

  header {
    padding: 36px 20px 28px;
  }

  .productos {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }

  .seccion-titulo {
    align-items: flex-start;
    flex-direction: column;
  }

  .seccion-titulo::after {
    width: 100%;
  }
}
