:root {
  --beige-claro: #f5ede0;
  --beige-medio: #ece0cc;
  --beige-papel: #faf4ea;
  --marron-oscuro: #3e2c20;
  --marron-suave: #6b4f3a;
  --terracota: #c97b5a;
  --terracota-oscuro: #a85e3f;
  --dorado: #b8935a;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ea855;
  --sombra-suave: 0 2px 12px rgba(62, 44, 32, 0.08);
  --sombra-card: 0 4px 18px rgba(62, 44, 32, 0.12);
  --radio: 12px;
  --max-ancho: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--beige-claro);
  color: var(--marron-oscuro);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--terracota-oscuro);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- HEADER ---------- */
.header {
  background: linear-gradient(180deg, var(--beige-papel) 0%, var(--beige-claro) 100%);
  border-bottom: 1px solid var(--beige-medio);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.header-inner {
  max-width: var(--max-ancho);
  margin: 0 auto;
}

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--marron-oscuro);
}

.brand-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--terracota);
  margin: 0.25rem 0 0.75rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

.tagline {
  font-size: 0.95rem;
  color: var(--marron-suave);
  margin: 0;
  font-style: italic;
}

/* ---------- NAV CATEGORIAS ---------- */
.categorias-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--beige-papel);
  border-bottom: 1px solid var(--beige-medio);
  box-shadow: var(--sombra-suave);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.categoria-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  background: transparent;
  border: 1.5px solid var(--beige-medio);
  color: var(--marron-suave);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.categoria-btn:hover {
  border-color: var(--terracota);
  color: var(--terracota-oscuro);
}

.categoria-btn.activa {
  background: var(--terracota);
  border-color: var(--terracota);
  color: white;
}

/* ---------- CATALOGO ---------- */
.catalogo {
  max-width: var(--max-ancho);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.estado {
  text-align: center;
  font-style: italic;
  color: var(--marron-suave);
  padding: 3rem 1rem;
}

.categoria-seccion {
  margin-bottom: 3.5rem;
  scroll-margin-top: 80px;
}

.categoria-titulo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--marron-oscuro);
  margin: 0 0 0.25rem;
  border-bottom: 2px solid var(--dorado);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.categoria-vacia {
  color: var(--marron-suave);
  font-style: italic;
  margin: 1rem 0 0;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.producto-card {
  background: var(--beige-papel);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.producto-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(62, 44, 32, 0.16);
}

.producto-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--beige-medio);
  overflow: hidden;
  cursor: zoom-in;
}

.producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.producto-card:hover .producto-img {
  transform: scale(1.04);
}

.producto-info {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.producto-codigo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  color: var(--marron-oscuro);
  margin: 0;
  letter-spacing: 0.04em;
}

.producto-codigo strong {
  color: var(--terracota-oscuro);
  font-weight: 600;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--whatsapp);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s ease;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  text-decoration: none;
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox.abierta {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-codigo {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--beige-papel);
  color: var(--marron-oscuro);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--marron-oscuro);
  color: var(--beige-claro);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: auto;
}

.footer p {
  margin: 0.25rem 0;
}

.footer-wa {
  color: var(--dorado);
  font-weight: 500;
}

.footer-fine {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.75rem !important;
}

.footer-credito {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 0.35rem !important;
  letter-spacing: 0.03em;
}

.footer-chroma {
  color: var(--dorado);
  font-weight: 500;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
  .header {
    padding: 2rem 1rem 1.75rem;
  }
  .grid-productos {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
  .producto-info {
    padding: 0.65rem 0.75rem 0.85rem;
  }
  .btn-whatsapp {
    font-size: 0.85rem;
    padding: 0.5rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
