/* ==========================================================================
   Detalles L&M — hoja de estilos principal
   Paleta neutra y elegante, pensada para poder ajustar la marca fácilmente
   cambiando solo las variables de :root.
   ========================================================================== */

:root {
  /* Paleta de marca: verde musgo + melocotón */
  --color-primary: #5c6b47;
  --color-primary-dark: #3e4a31;
  --color-primary-light: #7d8c63;
  --color-accent: #de7c43;
  --color-accent-dark: #b85f2e;

  /* Superficies y texto (con un ligero tinte cálido hacia el melocotón) */
  --color-bg: #fbf7f1;
  --color-bg-alt: #f6e8da;
  --color-surface: #ffffff;
  --color-text: #2b2620;
  --color-text-muted: #6b6459;
  --color-border: #e8dacb;

  --color-success: #3f6b4a;
  --color-success-bg: #eaf3ec;
  --color-error: #9a3b3b;
  --color-error-bg: #f6e9e9;

  /* Tipografía */
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Escala */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(43, 38, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(43, 38, 32, 0.10);
  --shadow-lg: 0 16px 40px rgba(43, 38, 32, 0.14);
  --container-width: 1160px;
  --header-height: 72px;
}

/* ---- Reset básico ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; margin: 0 0 0.5em; color: var(--color-text); }
p { margin: 0 0 1em; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section--alt { background: var(--color-bg-alt); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.section-head h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.section-head p { color: var(--color-text-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover { background: #7c2f2f; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-primary-dark);
}
.brand small {
  display: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
@media (min-width: 640px) { .brand small { display: inline; } }

.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--color-primary-dark); border-color: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; }
.lang-switch a {
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}
.lang-switch a.is-active { background: var(--color-primary); color: #fff; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (min-width: 920px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; padding: 10px 20px 16px; }
.mobile-nav a { display: block; padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--color-border); }
.mobile-nav li:last-child a { border-bottom: none; }
@media (min-width: 920px) { .mobile-nav { display: none !important; } }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 60%, var(--color-primary-light));
  color: #fff;
  overflow: hidden;
}
.hero .container { padding-top: 72px; padding-bottom: 72px; position: relative; z-index: 2; }
.hero-content { max-width: 620px; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); color: #fff; }
.hero p { color: rgba(255,255,255,0.86); font-size: 1.05rem; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-decor {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,255,255,0.12), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(0,0,0,0.18), transparent 45%);
  z-index: 1;
}

/* ---- Grids de tarjetas ---- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.grid--categories { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-media img { transform: scale(1.05); }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.card-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-dark); font-weight: 700; }
.card-price { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--color-primary-dark); font-size: 1.02rem; }
.card-desc { color: var(--color-text-muted); font-size: 0.9rem; }

.category-card { position: relative; color: #fff; min-height: 220px; }
.category-card .card-media { position: absolute; inset: 0; aspect-ratio: auto; }
.category-card .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,18,14,0.75), rgba(20,18,14,0.15));
}
.category-card .card-body { position: relative; z-index: 2; margin-top: auto; padding: 22px; }
.category-card h3 { color: #fff; font-size: 1.2rem; }
.category-card p { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin-bottom: 0; }
.category-card { display: flex; }

/* ---- Why / features ---- */
.features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { text-align: center; padding: 8px; }
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 0; }

/* ---- Filtros de catálogo ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.filter-pill:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.filter-pill.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--color-primary-dark); }
.breadcrumb span { margin: 0 6px; }

/* ---- Detalle de producto ---- */
.product-detail {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .product-detail { grid-template-columns: 1.05fr 1fr; align-items: start; }
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 18, 14, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background-color 0.15s ease;
}
.gallery-zoom-hint svg { width: 18px; height: 18px; }
.gallery-main:hover .gallery-zoom-hint { background: rgba(20, 18, 14, 0.75); }

/* ---- Lightbox (imagen a pantalla completa) ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 13, 10, 0.92);
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
  width: 78px; height: 62px; overflow: hidden; cursor: pointer; background: var(--color-bg-alt);
}
.gallery-thumbs button.is-active { border-color: var(--color-accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info .card-cat { display: inline-block; margin-bottom: 10px; }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.product-price-tag {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 14px 0 4px;
}
.product-price-note { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 22px; }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.product-desc h2 { font-size: 1.05rem; margin-bottom: 8px; }
.product-desc p { color: var(--color-text-muted); }

/* ---- Formularios ---- */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.86rem; font-weight: 600; }
.field .hint { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 400; }
.field input,
.field textarea,
.field select {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(75, 93, 76, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }

.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 20px; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(63,107,74,0.25); }
.alert-error { background: var(--color-error-bg); color: var(--color-error); border: 1px solid rgba(154,59,59,0.25); }

.contact-layout { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .contact-layout { grid-template-columns: 1.2fr 0.8fr; } }
.contact-side {
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-side h3 { color: #fff; }
.contact-side p { color: rgba(255,255,255,0.85); }
.contact-side .btn-outline-light { margin-top: 8px; }

/* ---- WhatsApp flotante ---- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }
/* Con el menú móvil abierto el contenido baja y puede quedar bajo el botón: lo ocultamos. */
body.nav-is-open .whatsapp-float { display: none; }

/* ---- Footer ---- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.82); margin-top: 40px; }
.site-footer .container { padding-top: 48px; padding-bottom: 28px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-family: var(--font-heading); font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.footer-grid h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 20px;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  color: rgba(255,255,255,0.6);
}

/* ---- Utilidades ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
