:root {
  --fondo: #ffffff;
  --superficie: #f7f9fb;
  --borde: #e4eaf0;
  --texto: #1f2933;
  --texto-suave: #6b7a8c;
  --acento: #2f6fed;
  --acento-oscuro: #1d54c2;
  --sombra: 0 6px 18px rgba(31, 41, 51, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Cabecera ---- */
.cabecera {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--borde);
  background: var(--fondo);
}

.cabecera-superior {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--acento);
  text-decoration: none;
}

.eslogan {
  color: var(--texto-suave);
  font-size: 0.9rem;
}

.btn-whatsapp {
  margin-left: auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn-whatsapp:hover {
  background: #1da851;
}

/* ---- Categorías ---- */
.categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1100px;
  margin: 16px auto 0;
  padding-bottom: 0;
}

.categorias a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: var(--superficie);
  color: var(--texto-suave);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.categorias a:hover {
  color: var(--acento);
  border-color: var(--acento);
}

.categorias a.activa {
  background: var(--acento);
  border-color: var(--acento);
  color: #ffffff;
}

/* ---- Contenido ---- */
.contenido {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.ruta {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-bottom: 8px;
}

.ruta a {
  color: var(--acento);
  text-decoration: none;
}

.titulo-pagina {
  font-size: 2rem;
  margin-bottom: 4px;
}

.subtitulo {
  color: var(--texto-suave);
  margin-bottom: 28px;
}

/* ---- Grid de productos ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
}

.tarjeta img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #eef2f6;
  display: block;
}

.tarjeta-cuerpo {
  padding: 16px;
}

.tarjeta h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tarjeta-categoria {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--acento);
  background: rgba(47, 111, 237, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.tarjeta-precio {
  color: var(--acento);
  font-weight: 700;
}

/* ---- Página de detalle ---- */
.detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 16px;
  align-items: start;
}

.detalle-imagen img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--borde);
  background: #eef2f6;
}

.detalle-info h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.detalle-precio {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--acento);
  margin-bottom: 16px;
}

.detalle-descripcion {
  color: var(--texto-suave);
  margin-bottom: 28px;
}

.boton {
  display: inline-block;
  background: var(--acento);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease;
}

.boton:hover {
  background: var(--acento-oscuro);
}

.no-encontrado {
  text-align: center;
  padding: 60px 0;
}

.no-encontrado h1 {
  margin-bottom: 12px;
}

.no-encontrado p {
  color: var(--texto-suave);
  margin-bottom: 24px;
}

/* ---- Pie ---- */
.pie {
  border-top: 1px solid var(--borde);
  padding: 20px 24px;
  text-align: center;
  color: var(--texto-suave);
  font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .detalle {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
