/* =========================================
   MILCAM — Estilos
   Paleta: crema, beige y terracota
   ========================================= */

:root {
  --cream: #fbf6ee;
  --cream-2: #f5ece0;
  --beige: #e9d8bf;
  --beige-dark: #d9bf9c;
  --sand: #c9a77d;
  --terracota: #c4704f;
  --terracota-dark: #a85c3f;
  --brown: #4a3427;
  --text: #5b4637;
  --text-soft: #85705f;
  --white: #ffffff;
  --wa: #25d366;
  --wa-dark: #1ebe5a;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Segoe UI", Helvetica, Arial, sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(74, 52, 39, 0.08);
  --shadow-hover: 0 18px 40px rgba(74, 52, 39, 0.14);
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--brown);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1em; }

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

.eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 0.75em;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn:focus-visible,
.nav a:focus-visible,
.nav-toggle:focus-visible,
.wa-float:focus-visible {
  outline: 3px solid var(--terracota);
  outline-offset: 3px;
}

.btn .icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

.btn--wa {
  background: var(--terracota);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(196, 112, 79, 0.28);
}

.btn--wa:hover { background: var(--terracota-dark); }

.btn--ghost {
  border-color: var(--brown);
  color: var(--brown);
}

.btn--ghost:hover {
  background: var(--brown);
  color: var(--cream);
}

.btn--light {
  background: var(--cream);
  color: var(--terracota-dark);
}

.btn--light:hover { background: var(--white); }

.btn--small {
  padding: 0.55em 1.2em;
  font-size: 0.9rem;
}

.btn--block { width: 100%; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}

.header.is-scrolled { box-shadow: 0 4px 20px rgba(74, 52, 39, 0.08); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracota);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
}

.logo__text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--brown);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a:not(.btn) {
  position: relative;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--terracota);
  transition: width 0.3s;
}

.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 0 90px;
  background:
    radial-gradient(circle at 85% 15%, rgba(196, 112, 79, 0.12), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(201, 167, 125, 0.18), transparent 50%),
    var(--cream);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--terracota);
}

.hero__lead {
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--text-soft);
  margin-bottom: 2em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

.hero__arch {
  border-radius: 220px 220px 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 10px solid var(--white);
  background: var(--beige);
}

.hero__scene {
  width: 100%;
  height: auto;
}

.hero__badge {
  position: absolute;
  left: -24px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  line-height: 1.2;
}

.hero__badge span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero__badge strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--terracota);
}

/* ---------- Franja de valores ---------- */
.values {
  background: var(--brown);
  color: var(--cream-2);
}

.values__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.value p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.value__icon { color: var(--beige-dark); }

/* ---------- Secciones ---------- */
.section { padding: 100px 0; }

.section--tinted { background: var(--cream-2); }

.section__head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__head p:last-child { color: var(--text-soft); }

.section__head strong {
  font-weight: 500;
  color: var(--terracota-dark);
}

/* ---------- Categorías ---------- */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.category {
  padding: 36px 28px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--beige);
  border-radius: var(--radius);
  transition: transform 0.3s, box-shadow 0.3s;
}

.category:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.category__art {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--cream-2);
}

.category__art svg {
  width: 74px;
  height: 74px;
}

.category p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--text-soft);
}

/* ---------- Productos ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product__img {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--cream), var(--beige));
}

/* Foto real del producto */
.product__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product:hover .product__img img { transform: scale(1.05); }

/* Foto con recuadro de respaldo (tarjetas de Decoración):
   la foto cubre el recuadro; si el archivo no existe, script.js la quita */
.product__img .js-photo {
  position: absolute;
  inset: 0;
}

/* Espacio reservado mientras no hay foto */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border: 2px dashed var(--sand);
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.photo-placeholder svg {
  width: 44px;
  height: 44px;
  fill: var(--sand);
}

.product__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 26px 28px;
}

.product__cat {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 6px;
}

.product__desc {
  flex: 1;
  font-size: 0.97rem;
  color: var(--text-soft);
}

.product__price {
  margin-bottom: 1.2em;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--terracota-dark);
}

/* ---------- Pasos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 40px 30px 30px;
  text-align: center;
  background: var(--cream-2);
  border-radius: var(--radius);
}

.step__num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--terracota);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--text-soft);
}

/* ---------- Llamado a la acción ---------- */
.cta {
  padding: 100px 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, var(--terracota), var(--terracota-dark));
  color: var(--cream);
  text-align: center;
}

.cta__inner { max-width: 720px; }

.cta h2 { color: var(--cream); }

.cta p {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 2em;
}

.cta .cta__phone {
  margin: 1.5em 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

/* ---------- Pie de página ---------- */
.footer {
  padding: 56px 0 28px;
  background: var(--brown);
  color: var(--beige);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(233, 216, 191, 0.18);
}

.logo--footer .logo__text { color: var(--cream); }

.footer__tagline {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__nav a:hover { color: var(--white); }

.footer__copy {
  margin: 24px 0 0;
  padding: 0 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s, background-color 0.25s;
}

.wa-float:hover {
  transform: scale(1.08);
  background: var(--wa-dark);
}

.wa-float svg {
  width: 32px;
  height: 32px;
  fill: var(--white);
}

/* ---------- Animación de aparición ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================
   Adaptable: tabletas y celulares
   ========================================= */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }

  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__visual { max-width: 380px; }

  .categories,
  .products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 24px;
    background: var(--cream);
    box-shadow: 0 16px 30px rgba(74, 52, 39, 0.1);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid var(--beige);
    font-size: 1.05rem;
  }

  .nav a:not(.btn)::after { display: none; }

  .nav .btn { margin-top: 18px; padding: 0.9em 1.6em; }

  .values__inner { grid-template-columns: 1fr; gap: 10px; }

  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }

  .hero { padding: 36px 0 70px; }
  .section, .cta { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }

  .categories,
  .products { grid-template-columns: 1fr; }

  .categories { gap: 18px; }

  .hero__actions .btn { width: 100%; }

  .hero__badge {
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__nav { justify-content: center; }

  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}
