:root {
  --ffl-green: #2d5a3d;
  --ffl-green-dark: #173c29;
  --ffl-orange: #f59a3d;
  --ffl-orange-dark: #d9781f;
  --ffl-orange-ink: #7d3b0c;
  --ffl-cream: #f6f0e4;
  --ffl-ink: #2d332e;
  --ffl-muted: #59615c;
  --ffl-border: #d4ddd2;
}

/* Texto y controles: contraste WCAG AA sin cambiar la paleta de marca. */
.ffl-weekly-closed__eyebrow,
.ffl-weekly-eyebrow,
.ffl-weekly-category,
.ffl-nutrition-eyebrow,
.ffl-two-deliveries-announcement__eyebrow,
.ffl-how__eyebrow,
.ffl-how__kicker,
.ffl-shop-line-groups__eyebrow {
  color: var(--ffl-orange-ink) !important;
}

.ffl-weekly-eyebrow,
.ffl-nutrition-eyebrow,
.ffl-two-deliveries-announcement__eyebrow,
.ffl-how__eyebrow,
.ffl-how__kicker,
.ffl-shop-line-groups__eyebrow,
.ffl-hint,
.ffl-note.ffl-wrap {
  font-size: max(11px, .72rem) !important;
}

.ffl-weekly-cta,
.woocommerce ul.products li.product .button,
.ffl-carousel-action a {
  background: var(--ffl-orange) !important;
  color: var(--ffl-ink) !important;
}

.ffl-how__line--goal .ffl-how__badge,
.ffl-s4-step-num,
.ast-woo-product-category,
.woocommerce-breadcrumb {
  color: var(--ffl-green-dark) !important;
}

.ffl-s4-steps > li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--ffl-ink);
  font-size: 15px;
  line-height: 1.6;
}

.ffl-s4-steps > li:last-child {
  margin-bottom: 0;
}

.ffl-s4-step-num {
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 800;
}

.ffl-s3-grid > div:nth-of-type(2) > span {
  background: var(--ffl-green) !important;
  color: #fff !important;
}

.ffl-calc-availability {
  color: #fff !important;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--ffl-orange) !important;
  outline-offset: 3px !important;
}

/* La antigua cuenta atrás se mantiene como una barra sencilla de acceso. */
.ffl-launch-countdown__timer {
  display: none !important;
}

.ffl-launch-countdown__inner {
  min-height: 58px;
}

/* Galería: elimina el hueco del tema y evita que el titular invada el carrusel. */
body.page-id-1137 .site-content > .ast-container {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

body.page-id-1137 #primary,
body.page-id-1137 .site-main,
body.page-id-1137 .ast-article-single {
  width: 100%;
  max-width: none;
  margin-block: 0 !important;
  padding: 0 !important;
}

body.page-id-1137 .entry-content {
  margin: 0;
}

body.page-id-1137 .entry-content > p:empty {
  display: none;
}

body.page-id-1137 .ffl-carousel-page {
  width: min(1440px, calc(100vw - 24px));
  margin-top: 18px;
}

body.page-id-1137 .ffl-carousel-intro {
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: clamp(44px, 6vw, 88px);
  min-height: 680px;
}

body.page-id-1137 .ffl-carousel-copy {
  min-width: 0;
  max-width: 460px;
}

body.page-id-1137 #ffl-carousel-title {
  max-width: 7ch;
  font-size: clamp(48px, 5.3vw, 78px);
  line-height: .95;
  overflow-wrap: normal;
  text-wrap: balance;
}

body.page-id-1137 .ffl-carousel-slide figcaption {
  background: linear-gradient(transparent, rgba(6, 22, 13, .96));
  color: #fff;
}

body.page-id-1137 .ffl-carousel-story span,
body.page-id-1137 .ffl-carousel-lightbox-meta span,
body.page-id-1137 .ffl-carousel-hint::before {
  color: #ffe0ad;
}

body.page-id-1137 .ffl-carousel-story p {
  color: #f4f8f4;
}

body.page-id-1137 .ffl-carousel-action a {
  color: var(--ffl-ink) !important;
}

@media (max-width: 1020px) {
  body.page-id-1137 .ffl-carousel-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
  }

  body.page-id-1137 .ffl-carousel-copy {
    max-width: 760px;
  }

  body.page-id-1137 #ffl-carousel-title {
    max-width: 12ch;
  }
}

@media (max-width: 680px) {
  body.page-id-1137 .ffl-carousel-page {
    width: calc(100vw - 16px);
    margin-top: 8px;
  }

  body.page-id-1137 .ffl-carousel-intro {
    padding: 32px 18px 28px;
  }

  body.page-id-1137 #ffl-carousel-title {
    max-width: 8ch;
    font-size: clamp(42px, 14vw, 60px);
  }
}

/* El bloque antiguo usaba 100vw y podía ensanchar la página en móvil. */
body.home,
body.home #page,
body.home #content,
body.home #primary,
body.home .entry-content {
  max-width: 100%;
  overflow-x: clip;
}

