/* DML Vegetables — ajustes responsive.
   Se carga después de styles.css para aislar las correcciones del diseño base. */

/* Banner con cierre recto y segunda sección sin superposiciones. */
body[data-page="home"] .hero { border-radius: 0; }
body[data-page="home"] .hero__cutout { display: none; }
body[data-page="home"] .feature-carousel { margin-top: 0; }

@media (min-width: 981px) {
  body[data-page="home"] .hero__content {
    padding-top: clamp(56px, 7vh, 100px);
    padding-bottom: 112px;
  }

  body[data-page="home"] .company-section__inner {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.45fr);
    gap: clamp(42px, 5vw, 76px);
    align-items: start;
    padding-top: clamp(48px, 4.5vw, 70px);
    padding-bottom: clamp(48px, 4.5vw, 70px);
  }

  body[data-page="home"] .company-copy {
    align-self: start;
    max-width: 520px;
    margin-bottom: 0;
    padding-top: 4px;
  }

  body[data-page="home"] .feature-carousel { align-self: start; }

  body[data-page="home"] .feature-card {
    min-height: 0;
    height: auto;
  }

  body[data-page="home"] .feature-card__media {
    height: auto;
    aspect-ratio: 1.45 / 1;
  }

  body[data-page="home"] .feature-card__body {
    flex: 0 0 auto;
    min-height: 138px;
    padding: 44px 24px 22px;
  }

  body[data-page="home"] .feature-card h3 {
    font-size: clamp(1.15rem, 1.35vw, 1.45rem);
  }
}

body[data-page="home"] .company-copy__eyebrow {
  margin: 0 0 14px;
  color: var(--green-600);
  font-size: 0.875rem;
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body[data-page="home"] .company-copy > p:not(.company-copy__eyebrow) {
  max-width: 520px;
}

body[data-page="home"] .feature-carousel__footer--copy {
  justify-content: flex-start;
  min-height: 48px;
  margin-top: 26px;
}

/* Productos: el contenido determina la altura, incluso en laptops cortas. */
body[data-page="products"] {
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-page="products"] .product-stage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  overflow: clip;
  touch-action: pan-y pinch-zoom;
}

body[data-page="products"] .site-header {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 22px clamp(24px, 4vw, 64px);
}

body[data-page="products"] .product-rail {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  flex: 0 0 auto;
  width: min(100%, var(--content-width));
  margin: 4px auto 0;
  padding: 0 clamp(24px, 4vw, 64px) 12px;
  transform: none;
}

body[data-page="products"] .product-rail__button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
  transform: none;
}

body[data-page="products"] .product-rail__button span {
  font-size: 0.875rem;
}

body[data-page="products"] .product-rail__button strong {
  display: block;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

body[data-page="products"] .product-rail__button:is(:hover, :focus-visible, .is-active) {
  border-color: var(--green-400);
  color: var(--white);
  transform: none;
}

body[data-page="products"] .product-slides {
  position: static;
  inset: auto;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-width: 0;
}

body[data-page="products"] .product-slide {
  position: static;
  inset: auto;
  display: none;
  flex: 1 0 auto;
  min-width: 0;
}

body[data-page="products"] .product-slide.is-active {
  display: grid;
  align-items: center;
}

body[data-page="products"] .product-slide__main-image {
  z-index: 0;
  pointer-events: none;
}

body[data-page="products"] .product-slide__shade {
  pointer-events: none;
}

body[data-page="products"] .product-slide__layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  align-content: normal;
  width: min(100%, var(--content-width));
  min-height: 0;
  padding: 28px clamp(24px, 4vw, 64px) 32px;
  scroll-margin-top: 20px;
}

body[data-page="products"] .product-slide__copy {
  min-width: 0;
  max-width: 640px;
}

