/* El Ejido Gourmet Quality · todo acotado a .ej para no pisar el tema */
.ej, .ej *, .ej *::before, .ej *::after { box-sizing: border-box; }

.ej {
  --verde: #17392b; --hoja: #5e9b3a; --tomate: #c93c25; --claro: #ffb199; --mar: #0f5c6b;
  --fondo: #f3f6f1; --blanco: #ffffff; --tinta: #1b2420; --suave: #56635b; --linea: #d5ddd2;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  margin: 0; width: 100%;
  background: var(--fondo); color: var(--tinta);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 0.92rem + 0.42vw, 1.4rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.ej--full { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

.ej img { display: block; max-width: 100%; height: auto; }
.ej h2, .ej h3, .ej p, .ej figure { margin: 0; }
.ej button { font: inherit; cursor: pointer; }
.ej a { color: inherit; }
.ej :focus-visible { outline: 3px solid var(--tomate); outline-offset: 3px; }
.ej .ej-sec--oscuro :focus-visible, .ej .lb :focus-visible { outline-color: var(--claro); }

/* ---------- Estructura ---------- */
.ej-sec { padding: clamp(56px, 8vw, 140px) clamp(20px, 5vw, 120px); }
.ej-sec--claro { background: var(--blanco); }
.ej-sec--oscuro { background: var(--verde); color: #eaf1e6; }
.ej-sec--bleed { padding-inline: 0; }
.ej-wrap { width: 100%; max-width: none; margin-inline: auto; }

.ej .ej-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.5rem, 6.8vw, 6.75rem);
  line-height: 1.04; letter-spacing: -0.02em; color: var(--verde);
}
.ej .ej-sec--oscuro .ej-title { color: #fff; }
.ej-head { margin-bottom: clamp(32px, 5vw, 64px); }

.ej-cols { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: start; }
@media (min-width: 900px) {
  .ej-cols { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 140px); }
  .ej-cols--rev .gal { order: -1; }
  .ej-text { position: sticky; top: 40px; }
}

/* ---------- Texto ---------- */
.ej-text h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.6rem); line-height: 1.2;
  color: var(--verde); margin-bottom: 1.1rem;
}
.ej-text p + p, .intro__text p + p, .duo__item p + p, .tema__text p + p,
.prod__text p + p, .panel__text p + p { margin-top: 1.1em; }
.ej-text .ej-lead { font-size: 1.15em; line-height: 1.65; }
.ej-note {
  margin-top: 1.6rem !important; padding-left: 1.1rem; border-left: 3px solid var(--hoja);
  font-family: var(--serif); font-size: 1.2em; line-height: 1.5; color: var(--verde);
}