body.home .ffl-hero-section {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
}

body.home .ffl-hero-container {
  width: 100%;
  box-sizing: border-box;
}

/* El constructor de portada repone este texto después de cargar el JavaScript. */
body.ffl-weekly-orders-closed .ffl-hero-cta {
  font-size: 0 !important;
}

body.ffl-weekly-orders-closed .ffl-hero-cta::after {
  content: "Ver el menú semanal →";
  font-size: 16px;
}

/* Contraste correcto para la introducción de Mi cuenta. */
body.woocommerce-account .ffl-account-welcome {
  border: 1px solid var(--ffl-border) !important;
  background: var(--ffl-cream) !important;
  color: var(--ffl-ink) !important;
}

body.woocommerce-account .ffl-account-welcome > div > span,
body.woocommerce-account .ffl-account-welcome h2 {
  color: var(--ffl-green) !important;
}

body.woocommerce-account .ffl-account-welcome div p,
body.woocommerce-account .ffl-account-welcome > p,
body.woocommerce-account .ffl-account-welcome ul,
body.woocommerce-account .ffl-account-welcome li {
  color: #3f4a43 !important;
}

body.woocommerce-account .ffl-account-welcome a {
  color: var(--ffl-green-dark) !important;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Banner de cookies compacto, legible y coherente con la marca. */
body #cmplz-cookiebanner-container .cmplz-cookiebanner {
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
  padding: 20px !important;
  border: 1px solid var(--ffl-border) !important;
  border-radius: 18px !important;
  background: #fffdf8 !important;
  color: var(--ffl-ink) !important;
  box-shadow: 0 18px 46px rgba(23, 60, 41, .18) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

body #cmplz-cookiebanner-container .cmplz-title {
  color: var(--ffl-green-dark) !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

body #cmplz-cookiebanner-container .cmplz-message,
body #cmplz-cookiebanner-container .cmplz-category-title,
body #cmplz-cookiebanner-container .cmplz-description {
  color: #465049 !important;
}

body #cmplz-cookiebanner-container .cmplz-message {
  max-height: 7.5em;
  overflow-y: auto;
  font-size: .9rem !important;
  line-height: 1.5 !important;
}

body #cmplz-cookiebanner-container .cmplz-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

body #cmplz-cookiebanner-container .cmplz-btn {
  min-height: 46px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

body #cmplz-cookiebanner-container .cmplz-accept {
  border-color: var(--ffl-green) !important;
  background: var(--ffl-green) !important;
  color: #fff !important;
}

body #cmplz-cookiebanner-container .cmplz-deny {
  border-color: var(--ffl-orange) !important;
  background: var(--ffl-orange) !important;
  color: var(--ffl-ink) !important;
}

body #cmplz-cookiebanner-container .cmplz-view-preferences,
body #cmplz-cookiebanner-container .cmplz-save-preferences,
body #cmplz-cookiebanner-container .cmplz-manage-options {
  grid-column: 1 / -1;
  border-color: var(--ffl-green) !important;
  background: transparent !important;
  color: var(--ffl-green-dark) !important;
}

body #cmplz-cookiebanner-container .cmplz-close {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
}

body #cmplz-cookiebanner-container :is(button, a):focus-visible {
  outline: 3px solid rgba(245, 154, 61, .65) !important;
  outline-offset: 3px !important;
}

@media (max-width: 768px) {
  body.home .ffl-hero-container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 30px 20px 38px !important;
    gap: 24px !important;
  }

  body.home .ffl-hero-left,
  body.home .ffl-hero-right {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 0 !important;
  }

  body.home .ffl-hero-right {
    order: 1 !important;
  }

  body.home .ffl-hero-left {
    order: 2 !important;
  }

  body.home .ffl-hero-right img {
    width: 100% !important;
    max-height: 420px !important;
    object-fit: cover !important;
    object-position: center 32% !important;
    border-radius: 18px !important;
  }

  body.home .ffl-hero-left h1 {
    max-width: 12ch;
    margin-bottom: 16px !important;
    font-size: clamp(2.35rem, 11.5vw, 3.25rem) !important;
    line-height: 1.02 !important;
    overflow-wrap: normal;
  }

  body.home .ffl-hero-left p {
    max-width: 38rem;
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  body.home .ffl-hero-cta {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    text-align: center;
  }

  body #cmplz-cookiebanner-container .cmplz-cookiebanner {
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 18px !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 520px) {
  body #cmplz-cookiebanner-container .cmplz-buttons {
    grid-template-columns: 1fr !important;
  }

  body #cmplz-cookiebanner-container .cmplz-view-preferences,
  body #cmplz-cookiebanner-container .cmplz-save-preferences,
  body #cmplz-cookiebanner-container .cmplz-manage-options {
    grid-column: auto;
  }
}