body[data-page="products"] .product-slide__number {
  margin: 0 0 16px;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

body[data-page="products"] .product-slide__eyebrow {
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
}

body[data-page="products"] .product-slide h2 {
  font-size: clamp(2.5rem, 3.7vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

body[data-page="products"] .product-slide__varieties {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.045em;
}

body[data-page="products"] .product-slide__description {
  margin-top: 22px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

body[data-page="products"] .product-slide__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

body[data-page="products"] .product-slide__facts span {
  max-width: 100%;
  padding: 8px 12px;
  font-size: 0.875rem;
  line-height: 1.35;
}

body[data-page="products"] .product-slide__cta {
  max-width: 100%;
  min-height: 48px;
  margin-top: 28px;
  padding: 12px 22px;
  font-size: 1rem;
  line-height: 1.35;
}

body[data-page="products"] .product-slide__variants {
  min-width: 0;
  width: 100%;
  max-width: 760px;
  justify-self: end;
}

body[data-page="products"] .product-slide__variants > p {
  margin: 0 0 18px;
  font-size: 0.875rem;
  line-height: 1.4;
}

body[data-page="products"] .product-variant-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  padding: 4px;
  overflow: visible;
}

body[data-page="products"] .product-variant-list--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="products"] .product-variant {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(72px, 1fr);
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: auto;
  border-radius: 16px;
  background: rgba(19, 15, 7, 0.8);
  text-align: left;
  transform: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

body[data-page="products"] .product-variant img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

body[data-page="products"] .product-variant::after {
  display: none;
}

body[data-page="products"] .product-variant span {
  position: static;
  align-self: center;
  min-width: 0;
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body[data-page="products"] .product-variant.is-active {
  border-color: var(--product-accent);
  box-shadow: 0 0 0 2px var(--product-accent);
}

body[data-page="products"] .product-stage__footer {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 12px clamp(24px, 4vw, 64px) 24px;
}

body[data-page="products"] .product-stage__controls {
  position: static;
  gap: 16px;
  transform: none;
}

body[data-page="products"] .product-stage__arrow {
  width: 48px;
  height: 48px;
}

body[data-page="products"] .product-stage__counter {
  font-size: 0.9375rem;
}

body[data-page="products"] .product-stage__hint {
  position: static;
  font-size: 0.875rem;
  line-height: 1.5;
}

body[data-page="products"] .product-stage__progress {
  position: relative;
  inset: auto;
  flex: 0 0 3px;
  width: 100%;
}

body[data-page="products"] :is(.product-rail__button, .product-variant, .product-stage__arrow):focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

@media (min-width: 981px) and (max-height: 800px) {
  body[data-page="products"] .site-header { padding-block: 16px; }
  body[data-page="products"] .product-slide__layout { padding-block: 18px 24px; }
  body[data-page="products"] .product-slide__number { font-size: 1.75rem; margin-bottom: 10px; }
  body[data-page="products"] .product-slide h2 { font-size: clamp(2.5rem, 3.3vw, 3.25rem); }
  body[data-page="products"] .product-slide__varieties { margin-top: 12px; }
  body[data-page="products"] .product-slide__description { margin-top: 16px; font-size: 1rem; }
  body[data-page="products"] .product-slide__facts { margin-top: 18px; }
  body[data-page="products"] .product-slide__cta { margin-top: 22px; }
  body[data-page="products"] .product-stage__footer { padding-block: 8px 20px; }
}

@media (max-width: 980px) {
  body[data-page="products"] .product-slide__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 24px;
  }

  body[data-page="products"] .product-slide__variants {
    max-width: none;
  }

  body[data-page="products"] .product-stage__footer {
    justify-content: center;
  }
}

/* Hero y carrusel del inicio: composición propia para móviles. */
@media (max-width: 760px) {
  body[data-page="home"] .hero {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: min(50rem, 100svh);
    height: auto;
    border-radius: 0;
  }

  body[data-page="home"] .hero .site-header {
    flex: 0 0 auto;
    align-items: center;
    padding: 18px 20px;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  body[data-page="home"] .hero .brand {
    width: clamp(90px, 25vw, 112px);
  }

  body[data-page="home"] .hero__content {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    width: 100%;
    padding: 36px 22px 44px;
  }

  body[data-page="home"] .hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 9vw, 3.75rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .hero__accent { margin-top: 0.06em; }

  body[data-page="home"] .hero__lead {
    max-width: 34rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
  }

  body[data-page="home"] .hero .primary-button {
    width: 100%;
    max-width: 26rem;
    min-height: 52px;
    margin: 4px 0 0;
    padding: 14px 18px;
    font-size: 1rem;
    line-height: 1.35;
  }

  body[data-page="home"] .hero__slide img { object-position: 62% center; }

  body[data-page="home"] .hero__shade {
    background: linear-gradient(180deg,
      rgba(19, 15, 7, 0.48) 0%,
      rgba(19, 15, 7, 0.75) 28%,
      rgba(19, 15, 7, 0.65) 68%,
      rgba(19, 15, 7, 0.88) 100%);
  }

  body[data-page="home"] .hero__cutout { display: none; }

  body[data-page="home"] .hero-pagination {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0 18px 20px;
  }

  body[data-page="home"] .hero-dot,
  body[data-page="home"] .hero-dot.is-active {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-page="home"] .hero-dot::before {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    content: "";
    transition: width 0.25s ease, background-color 0.25s ease;
  }

  body[data-page="home"] .hero-dot.is-active::before {
    width: 28px;
    border-color: var(--green-400);
    background: var(--green-400);
  }

  body[data-page="home"] .company-section__inner {
    gap: 28px;
    padding: 36px 20px 48px;
  }

  body[data-page="home"] .company-copy { margin-bottom: 0; }

  body[data-page="home"] .feature-carousel {
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    justify-self: center;
  }

  body[data-page="home"] .feature-carousel__track { gap: 16px; }

  body[data-page="home"] .feature-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  body[data-page="home"] .feature-card__media {
    height: auto;
    aspect-ratio: 6 / 5;
  }

  body[data-page="home"] .feature-card__body {
    min-height: 144px;
    padding: 40px 24px 24px;
  }

  body[data-page="home"] .feature-card h3 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  body[data-page="home"] .feature-carousel__footer { margin-top: 16px; }
  body[data-page="home"] .carousel-button { width: 44px; height: 44px; }

  body[data-page="products"] .site-header {
    align-items: center;
    padding: 18px 20px;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  body[data-page="products"] .product-rail {
    gap: 8px;
    margin-top: 8px;
    padding: 0 20px 12px;
  }

  body[data-page="products"] .product-rail__button {
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    text-align: center;
  }

  body[data-page="products"] .product-rail__button span { font-size: 0.8125rem; }
  body[data-page="products"] .product-rail__button strong { font-size: 0.875rem; }

  body[data-page="products"] .product-slide__layout {
    gap: 40px;
    padding: 28px 20px 36px;
  }

  body[data-page="products"] .product-slide__number {
    margin-bottom: 16px;
    font-size: 2rem;
  }

  body[data-page="products"] .product-slide h2 {
    font-size: clamp(2rem, 8.4vw, 3.5rem);
    line-height: 1.12;
  }

  body[data-page="products"] .product-slide__description {
    margin-top: 24px;
    font-size: 1rem;
    line-height: 1.7;
  }

  body[data-page="products"] .product-slide__facts {
    display: flex;
    gap: 10px;
    margin-top: 24px;
  }

  body[data-page="products"] .product-slide__cta {
    width: 100%;
    min-height: 52px;
    margin-top: 30px;
  }

  body[data-page="products"] .product-variant-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  body[data-page="products"] .product-variant {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  body[data-page="products"] .product-variant img { aspect-ratio: 16 / 9; }
  body[data-page="products"] .product-variant span { padding: 16px 18px; }

  body[data-page="products"] .product-slide__main-image {
    height: min(55rem, 110svh);
    object-position: 62% top;
    -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent);
    mask-image: linear-gradient(180deg, #000 65%, transparent);
  }

  body[data-page="products"] .product-slide__shade {
    background: linear-gradient(180deg,
      rgba(19, 15, 7, 0.65) 0,
      rgba(19, 15, 7, 0.78) 22rem,
      var(--brown-950) 52rem);
  }

  body[data-page="products"] .product-stage__footer {
    padding: 12px 20px max(28px, env(safe-area-inset-bottom));
  }

  /* Footer compartido: marca, menú en dos columnas y datos agrupados. */
  body[data-page] .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
    padding: 36px 22px 28px;
  }

  body[data-page] .site-footer__brand {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    grid-column: 1 / -1;
    align-items: center;
    gap: 18px;
    min-width: 0;
  }

  body[data-page] .site-footer__logo { width: 100%; max-width: 112px; }

  body[data-page] .site-footer__brand p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
  }

  body[data-page] .footer-contact-button {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    min-height: 48px;
    margin: 2px 0 0;
    font-size: 0.9375rem;
    line-height: 1.3;
  }

  body[data-page] .site-footer__nav,
  body[data-page] .site-footer__contact {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 4px 20px;
    min-width: 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
  }

  body[data-page] .site-footer__nav h2,
  body[data-page] .site-footer__contact h2 {
    grid-column: 1 / -1;
    margin: 0 0 10px;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  body[data-page] .site-footer__nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    font-size: 1rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body[data-page] .site-footer__contact { row-gap: 18px; }

  body[data-page] .site-footer__contact h2 { margin-bottom: 0; }

  body[data-page] .site-footer__contact > a {
    grid-column: 1 / -1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.5;
  }

  body[data-page] .site-footer__contact p {
    min-width: 0;
    margin: 0;
    gap: 8px;
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  body[data-page] .site-footer__contact strong { font-size: 0.9375rem; }

  body[data-page] .site-footer__bottom {
    gap: 12px;
    padding: 20px 22px max(24px, env(safe-area-inset-bottom));
    font-size: 0.8125rem;
    line-height: 1.6;
  }

  body[data-page] .site-footer__bottom a {
    align-self: flex-start;
    min-height: 44px;
    padding-block: 10px;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero-dot::before { transition: none; }
}
