:root {
  --bg: #faf6ee;
  --bg-alt: #f1ead9;
  --green: #2f4a3a;
  --green-dark: #22362a;
  --wood: #a36f45;
  --wood-dark: #8a5a34;
  --ink: #2b2621;
  --muted: #6d6257;
  --white: #ffffff;
  --wa: #25d366;
  --danger: #c0392b;
  --shadow: 0 12px 40px rgba(34, 54, 42, 0.14);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Barra superior ---------- */
.top {
  background: var(--green-dark);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.brand strong { font-weight: 700; }
.brand.center { justify-content: center; }
.top-cta {
  background: var(--wa);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.top-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* ---------- Intro ---------- */
.intro { padding: 72px 24px 44px; text-align: center; }
.intro-inner { max-width: 680px; margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: 12px;
}
.eyebrow.center { text-align: center; }
.intro h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.intro-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.intro-badge {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
}

/* ---------- Catálogo ---------- */
.catalogo {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.ficha {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.ficha-media { position: relative; height: 220px; overflow: hidden; }
.ficha-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ficha:hover .ficha-media img { transform: scale(1.06); }
.ficha-badge, .ficha-estado {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.ficha-badge { background: var(--green); color: var(--white); }
.ficha-estado { background: var(--danger); color: var(--white); top: 54px; }
.ficha-estado.mantencion { background: var(--wood-dark); }
.ficha-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.ficha-tipo {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.ficha-desc { color: var(--muted); font-size: 0.96rem; margin-bottom: 16px; }
.ficha-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ficha-feat {
  background: var(--bg-alt);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}
.ficha-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(34, 54, 42, 0.1);
  padding-top: 18px;
  gap: 12px;
}
.ficha-precio { font-size: 0.82rem; color: var(--muted); }
.ficha-precio strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--green);
  display: block;
  line-height: 1.1;
}
.ficha-cap { font-size: 0.82rem; color: var(--muted); text-align: right; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--wa); color: var(--white); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); }
.btn-primary:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37, 211, 102, 0.42); }
.btn-block { width: 100%; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-ghost-small {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  font-size: 0.88rem;
}
.danger { background: var(--danger); color: var(--white); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18, 22, 18, 0.82); }
.modal-card {
  position: relative;
  background: var(--bg);
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 34px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.modal-head img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; }
.modal-head h2 { font-family: var(--serif); font-size: 1.4rem; color: var(--green-dark); }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(34, 54, 42, 0.18);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--wood);
}
.field textarea { resize: vertical; }
.field .file { margin-top: 8px; padding: 9px; border-style: dashed; font-size: 0.85rem; }
.resumen {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--green-dark);
  margin-bottom: 20px;
  min-height: 22px;
}
.aviso { margin-top: 14px; font-size: 0.8rem; color: var(--muted); text-align: center; }
.muted { color: var(--muted); }

/* ---------- Float WhatsApp ---------- */
.wa-float {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wa);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: translateY(-3px); }

/* ---------- Footer ---------- */
.footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 46px 24px;
}
.footer .brand { justify-content: center; margin-bottom: 10px; }
.footer-wa { display: inline-block; margin-top: 12px; color: #ffd9a0; font-weight: 600; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(130deg, var(--green-dark), var(--green));
}
.login-card {
  background: var(--bg);
  border-radius: 22px;
  width: 100%;
  max-width: 400px;
  padding: 38px 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.login-card .brand { color: var(--green-dark); justify-content: center; margin-bottom: 6px; }
.error { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }

/* ---------- Admin ---------- */
.admin-top {
  background: var(--green-dark);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--wood);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-actions { display: flex; align-items: center; gap: 16px; }
.link { color: #ffd9a0; font-weight: 600; font-size: 0.9rem; }
.admin-body { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.admin-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--green-dark);
  margin-bottom: 6px;
}
.admin-head .muted { max-width: 460px; }
.admin-grid { display: grid; gap: 26px; }
.admin-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.admin-media { height: 100%; min-height: 240px; background: var(--bg-alt); }
.admin-media img { width: 100%; height: 100%; object-fit: cover; }
.admin-fields { padding: 28px 30px; }
.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.admin-actions { display: flex; gap: 12px; margin-top: 8px; }

@media (max-width: 820px) {
  .admin-card { grid-template-columns: 1fr; }
  .admin-media img { height: 200px; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .catalogo { grid-template-columns: 1fr; }
  .modal-card { padding: 28px 22px 24px; }
}