/* ==========================================================
   Mundo MDF - Landing
   Medidas tomadas de la imagen de referencia (90rem de ancho).
   Todo se escala con rem: html = 100vw / 90  (126.5625rem -> 1.4062rem).
   ========================================================== */
:root {
  --cream: #fbf6ef;
  --cream-2: #f4ebdd;
  --sand: #efe2d0;
  --tan: #c9a074;
  --brown: #7a4326;
  --brown-dark: #6b3b20;
  --heading: #5b3220;
  --text: #4a3426;
  --muted: #6e5a4b;
  --script: 'Kaushan Script', 'Segoe Script', cursive;
  --sans: 'Poppins', system-ui, sans-serif;
  --gap: 1.3184rem;
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: clamp(10px, calc(100vw / 90), 18px);
  scroll-behavior: smooth;
  scroll-padding-top: 6.1523rem;
}
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
ul { list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.container { width: min(76.0254rem, 100% - 2.5rem); margin-inline: auto; }

/* Imagen real encima + degradado de respaldo si falta el archivo */
.ph {
  background-image: var(--img, none), linear-gradient(135deg, #e6cfae 0%, #cfa876 55%, #b98a58 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.791rem;
  height: 2.8125rem; padding: 0 2.1094rem; border-radius: 0.791rem;
  background: #7b4528; color: #fff;
  font-size: 1.0547rem; font-weight: 500;
  box-shadow: 0 0.2637rem 0.7031rem rgba(107, 59, 32, .22);
  transition: transform .2s, background .2s;
}
.btn svg { width: 1.0547rem; height: 1.0547rem; stroke-width: 2; }
.btn:hover { background: var(--brown-dark); transform: translateY(-0.1758rem); }
.btn--sm { height: 2.2852rem; padding: 0 1.8457rem; border-radius: 1.1426rem; font-size: 0.8174rem; gap: 0.6152rem; }
.btn--sm svg { width: 0.8789rem; height: 0.8789rem; }

.eyebrow { display: block; font-size: 0.835rem; letter-spacing: .16em; color: var(--muted); font-weight: 400; line-height: 1.2305rem; }
.eyebrow--sm { font-size: 0.6328rem; letter-spacing: .13em; line-height: 1.0547rem; }

/* ============ HEADER ============ */
.header { position: sticky; top: 0; z-index: 50; background: var(--cream); transition: box-shadow .3s; }
.header.scrolled { box-shadow: 0 0.1758rem 1.0547rem rgba(107, 59, 32, .13); }
.header__inner { display: flex; align-items: center; height: 5.4492rem; }

.logo { display: block; flex: none; }
.logo img { width: 18.457rem; height: auto; }

.nav { display: flex; gap: 2.5225rem; margin-left: 7.998rem; font-size: 0.8174rem; }
.nav a { padding: 0.5273rem 0 0.4395rem; line-height: 1.2; border-bottom: 1px solid transparent; transition: .2s; }
.nav a:hover, .nav a.active { border-color: var(--brown-dark); color: var(--brown-dark); }

.header__actions { display: flex; align-items: center; gap: 1.6699rem; margin-left: auto; }
.header__actions button svg { width: 1.582rem; height: 1.582rem; color: var(--brown-dark); stroke-width: 1.5; }
.cart { position: relative; }
.cart__count {
  position: absolute; top: -0.7031rem; right: -0.791rem;
  background: var(--brown); color: #fff;
  width: 1.0547rem; height: 1.0547rem; border-radius: 50%;
  font-size: 0.5713rem; line-height: 1; display: grid; place-items: center;
}
.burger { display: none; flex-direction: column; gap: 0.3516rem; }
.burger span { width: 1.7578rem; height: 0.1758rem; background: var(--brown-dark); transition: .3s; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 30.2344rem; overflow: hidden;
  background: #f6ecdf url('../img/hero-bg.jpg') right center / cover no-repeat;
}
.hero__inner { position: relative; padding: 3.4277rem 0 0 0.4395rem; }
.hero__content { max-width: 29.8828rem; }
.hero h1 {
  font-family: var(--script); font-weight: 400;
  font-size: 4.3945rem; line-height: 3.9551rem; color: var(--heading);
  margin: 0.8789rem 0 1.1426rem;
}
.hero p { font-size: 1.0547rem; line-height: 1.6875rem; color: var(--text); margin-bottom: 0.9668rem; }
.hero__badges { display: flex; gap: 2.2852rem; margin-top: 2.5488rem; width: max-content; font-size: 0.6328rem; color: #5d4a3c; }
.hero__badges li { display: flex; align-items: center; gap: 0.6152rem; }
.hero__badges svg { width: 1.6699rem; height: 1.6699rem; color: #8a4b2a; stroke-width: 1.3; }

/* ============ SECCIONES ============ */
.section { padding: 1.582rem 0 2.1973rem; }
.title { display: flex; justify-content: center; text-align: center; font-weight: 600; font-size: 1.7578rem; line-height: 2.6367rem; color: var(--brown-dark); }
.title span { display: inline-flex; align-items: center; gap: 1.6699rem; }
.title span::before, .title span::after { content: ""; width: 2.2852rem; height: 0.1318rem; background: var(--brown); opacity: .75; }
.subtitle { text-align: center; font-size: 0.9141rem; line-height: 1.4062rem; color: var(--muted); }

/* ============ CATEGORIAS ============ */
.categories {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4062rem;
  width: min(77.6953rem, 100vw - 2.5rem); margin: 1.7578rem auto 0; position: relative; left: 50%; transform: translateX(-50%);
}
.card {
  position: relative; background: #fff; border-radius: 0.7031rem; min-height: 24.2578rem;
  box-shadow: 0 0.2637rem 0.8789rem rgba(107, 59, 32, .13);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-0.4395rem); box-shadow: 0 0.8789rem 1.9336rem rgba(107, 59, 32, .2); }
.card__img { height: 12.4805rem; border-radius: 0.7031rem 0.7031rem 0 0; }
.card__icon {
  position: absolute; top: 10.3711rem; left: 50%; transform: translateX(-50%);
  width: 4.3945rem; height: 4.3945rem; border-radius: 50%;
  background: #f8ead8; display: grid; place-items: center;
  box-shadow: 0 0 0 0.4395rem #fff;
}
.card__icon svg { width: 1.9336rem; height: 1.9336rem; color: var(--brown-dark); stroke-width: 1.4; }
.card__body { padding: 2.5488rem 1.2305rem 1.0547rem; text-align: center; }
.card h3 { font-size: 1.0986rem; line-height: 1.582rem; font-weight: 600; color: var(--brown-dark); margin-bottom: 0.791rem; }
.card p { font-size: 0.7559rem; line-height: 1.4062rem; color: var(--muted); min-height: 2.8125rem; margin-bottom: 1.4941rem; }
.link { display: inline-flex; align-items: center; gap: 0.5273rem; font-size: 0.7734rem; line-height: 1.2305rem; color: var(--text); }
.link svg { width: 0.8789rem; height: 0.8789rem; stroke-width: 1.8; transition: transform .2s; }
.link:hover svg { transform: translateX(0.3516rem); }

/* ============ BENEFICIOS ============ */
.features { background: #f4ece0; height: 11.3379rem; padding-top: 1.582rem; }
.features__grid { display: grid; grid-template-columns: repeat(4, 1fr); width: min(79.1016rem, 100% - 2.5rem); margin: 0 auto; }
.feature { position: relative; text-align: center; padding: 0 0.7031rem; }
.feature:not(:first-child)::before { content: ""; position: absolute; left: 0; top: 1.6699rem; height: 6.3281rem; width: 1px; background: #e0d1bb; }
.feature svg { width: 2.6367rem; height: 2.6367rem; margin: 0 auto 0.4395rem; color: var(--brown-dark); stroke-width: 1.2; }
.feature h4 { font-size: 0.9141rem; line-height: 1.582rem; font-weight: 500; color: var(--brown-dark); margin-bottom: 0.3516rem; }
.feature p { font-size: 0.7559rem; line-height: 1.4062rem; color: var(--muted); }

/* ============ DESTACADOS ============ */
.featured { padding: 2.0215rem 0 1.4941rem; }
.featured .subtitle { margin-bottom: 1.1426rem; }
.carousel { position: relative; width: min(73.5645rem, 100vw - 7rem); margin-inline: auto; }
.carousel__viewport { overflow: hidden; padding: 0 0 0.5273rem; margin-bottom: -0.5273rem; }
.carousel__track { display: flex; gap: var(--gap); transition: transform .5s ease; padding: 1px 0 0.5273rem; }
.product {
  flex: 0 0 calc((100% - var(--gap) * 3) / 4);
  background: #fff; border-radius: 0.4395rem; box-shadow: 0 0.1758rem 0.7031rem rgba(107, 59, 32, .13); overflow: hidden;
}
.product__img { height: 12.4805rem; transition: transform .4s; }
.product:hover .product__img { transform: scale(1.04); }
.product > .product__img { overflow: hidden; }
.product__info { position: relative; padding: 0.7031rem 0.9668rem 0.791rem; display: flex; flex-direction: column; background: #fff; }
.product__info span { font-size: 0.7559rem; line-height: 1.2305rem; color: var(--text); }
.product__info strong { font-size: 0.9141rem; line-height: 1.2305rem; font-weight: 600; color: var(--brown-dark); margin-top: 0.791rem; }
.add {
  position: absolute; right: 0.9668rem; bottom: 0.9668rem;
  width: 1.7578rem; height: 1.7578rem; border-radius: 50%; background: var(--brown-dark);
  display: grid; place-items: center; transition: transform .2s, background .2s;
}
.add svg { width: 0.9668rem; height: 0.9668rem; color: #fff; stroke-width: 1.8; }
.add:hover { transform: scale(1.12); background: var(--brown); }

.carousel__btn { position: absolute; top: 6.416rem; width: 1.2305rem; height: 2.1094rem; display: grid; place-items: center; z-index: 2; }
.carousel__btn svg { width: 1.2305rem; height: 1.2305rem; color: var(--brown-dark); stroke-width: 2; }
.carousel__btn--prev { left: -3.0762rem; }
.carousel__btn--next { right: -3.0762rem; }
.carousel__btn:disabled { opacity: .3; cursor: default; }

.dots { display: flex; justify-content: center; gap: 0.6152rem; margin-top: 0.7031rem; height: 0.5273rem; }
.dots button { width: 0.5273rem; height: 0.5273rem; border-radius: 50%; background: transparent; border: 1px solid #b89a7c; transition: .3s; }
.dots button.active { background: var(--brown); border-color: var(--brown); }

/* ============ CTA ============ */
.cta { position: relative; height: 13.1836rem; background: #f5e9da url('../img/cta-bg.jpg') right center / cover no-repeat; overflow: hidden; }
.cta__inner { position: relative; height: 100%; }
.cta__text { position: absolute; left: 27.1582rem; top: 1.8457rem; width: 28.125rem; }
.cta h2 { font-family: var(--script); font-weight: 400; font-size: 1.8457rem; line-height: 2.4609rem; color: var(--heading); margin: 0.4395rem 0 0.4395rem; }
.cta p { white-space: nowrap; font-size: 0.8613rem; line-height: 1.4062rem; color: var(--text); margin-bottom: 0.6152rem; }
.cta__note {
  position: absolute; left: 62.0508rem; top: 1.9336rem; width: 10.5469rem;
  text-align: center; font-family: var(--script); color: var(--heading);
  font-size: 1.2744rem; line-height: 1.4062rem; transform: rotate(-14deg);
}
.cta__note svg { width: 1.6699rem; height: 1.6699rem; margin: 2.2852rem auto 0; transform: rotate(14deg) translateX(0.5273rem); stroke-width: 1.5; }

/* ============ FOOTER ============ */
.footer { background: #6b3b20; color: #f7ebdb; height: 9.668rem; }
.footer__grid { display: grid; grid-template-columns: 20.0391rem 18.6328rem 17.666rem 23.291rem; width: min(79.6289rem, 100% - 2.5rem); margin: 0 auto; height: 100%; }
.footer__brand { display: grid; place-items: center; }
.footer__brand img { width: 13.1836rem; height: auto; transform: translateY(-0.3516rem); }
.footer__col { position: relative; padding-top: 1.8457rem; }
.footer__col::before { content: ""; position: absolute; left: 0; top: 2.0215rem; height: 5.4492rem; width: 1px; background: rgba(255, 255, 255, .22); }
.footer__col:nth-child(2) { padding-left: 2.8125rem; }
.footer__col:nth-child(3) { padding-left: 1.0547rem; }
.footer__col:nth-child(4) { padding-left: 1.582rem; }
.footer__col h5 { font-size: 0.8086rem; line-height: 1.2305rem; font-weight: 500; margin-bottom: 1.0547rem; }
.social { display: flex; gap: 0.9668rem; }
.social a { width: 1.6699rem; height: 1.6699rem; border-radius: 50%; background: #f4e8d6; color: var(--brown-dark); display: grid; place-items: center; transition: transform .2s; }
.social a:hover { transform: translateY(-0.2637rem); }
.social svg { width: 1.0547rem; height: 1.0547rem; fill: currentColor; stroke: none; }
.social svg.stroke { fill: none; stroke: currentColor; stroke-width: 2.2; }
.footer__col:nth-child(3) h5 { margin-bottom: 0.7031rem; }
.contact { display: flex; align-items: center; gap: 0.9668rem; font-size: 0.7559rem; line-height: 1.582rem; margin-bottom: 0.7031rem; }
.contact:hover { text-decoration: underline; }
.contact svg { width: 1.4062rem; height: 1.4062rem; stroke-width: 1.4; }

.footer__col:nth-child(4) h5 { margin-bottom: 0.5273rem; }
.newsletter { display: flex; height: 2.4609rem; width: 18.7207rem; background: #fff; border-radius: 0.6152rem; overflow: hidden; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.newsletter input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 0.8789rem; font: 0.6855rem var(--sans); color: var(--text); background: #fff; }
.newsletter input::placeholder { color: #8b7767; }
.newsletter button { width: 2.7246rem; background: #fff; display: grid; place-items: center; border-left: 1px solid #d9c6ae; }
.newsletter button svg { width: 0.9668rem; height: 0.9668rem; color: var(--brown-dark); stroke-width: 2; }
#newsletterMsg { display: block; font-size: 0.5977rem; line-height: 1.0547rem; margin-top: 0.5273rem; opacity: .9; }
#newsletterMsg.ok { color: #c8f0c0; opacity: 1; }
#newsletterMsg.err { color: #ffc2b0; opacity: 1; }

.legal { background: var(--cream); font-size: 0.6416rem; color: var(--text); height: 3.4277rem; }
.legal__inner { display: flex; justify-content: space-between; align-items: center; height: 100%; width: min(75.5859rem, 100% - 2.5rem); margin: 0 auto; }
.legal i { display: inline-block; width: 1px; height: 0.791rem; background: var(--text); margin: 0 1.0547rem; vertical-align: middle; }
.legal a:hover { text-decoration: underline; }

/* ============ TABLET / MOVIL ============ */
@media (max-width: 900px) {
  html { font-size: 13.5px; }
  .br-d { display: none; }
  .cta p { white-space: normal; }
  .categories { position: static; left: auto; transform: none; width: min(100% , 100vw - 2.5rem); }
  .header__inner { height: 4.3rem; }
  .logo img { width: 13rem; }
  .burger { display: flex; }
  .header__actions { gap: 1.1rem; }
  .header__actions button svg { width: 1.5rem; height: 1.5rem; }
  .cart__count { width: 1.05rem; height: 1.05rem; font-size: .6rem; top: -.55rem; right: -.65rem; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; background: var(--cream);
    padding: .4rem 1.4rem 1rem; font-size: 1.15rem;
    box-shadow: 0 10px 16px rgba(107, 59, 32, .12);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--sand); }
  .nav a:hover, .nav a.active { border-color: var(--sand); }

  .hero { min-height: 0; background-position: 72% center; }
  .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(251,246,239,.95) 0%, rgba(251,246,239,.82) 55%, rgba(251,246,239,.5) 100%); }
  .hero__inner { padding: 2.6rem 0 2.8rem; }
  .hero__content { max-width: none; }
  .hero p { max-width: 30rem; }
  .hero__badges { flex-wrap: wrap; gap: .9rem 1.5rem; }

  .categories { grid-template-columns: repeat(2, 1fr); gap: 1.3rem 1.1rem; }
  .title span { gap: .7rem; }
  .title span::before, .title span::after { width: 1.6rem; }
  .carousel { width: calc(100% - 5.5rem) !important; }
  .features { height: auto; padding: 1.6rem 0; }
  .features__grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.8rem; }
  .feature:nth-child(3)::before { display: none; }

  .carousel { width: calc(100% - 5.5rem); }
  .product { flex-basis: calc((100% - var(--gap)) / 2); }
  .carousel__btn--prev { left: -2.3rem; }
  .carousel__btn--next { right: -2.3rem; }

  .cta { height: auto; background-position: left center; padding: 2.2rem 0; }
  .cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(247,237,224,.9), rgba(247,237,224,.8)); }
  .cta__inner { height: auto; }
  .cta__text { position: static; width: auto; max-width: 32rem; margin: 0 auto; }
  .cta__note { display: none; }

  .footer { height: auto; padding: 1.8rem 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; row-gap: 1.6rem; height: auto; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col { padding: 0 !important; }
  .footer__col::before { display: none; }
  .newsletter { width: 100%; max-width: 20rem; }
  .legal { height: auto; }
  .legal__inner { flex-direction: column; gap: .4rem; padding: .9rem 0; text-align: center; }
}

@media (max-width: 560px) {
  .product { flex-basis: 100%; }
  .categories { gap: 1.1rem .8rem; }
  .footer__grid { grid-template-columns: 1fr; }
}