/* ---------- Botones ---------- */
.ej .ej-btn {
  display: inline-block; margin-top: 1.8rem; padding: 14px 28px; border-radius: 6px;
  background: var(--tomate); color: #fff; font-weight: 600; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.ej .ej-btn:hover { background: #a92f1b; color: #fff; }
.ej .ej-btn--linea { background: transparent; border: 1px solid rgba(255, 255, 255, .5); }
.ej .ej-btn--linea:hover { background: #fff; color: var(--verde); }
.ej .ej-btn--spaced { margin-top: clamp(28px, 4vw, 48px); }

.ej-round {
  display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border-radius: 50%; border: 1px solid var(--linea);
  background: rgba(255, 255, 255, .94); color: var(--verde);
  transition: background-color .15s, color .15s, border-color .15s;
}
.ej-round svg { width: 20px; height: 20px; }
.ej-round:hover:not(:disabled) { background: var(--verde); color: #fff; border-color: var(--verde); }
.ej-round:disabled { opacity: .35; cursor: default; }
.ej-sec--oscuro .ej-round, .lb .ej-round { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.ej-sec--oscuro .ej-round:hover:not(:disabled), .lb .ej-round:hover { background: #fff; color: var(--verde); border-color: #fff; }

/* ---------- Galería con arco ---------- */
.gal { width: 100%; max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.gal__stage { position: relative; aspect-ratio: 10 / 11; border-radius: 999px 999px 0 0; overflow: hidden; background: #dbe4d8; }
.gal__open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gal__open img { width: 100%; height: 100%; object-fit: cover; }
.gal__prev, .gal__next { position: absolute; bottom: 18px; }
.gal__prev { left: 18px; } .gal__next { right: 18px; }
.gal__count {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  padding: 2px 12px; border-radius: 99px; background: rgba(23, 57, 43, .82); color: #fff;
  font-size: .85rem; font-variant-numeric: tabular-nums; line-height: 1.6; pointer-events: none;
}
.gal__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(56px, 1fr); gap: 8px; overflow-x: auto; padding: 4px 4px 6px; scrollbar-width: thin; }
.gal__thumb { aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: #dbe4d8; opacity: .6; transition: opacity .15s; }
.gal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal__thumb:hover { opacity: .9; }
.gal__thumb[aria-current="true"] { opacity: 1; outline: 3px solid var(--tomate); outline-offset: 2px; }
.gal--single .gal__prev, .gal--single .gal__next, .gal--single .gal__count, .gal--single .gal__thumbs { display: none; }

/* ---------- Carrusel ---------- */
.ej-head--split { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; padding-inline: clamp(20px, 5vw, 120px); }
.ej-ctrl { display: flex; gap: 10px; }
.car__track {
  --side: clamp(20px, 5vw, 120px);
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--side); scroll-padding-inline: var(--side); scrollbar-width: none;
}
.car__track::-webkit-scrollbar { display: none; }
.car__item { flex: 0 0 min(84%, 1200px); scroll-snap-align: start; }
.car__open { display: block; width: 100%; padding: 0; border: 0; background: #0f261c; border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 2; cursor: zoom-in; }
.car__open img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Mapa ---------- */
.map-cols { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .map-cols { grid-template-columns: .75fr 1.25fr; gap: clamp(48px, 6vw, 120px); } }
.map-copy { align-self: center; }
.map-copy p { color: var(--suave); max-width: 44ch; margin-top: 1.2rem; }
.route { margin-top: 2rem; display: grid; gap: 10px; max-width: 560px; }
.route label { font-weight: 600; color: var(--verde); }
.route__row { display: flex; gap: 10px; }
.route input { flex: 1; min-width: 0; padding: 13px 16px; font: inherit; color: var(--tinta); background: #fff; border: 1px solid #b9c5b5; border-radius: 6px; }
.route input::placeholder { color: #85908a; }
.route button { padding: 13px 22px; border: 0; border-radius: 6px; background: var(--tomate); color: #fff; font-weight: 600; white-space: nowrap; transition: background-color .15s; }
.route button:hover { background: #a92f1b; }
.map-frame { border-radius: 6px; overflow: hidden; background: #dbe4d8; border: 1px solid var(--linea); aspect-ratio: 4 / 3; min-height: 380px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Introducción / dúo ---------- */
.intro { display: grid; gap: 36px; align-items: end; }
@media (min-width: 900px) { .intro { grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 6vw, 140px); } }
.intro__text .ej-lead { font-size: 1.2em; line-height: 1.6; color: var(--verde); }

.duo { display: grid; gap: 56px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 140px); } }
.duo__item { border-top: 3px solid var(--hoja); padding-top: 28px; }
.duo__item h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.15; color: var(--verde); margin-bottom: 1.1rem; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid rgba(255, 255, 255, .22); }
.ej:not(.js) .tabs { display: none; }
.ej .tab {
  flex: none; padding: 10px 2px 12px; background: none; border: 0;
  border-bottom: 3px solid transparent; margin-bottom: -1px; text-align: left;
  font-family: var(--serif); color: rgba(234, 241, 230, .68); transition: color .15s, border-color .15s;
}
.ej .tab:hover { color: #fff; }
.ej .tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--claro); }

.tabs--h { gap: clamp(18px, 3vw, 36px); margin-bottom: clamp(32px, 5vw, 64px); }
.tabs--h .tab { font-size: clamp(1.2rem, 2.2vw, 1.9rem); }
.cult__head { margin-bottom: clamp(28px, 4vw, 48px); }

[data-ej-tabs] [role="tabpanel"][hidden] { display: none; }

/* Productos */
.prod { display: grid; gap: 40px; align-items: center; }
.prod + .prod { margin-top: 80px; }
.ej.js .prod + .prod { margin-top: 0; }
@media (min-width: 900px) { .prod { grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 6vw, 140px); } }
.prod__img { width: 100%; max-width: 760px; margin-inline: auto; aspect-ratio: 10 / 11; border-radius: 999px 999px 0 0; overflow: hidden; background: #0f261c; }
.prod__img img { width: 100%; height: 100%; object-fit: cover; }
.prod__text h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5.6vw, 5.25rem); line-height: 1.05; letter-spacing: -.015em; color: #fff; margin-bottom: 1.2rem; }
.prod__text p { color: #dbe6d6; }

/* Razones */
.raz { display: grid; gap: 32px; margin-top: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) { .raz { grid-template-columns: minmax(260px, .6fr) 1.4fr; gap: clamp(48px, 6vw, 120px); align-items: start; } }
.tabs--v { gap: clamp(18px, 3vw, 32px); }
.tabs--v .tab { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
@media (min-width: 900px) {
  .tabs--v { flex-direction: column; gap: 0; overflow: visible; border-bottom: 0; border-left: 1px solid rgba(255, 255, 255, .22); position: sticky; top: 32px; }
  .tabs--v .tab { padding: 10px 0 10px 22px; margin: 0 0 0 -1px; border-bottom: 0; border-left: 3px solid transparent; font-size: clamp(1.3rem, 1.2vw + .9rem, 2.1rem); line-height: 1.25; }
  .tabs--v .tab[aria-selected="true"] { border-left-color: var(--claro); }
}
.panel + .panel { margin-top: 96px; }
.ej.js .panel + .panel { margin-top: 0; }
.panel h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 5vw, 4.75rem); line-height: 1.05; letter-spacing: -.015em; color: #fff; margin-bottom: 1.2rem; }
.panel__text { max-width: 72ch; }
.panel__text p { color: #dbe6d6; }
.panel__text .ej-lead { font-size: 1.12em; color: #fff; }
.panel > p { margin-top: 0; }

.ej-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 15vw, 260px), 1fr)); margin-top: clamp(28px, 4vw, 48px); }
.tile { padding: 0; border: 0; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; background: #0f261c; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.arch { display: block; width: 100%; max-width: 480px; margin-top: clamp(28px, 4vw, 48px); aspect-ratio: 10 / 11; border-radius: 999px 999px 0 0; overflow: hidden; background: #0f261c; }
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Beneficios ---------- */
.tema { display: grid; gap: 24px; align-items: start; border-top: 1px solid var(--linea); padding-block: clamp(40px, 6vw, 96px); scroll-margin-top: 24px; }
.tema:first-child { border-top: 0; padding-top: 0; }
.tema:last-child { padding-bottom: 0; }
@media (min-width: 900px) {
  .tema { grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 6vw, 140px); }
  .tema h3 { position: sticky; top: 40px; }
}
.tema h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 6vw, 6rem); line-height: 1.02; letter-spacing: -.02em; color: var(--verde); }
.tema__text p:first-child { font-size: 1.12em; color: var(--verde); }
.band { background: var(--verde); }
.band img { width: 100%; height: auto; }

/* ---------- Vídeos ---------- */
.vid { display: grid; gap: 20px; margin-top: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) {
  .vid { grid-template-columns: 1fr minmax(240px, .28fr); gap: clamp(20px, 2.5vw, 48px); align-items: start; }
  .vid:not(:has(.list)) { grid-template-columns: 1fr; }
}
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b1d15; border-radius: 6px; overflow: hidden; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.list { display: grid; gap: 12px; align-content: start; }
@media (max-width: 899px) { .list { grid-auto-flow: column; grid-auto-columns: minmax(200px, 60%); overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; } }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #0b1d15; opacity: .62; transition: opacity .15s; }
.thumb:hover { opacity: .92; }
.thumb[aria-current="true"] { opacity: 1; outline: 3px solid var(--claro); outline-offset: 3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(9, 20, 14, .35), rgba(9, 20, 14, .05)); }
.thumb__play svg { width: 44px; height: 44px; color: #fff; }

/* ---------- Visor ampliado ---------- */
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(9, 20, 14, .95); color: #fff; }
.lb::backdrop { background: rgba(9, 20, 14, .95); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; }
.lb__img { max-width: 96vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lb__bar { display: flex; align-items: center; gap: 18px; padding: 0 0 26px; }
.lb__count { font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: center; }
.lb__close { position: absolute; top: 18px; right: 18px; }

@media (prefers-reduced-motion: reduce) {
  .ej * { transition: none !important; scroll-behavior: auto !important; }
}
