/* =========================================================
   PALETA — Verde & Tierra
   Cambia estas variables para retocar el look de toda la web
========================================================= */
:root {
  --cream: #FAF5EA;
  --cream-2: #F1E9D8;
  --sage: #7C9473;
  --sage-dark: #4F6350;
  --sage-light: #A9C0A0;
  --wood: #B98354;
  --wood-dark: #8A5E38;
  --terracotta: #C1653D;
  --ink: #2E2A22;
  --ink-soft: #5B5646;
  --white: #FFFDF9;
  --gold: #D9A441;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-soft: 0 10px 30px -12px rgba(46, 42, 34, 0.25);
  --shadow-hover: 0 20px 40px -14px rgba(46, 42, 34, 0.35);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Fraunces', serif; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn--small { padding: 9px 16px; font-size: 0.85rem; }
.btn--primary {
  background: var(--sage-dark);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); background: var(--ink); }
.btn--ghost {
  background: transparent;
  color: var(--sage-dark);
  border: 2px solid var(--sage-dark);
}
.btn--ghost:hover { background: var(--sage-dark); color: var(--white); transform: translateY(-3px); }
.btn--whatsapp {
  background: #25D366;
  color: #05360f;
  box-shadow: 0 8px 20px -8px rgba(37, 211, 102, .6);
}
.btn--whatsapp:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 28px -8px rgba(37, 211, 102, .75); }
.icon-wa { width: 18px; height: 18px; fill: currentColor; }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(250, 245, 234, 0.82);
  border-bottom: 1px solid rgba(46, 42, 34, 0.08);
}
.nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.nav__brand-icon { font-size: 1.3rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 90px 24px 70px;
  overflow: hidden;
  isolation: isolate;
}
.hero__content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero__kicker {
  display: inline-block;
  background: var(--white);
  border: 1px solid rgba(122, 94, 56, .18);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--wood-dark);
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.hero__subtitle {
  display: block;
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__stat strong { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--sage-dark); }
.hero__stat span { font-size: 0.82rem; color: var(--ink-soft); }

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  z-index: 1;
  opacity: .55;
  animation: float 10s ease-in-out infinite;
}
.hero__blob--1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 30% 30%, var(--sage-light), transparent 70%);
  top: -160px; left: -140px;
}
.hero__blob--2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle at 60% 40%, var(--gold), transparent 70%);
  top: -100px; right: -160px;
  animation-delay: -4s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 30px) scale(1.06); }
}

/* ===== CATALOGO ===== */
.catalogo { max-width: 1180px; margin: 0 auto; padding: 30px 24px 100px; }
.catalogo__header { text-align: center; margin-bottom: 46px; }
.catalogo__header h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); color: var(--ink); }
.catalogo__header p { color: var(--ink-soft); margin-top: 10px; }
.catalogo__empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

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

/* ===== TARJETA PRODUCTO ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
}
.card__slides { position: relative; width: 100%; height: 100%; }
.card__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.card__slide.is-active { opacity: 1; }
.card:hover .card__slide.is-active { transform: scale(1.04); }

.card__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  color: var(--sage-dark);
  font-size: 0.8rem;
  text-align: center;
  background: linear-gradient(135deg, var(--sage-light), var(--cream-2));
}
.card__placeholder span.emoji { font-size: 2.6rem; }

.card__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--white);
  box-shadow: 0 4px 10px -3px rgba(0,0,0,.3);
  z-index: 2;
}
.badge--nuevo { background: #3F8F5B; }
.badge--como-nuevo { background: var(--sage-dark); }
.badge--buen-estado { background: var(--wood); }
.badge--usado { background: var(--terracotta); }
.badge--muy-usado { background: #8A5A4A; }

.card__warranty {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 10px -3px rgba(0,0,0,.3);
}
.card__warranty--static {
  position: static;
  background: var(--cream-2);
  color: var(--wood-dark);
  border: 1px solid rgba(122, 94, 56, .25);
}
.card__badge--static { position: static; }

/* Flechas y puntos del carrusel (tarjeta del catálogo y galería de la ficha) */
.card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(46, 42, 34, .6);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  opacity: 0;
  box-shadow: 0 4px 10px -3px rgba(0, 0, 0, .35);
  transition: opacity .25s var(--ease), background .2s, transform .2s;
}
.card__media:hover .card__arrow,
.galeria__principal:hover .card__arrow {
  opacity: 1;
}
.card__arrow:hover { background: rgba(46, 42, 34, .8); transform: translateY(-50%) scale(1.08); }
.card__arrow--prev { left: 10px; }
.card__arrow--next { right: 10px; }

.card__dots {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; gap: 6px;
}
.card__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  transition: background .2s, transform .2s;
}
.card__dot.is-active { background: var(--white); transform: scale(1.35); }

.card__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card__link { display: block; }
.card__link:hover .card__title { color: var(--sage-dark); }
.card__title { font-size: 1.18rem; font-weight: 600; color: var(--ink); transition: color .2s; }
.card__brand { font-size: 0.78rem; color: var(--wood-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }

.card__price { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.card__price-now { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: var(--sage-dark); }
.card__price-old { display: flex; align-items: baseline; gap: 4px; }
.card__price-tag {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--ink-soft);
  opacity: .8;
}
.card__price-old-value { font-size: 0.8rem; color: #C0392B; text-decoration: line-through; font-weight: 600; }

.card__desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__details-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--wood-dark);
  align-self: flex-start;
}
.card__details-link:hover { text-decoration: underline; }

.card__dims {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.card__dim {
  background: var(--cream);
  border: 1px solid var(--cream-2);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
}

.card__footer {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--cream-2);
}
.card__footer .btn { flex: 1; justify-content: center; padding: 11px 14px; }

/* ===== REVEAL ON SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 46px 24px;
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand { font-family: 'Fraunces', serif; font-size: 1.2rem; margin-bottom: 6px; }
.footer__note { color: #cfc9b8; font-size: 0.88rem; max-width: 440px; }

/* ===== FICHA DE PRODUCTO (producto.html) ===== */
.ficha { max-width: 1100px; margin: 0 auto; padding: 34px 24px 100px; }

.ficha__volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 28px;
  transition: color .2s, transform .2s;
}
.ficha__volver:hover { color: var(--sage-dark); transform: translateX(-3px); }

.ficha__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 52px;
  align-items: start;
}

.galeria__principal {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.galeria__principal img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.galeria__placeholder { position: absolute; inset: 0; }

.galeria__miniaturas {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.galeria__mini {
  width: 72px; height: 58px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s, border-color .2s;
}
.galeria__mini img { width: 100%; height: 100%; object-fit: cover; }
.galeria__mini.is-active, .galeria__mini:hover { opacity: 1; border-color: var(--sage-dark); }

.ficha__info { display: flex; flex-direction: column; gap: 14px; }
.ficha__badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.ficha__title {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.ficha__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ficha__price .card__price-now { font-size: 2rem; }
.ficha__price .card__price-tag { font-size: 0.68rem; }
.ficha__price .card__price-old-value { font-size: 1rem; }

.ficha__desc { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; }

.ficha__medidas h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.btn--large { padding: 17px 30px; font-size: 1.05rem; align-self: flex-start; margin-top: 8px; }

.ficha__no-encontrado {
  text-align: center;
  padding: 90px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .ficha__grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  .hero { padding: 70px 18px 50px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer .btn { width: 100%; justify-content: center; }
  .btn--large { align-self: stretch; justify-content: center; }

  /* En móvil no hay swipe: las flechas del carrusel están siempre visibles */
  .card__arrow { opacity: 1; }
}
