/* =============================================================
   Tortillería Semillas del Sabor — stylesheet
   Color palette sampled from banner.jpg:
     --yellow       #ffd736  (bright corn yellow)
     --yellow-soft  #fff3bf  (pale / cream highlight)
     --green-dark   #1f6b2f  (deep milpa green)
     --green        #2f7d32  (leaf green)
     --red          #c1272d  (banner ribbon red)
     --masa         #fff8e7  (warm off-white, like masa)
     --ink          #1e1e1e  (body text)
============================================================= */

:root {
  --yellow: #ffd736;
  --yellow-soft: #fff3bf;
  --green-dark: #1f6b2f;
  --green: #2f7d32;
  --green-light: #4b9c4e;
  --red: #c1272d;
  --red-dark: #9a1b20;
  --masa: #fff8e7;
  --cream: #fbf4e0;
  --ink: #1e1e1e;
  --ink-soft: #3d3d3d;
  --muted: #6a6a6a;
  --line: rgba(31, 107, 47, 0.18);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.18);

  --content-max: 1180px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--masa);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(31, 107, 47, 0.15);
}
img { max-width: 100%; display: block; height: auto; }
iframe { max-width: 100%; }
button, a { -webkit-tap-highlight-color: rgba(31, 107, 47, 0.18); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-dark); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Icons / buttons ---------- */
.icon { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.icon-lg { width: 40px; height: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: 0.95rem; }

.btn-whatsapp { background: #25D366; color: #0b3d1f; }
.btn-whatsapp:hover { background: #1ebe5c; }

.btn-call { background: #fff; color: var(--green-dark); border-color: var(--green-dark); }
.btn-call:hover { background: var(--green-dark); color: #fff; }

.btn-green { background: var(--green-dark); color: #fff; }
.btn-green:hover { background: #174f22; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #fff 0%, #fffef6 100%);
  border-bottom: 3px solid var(--yellow);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-eyebrow { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--green-dark); }

/* Nav */
.primary-nav { display: flex; align-items: center; gap: 22px; }
.primary-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.primary-nav a { font-weight: 600; color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; transition: border-color 120ms ease, color 120ms ease; }
.primary-nav a:hover { text-decoration: none; border-color: var(--yellow); color: var(--green-dark); }
.nav-cta { background: #25D366; color: #0b3d1f; padding: 9px 16px; border-radius: 999px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.nav-cta:hover { background: #1ebe5c; text-decoration: none; }

.nav-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; background: var(--ink); border-radius: 2px; margin: 4px 0; transition: transform 200ms ease, opacity 200ms ease; }

/* ---------- Hero (banner-style) ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% 0%, #ffe97a 0%, transparent 60%),
    linear-gradient(180deg, #ffd736 0%, #ffcc1f 55%, #2f7d32 55%, #1f6b2f 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: center;
  padding: 56px 20px 80px;
  position: relative;
  z-index: 2;
}

.hero-logo-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 12px;
}
.hero-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.hero-copy { color: var(--ink); }
.hero-eyebrow {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  margin: 0 0 14px;
  color: #1a1a1a;
}
.hero-title span { color: var(--green-dark); font-style: italic; }
.hero-lede { max-width: 44ch; font-size: 1.1rem; color: #333; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }

.hero-meta { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; color: #222; font-weight: 600; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { color: var(--red); }

.hero-corn {
  position: absolute;
  bottom: -10px;
  width: 170px;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(255,220,100,0.55), rgba(31,107,47,0) 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.hero-corn--left { left: -40px; transform: rotate(-20deg); }
.hero-corn--right { right: -30px; transform: rotate(15deg); }

.hero-ribbon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 24px, var(--red) 24px 48px);
  opacity: 0.9;
}

/* ---------- Generic section ---------- */
.section { padding: 72px 0; position: relative; }
.section--cream { background: var(--cream); }
.section--yellow { background: linear-gradient(180deg, #ffe97a 0%, var(--yellow) 100%); }
.section--yellow-soft { background: var(--yellow-soft); }
.section--green {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
}
.section--green h2, .section--green h3 { color: #fff; }
.section--green p { color: rgba(255, 255, 255, 0.92); }
.section--green .quality-icon { background: rgba(255, 255, 255, 0.15); }
.section--green .contact-card { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.section--green .contact-card:hover { background: rgba(255, 255, 255, 0.16); }
.section--green .contact-card h3 { color: #fff; }
.section--green .contact-card p, .section--green .contact-card span { color: rgba(255, 255, 255, 0.92); }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 10px; }
.section-sub { max-width: 64ch; margin: 0 auto; font-size: 1.05rem; color: var(--ink-soft); }
.section-head--light .section-sub { color: rgba(255, 255, 255, 0.92); }

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.eyebrow--red { background: var(--red); color: #fff; }
.eyebrow--green { background: var(--green-dark); color: #fff; }
.eyebrow--yellow { background: var(--yellow); color: var(--green-dark); }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* ---------- Fact card (Nosotros) ---------- */
.fact-card {
  background: #fff;
  border: 2px solid var(--yellow);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.fact-card::before {
  content: "";
  position: absolute; top: -14px; left: 28px;
  background: var(--red); color: #fff;
  width: 48px; height: 28px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.fact-card h3 { margin-top: 8px; color: var(--green-dark); }
.fact-card dl { display: grid; gap: 14px; margin: 18px 0 0; }
.fact-card dl > div { border-top: 1px dashed var(--line); padding-top: 10px; }
.fact-card dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.fact-card dd { margin: 0; font-weight: 600; }

/* ---------- Products ---------- */
.product-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 22px;
}
.product-card {
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow-md); }
.product-card h3 { color: var(--green-dark); }
.product-emoji { font-size: 2.2rem; display: block; margin-bottom: 8px; }

.product-card--cta {
  background: var(--green-dark); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.product-card--cta h3 { color: #fff; }
.product-card--cta p { color: rgba(255, 255, 255, 0.92); }

/* ---------- Quality ---------- */
.quality-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 22px;
}
.quality-grid li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
}
.quality-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}
.gallery-item {
  width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
}
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  transition: transform 400ms ease;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-item:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 95%; max-height: 95%; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; border: 0; color: #fff;
  font-size: 2.4rem; line-height: 1;
  cursor: pointer;
}

/* ---------- Ubicación ---------- */
.info-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; }
.info-list .icon { color: var(--red); margin-top: 4px; }
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
  background: #eee;
  aspect-ratio: 4 / 3;
  min-height: 280px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}
.contact-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: var(--shadow-sm);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.contact-card h3 { margin: 6px 0 2px; }
.contact-cta { margin-top: auto; font-weight: 700; padding-top: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #151515;
  color: rgba(255, 255, 255, 0.8);
  padding: 36px 0;
  border-top: 6px solid var(--yellow);
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { color: #fff; }
.footer-meta { font-size: 0.9rem; }
.footer-meta p { margin: 0 0 4px; }
#status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.status-open { background: #134e1e; color: #8ef0a1; }
.status-closed { background: #4a1212; color: #ffb0b0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { grid-template-columns: 1fr; padding: 36px 20px 56px; gap: 20px; text-align: center; }
  .hero-copy { text-align: left; }
  .hero-logo { max-width: 260px; }
  .hero-actions { justify-content: flex-start; }
  .map-wrap { aspect-ratio: 16 / 10; }
}

@media (max-width: 760px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 10px 16px; gap: 10px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-name { font-size: 1.02rem; }
  .brand-eyebrow { font-size: 0.64rem; }

  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 0 20px;
    max-height: 0; overflow: hidden;
    transition: max-height 260ms ease, padding 260ms ease;
    box-shadow: var(--shadow-md);
  }
  .primary-nav.open { max-height: 80vh; padding: 14px 20px 20px; overflow-y: auto; }
  .primary-nav ul { flex-direction: column; gap: 6px; width: 100%; }
  .primary-nav ul li { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .primary-nav ul li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 10px 4px; font-size: 1.02rem; }
  .nav-cta { justify-content: center; margin-top: 10px; padding: 12px 16px; }
  .nav-toggle { display: inline-block; }

  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .fact-card { padding: 22px; }
  .product-card, .contact-card { padding: 20px; }
  .map-wrap { aspect-ratio: 4 / 3; min-height: 260px; }
}

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 8px 14px; }
  .brand { gap: 8px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-text { line-height: 1.05; }
  .brand-eyebrow { font-size: 0.6rem; letter-spacing: 0.14em; }
  .brand-name { font-size: 0.98rem; }

  .section { padding: 48px 0; }
  .section-head { margin-bottom: 24px; }
  .section-sub { font-size: 1rem; }

  .hero-inner { padding: 28px 16px 48px; gap: 18px; }
  .hero-title { font-size: clamp(1.7rem, 7.2vw, 2.2rem); }
  .hero-lede { font-size: 1rem; }
  .hero-logo { max-width: 200px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }

  .btn { padding: 12px 18px; font-size: 0.98rem; }
  .btn-sm { padding: 10px 14px; }

  .fact-card { padding: 20px; }
  .fact-card dl { gap: 12px; }

  .product-grid, .quality-grid, .contact-grid { gap: 14px; }
  .product-card, .contact-card, .quality-grid li { padding: 18px; }

  .gallery { gap: 10px; }

  .info-list li { gap: 10px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-brand { gap: 12px; }
}

@media (max-width: 400px) {
  .container { padding: 0 14px; }
  .brand-eyebrow { display: none; }
  .brand-name { font-size: 0.95rem; }
  .hero-title { font-size: 1.6rem; }
  .hero-logo { max-width: 170px; }
  h2 { font-size: 1.5rem; }
  .section { padding: 40px 0; }
  .product-emoji { font-size: 2rem; }
  .quality-icon { width: 46px; height: 46px; font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Plus Code ---------- */
.plus-code {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.plus-code a { color: var(--green-dark); text-decoration: underline; }
.plus-code a:hover { color: var(--green); }
.footer-pluscode {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.82rem;
  opacity: 0.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.footer-pluscode a { color: inherit; text-decoration: underline; }
