/* ==========================================================================
   frutimix.co.cr — page layout
   Builds on design-system.css (load that first). Only layout and
   page-specific composition lives here; colors/type/spacing come from tokens.
   ========================================================================== */

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--fm-z-header);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow var(--fm-dur) var(--fm-ease);
}
.site-header.is-scrolled { box-shadow: var(--fm-shadow-md); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-4);
  min-height: var(--fm-header-h);
}
.site-logo { display: inline-flex; align-items: center; flex: none; }
.site-logo img { width: 132px; height: auto; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  border: 0;
  border-radius: var(--fm-radius-md);
  background: transparent;
  color: var(--fm-forest);
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

.site-nav {
  position: fixed;
  inset: var(--fm-header-h) 0 auto 0;
  display: none;
  flex-direction: column;
  gap: var(--fm-space-2);
  max-height: calc(100dvh - var(--fm-header-h));
  overflow-y: auto;
  padding: var(--fm-space-4) var(--fm-gutter) var(--fm-space-6);
  background: var(--fm-white);
  box-shadow: var(--fm-shadow-lg);
}
.nav-open .site-nav { display: flex; }
.site-nav__list { display: flex; flex-direction: column; list-style: none; }
.site-nav__list a {
  display: block;
  padding: var(--fm-space-3) 0;
  border-bottom: 1px solid var(--fm-gray-100);
  color: var(--fm-forest);
  font-size: var(--fm-text-lg);
  font-weight: var(--fm-weight-medium);
  text-decoration: none;
}
.site-nav__list a:hover { color: var(--fm-terracotta); }
.site-nav__actions { display: flex; align-items: center; gap: var(--fm-space-3); margin-top: var(--fm-space-4); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--fm-radius-pill);
  color: var(--fm-forest);
  font-size: var(--fm-text-sm);
  font-weight: var(--fm-weight-medium);
  text-decoration: none;
}
.lang-switch:hover { background: var(--fm-forest-100); color: var(--fm-forest); }

@media (min-width: 960px) {
  .site-logo img { width: 150px; }
  .nav-toggle { display: none; }
  .site-nav, .nav-open .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--fm-space-5);
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .site-nav__list { flex-direction: row; gap: var(--fm-space-5); }
  .site-nav__list a { padding: var(--fm-space-2) 0; border: 0; font-size: var(--fm-text-sm); position: relative; }
  .site-nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
    background: var(--fm-terracotta); transform: scaleX(0); transform-origin: left;
    transition: transform var(--fm-dur) var(--fm-ease);
  }
  .site-nav__list a:hover::after { transform: scaleX(1); }
  .site-nav__actions { margin-top: 0; gap: var(--fm-space-2); }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--fm-space-7) var(--fm-space-8); overflow: hidden; }
.hero__grid { display: grid; gap: var(--fm-space-7); align-items: center; }
.hero__title { margin-bottom: var(--fm-space-5); }
.hero__lead { max-width: 34rem; margin-bottom: var(--fm-space-6); }
.hero__claims { display: flex; flex-wrap: wrap; gap: var(--fm-space-2); margin: 0 0 var(--fm-space-6); list-style: none; }
.hero__claims li {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-white);
  font-size: var(--fm-text-xs);
  font-weight: var(--fm-weight-medium);
  letter-spacing: 0.04em;
}
.hero__visual { position: relative; max-width: 540px; width: 100%; margin-inline: auto; }
.hero__photo { border-radius: var(--fm-radius-xl); box-shadow: 0 30px 60px rgb(60 20 5 / 0.3); }
.hero__seal {
  position: absolute;
  left: -6px;
  bottom: -26px;
  z-index: 3;
  width: clamp(104px, 22vw, 150px);
  padding: 10px;
  border-radius: 50%;
  background: var(--fm-forest);
  box-shadow: var(--fm-shadow-lg);
}
.hero__icon { position: absolute; top: var(--fm-space-5); right: var(--fm-gutter); width: 40px; opacity: 0.9; }

@media (min-width: 900px) {
  .hero { padding-block: var(--fm-space-8) var(--fm-space-9); }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--fm-space-8); }
  .hero__seal { left: -48px; bottom: -40px; }
}

/* ---------- Claims strip ---------- */
.claims { padding-block: var(--fm-space-6); }
.claims__list { display: grid; grid-template-columns: 1fr; gap: var(--fm-space-5) var(--fm-space-4); list-style: none; }
.claims__item { display: flex; align-items: center; gap: var(--fm-space-3); }
.claims__item strong { display: block; color: var(--fm-white); font-weight: var(--fm-weight-semibold); line-height: 1.25; }
.claims__item span { font-size: var(--fm-text-xs); color: var(--fm-color-muted); }
.claims .fm-icon-circle { width: 48px; height: 48px; }
.claims .fm-icon-circle svg { width: 22px; height: 22px; }
@media (min-width: 560px) { .claims__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .claims__list { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Product catalog ---------- */
/* Flex (not grid) so an incomplete last row stays centered (5 products). */
.catalog__grid { --_cols: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fm-space-5); }
.catalog__grid > * { flex: 0 1 calc((100% - (var(--_cols) - 1) * var(--fm-space-5)) / var(--_cols)); min-width: 0; }
@media (min-width: 640px)  { .catalog__grid { --_cols: 2; } }
@media (min-width: 1040px) { .catalog__grid { --_cols: 3; } }

.product-card .fm-card__body { gap: var(--fm-space-3); }
.product-card__badges { display: flex; flex-wrap: wrap; gap: var(--fm-space-2); }
.product-card__desc { margin: 0; font-size: var(--fm-text-sm); }
.product-card__sizes-label { margin: var(--fm-space-2) 0 0; font-size: var(--fm-text-xs); font-weight: var(--fm-weight-medium); letter-spacing: var(--fm-tracking-wide); text-transform: uppercase; color: var(--fm-color-muted); }
.product-card__sizes { display: flex; flex-wrap: wrap; gap: var(--fm-space-2); list-style: none; }

.product-card details { border-top: 1px solid var(--fm-gray-100); padding-top: var(--fm-space-3); font-size: var(--fm-text-sm); }
.product-card summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 40px; cursor: pointer; list-style: none;
  color: var(--fm-forest); font-weight: var(--fm-weight-medium);
}
.product-card summary::-webkit-details-marker { display: none; }
.product-card summary::after { content: "+"; font-size: 1.4em; font-weight: var(--fm-weight-light); line-height: 1; transition: transform var(--fm-dur) var(--fm-ease); }
.product-card details[open] summary::after { transform: rotate(45deg); }
.product-card dl { margin: var(--fm-space-2) 0 0; }
.product-card dt { margin-top: var(--fm-space-3); color: var(--fm-forest); font-weight: var(--fm-weight-semibold); }
.product-card dd { margin: var(--fm-space-1) 0 0; }

.catalog__note { margin-top: var(--fm-space-6); font-size: var(--fm-text-sm); color: var(--fm-color-muted); text-align: center; }

/* ---------- About / quality ---------- */
.about__grid { display: grid; gap: var(--fm-space-7); align-items: center; }
.about__media { position: relative; }
.about__media .fm-media:nth-child(2) { display: none; }
.about__stat { display: flex; align-items: baseline; gap: var(--fm-space-3); margin: var(--fm-space-5) 0; }
.about__stat strong { font-size: var(--fm-text-5xl); font-weight: var(--fm-weight-semibold); line-height: 1; color: var(--fm-terracotta); letter-spacing: -0.03em; }
.about__stat span { max-width: 14rem; font-size: var(--fm-text-sm); line-height: 1.4; }
.about__entity { margin-top: var(--fm-space-5); padding: var(--fm-space-4) var(--fm-space-5); border-radius: var(--fm-radius-md); background: var(--fm-white); font-size: var(--fm-text-sm); }

@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1fr 1fr; gap: var(--fm-space-8); }
  .about__media { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--fm-space-4); align-items: end; }
  .about__media .fm-media:nth-child(2) { display: block; margin-bottom: var(--fm-space-8); }
}

.process { margin-top: var(--fm-space-8); }
.process__list { display: grid; gap: var(--fm-space-5); list-style: none; counter-reset: step; }
.process__step { position: relative; padding: var(--fm-space-5); border-radius: var(--fm-radius-lg); background: var(--fm-white); box-shadow: var(--fm-shadow-sm); }
.process__step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--fm-space-3);
  font-size: var(--fm-text-xs);
  font-weight: var(--fm-weight-medium);
  letter-spacing: var(--fm-tracking-wide);
  color: var(--fm-terracotta);
}
.process__step h3 { margin-bottom: var(--fm-space-2); }
.process__step p { font-size: var(--fm-text-sm); }
@media (min-width: 800px) { .process__list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- B2B / wholesale ---------- */
.b2b__grid { display: grid; gap: var(--fm-space-7); }
.b2b__segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--fm-space-3); margin: var(--fm-space-5) 0 0; list-style: none; }
.b2b__segments li {
  display: flex; align-items: center; gap: var(--fm-space-3);
  padding: var(--fm-space-3) var(--fm-space-4);
  border-radius: var(--fm-radius-md);
  background: rgb(255 255 255 / 0.1);
  color: var(--fm-white);
  font-size: var(--fm-text-sm);
  font-weight: var(--fm-weight-medium);
}
.b2b__segments svg { color: var(--fm-mango); }
.b2b__terms { display: grid; gap: var(--fm-space-4); list-style: none; }
.b2b__term { display: flex; gap: var(--fm-space-4); padding: var(--fm-space-5); border-radius: var(--fm-radius-lg); background: var(--fm-white); color: var(--fm-gray-600); }
.b2b__term h3 { margin-bottom: var(--fm-space-1); font-size: var(--fm-text-lg); color: var(--fm-forest); }
.b2b__term p { font-size: var(--fm-text-sm); }
.b2b__retail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fm-space-3); margin-top: var(--fm-space-6); }
.b2b__retail span { font-size: var(--fm-text-xs); letter-spacing: var(--fm-tracking-wide); text-transform: uppercase; color: var(--fm-color-muted); }
.b2b__retail strong { padding: 0.4rem 1rem; border: 1px solid var(--fm-color-border); border-radius: var(--fm-radius-pill); color: var(--fm-white); font-weight: var(--fm-weight-medium); }
.b2b__cta { margin-top: var(--fm-space-6); }
@media (min-width: 960px) { .b2b__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--fm-space-8); align-items: start; } }

/* ---------- Contact ---------- */
.contact__grid { display: grid; gap: var(--fm-space-7); }
.contact__info { display: flex; flex-direction: column; gap: var(--fm-space-4); margin-top: var(--fm-space-6); list-style: none; }
.contact__info li { display: flex; align-items: center; gap: var(--fm-space-4); }
.contact__info a { color: var(--fm-forest); font-weight: var(--fm-weight-medium); text-decoration: none; }
.contact__info a:hover { color: var(--fm-terracotta); text-decoration: underline; }
.contact__info small { display: block; font-size: var(--fm-text-xs); color: var(--fm-color-muted); }
.contact__info .fm-icon-circle { width: 48px; height: 48px; }
.contact__info .fm-icon-circle svg { width: 22px; height: 22px; }

.contact-form { padding: var(--fm-space-5); border-radius: var(--fm-radius-xl); background: var(--fm-white); box-shadow: var(--fm-shadow-lg); }
.contact-form__grid { display: grid; gap: var(--fm-space-4); }
.contact-form fieldset { margin: 0; padding: 0; border: 0; }
.contact-form legend { margin-bottom: var(--fm-space-2); padding: 0; }
.contact-form__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--fm-space-2) var(--fm-space-4); }
.contact-form__honey { display: none !important; }
.contact-form__status:empty { display: none; }
@media (min-width: 640px) {
  .contact-form { padding: var(--fm-space-6); }
  .contact-form__grid { grid-template-columns: 1fr 1fr; }
  .contact-form__full { grid-column: 1 / -1; }
}
@media (min-width: 960px) { .contact__grid { grid-template-columns: 0.8fr 1.2fr; gap: var(--fm-space-8); align-items: start; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--fm-space-8) var(--fm-space-5); background: var(--fm-forest-800); color: rgb(255 255 255 / 0.75); font-size: var(--fm-text-sm); }
.site-footer a { color: rgb(255 255 255 / 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--fm-mango); }
.site-footer__grid { display: grid; gap: var(--fm-space-6); }
.site-footer__brand img.site-footer__logo { width: 150px; margin-bottom: var(--fm-space-4); }
.site-footer__brand p { max-width: 22rem; }
.site-footer h2 { margin-bottom: var(--fm-space-3); font-size: var(--fm-text-xs); font-weight: var(--fm-weight-medium); letter-spacing: var(--fm-tracking-wide); text-transform: uppercase; color: var(--fm-white); }
.site-footer ul { display: flex; flex-direction: column; gap: var(--fm-space-2); list-style: none; }
.site-footer__social { display: inline-flex; align-items: center; gap: var(--fm-space-2); }
.site-footer__bottom { --fm-color-border: rgb(255 255 255 / 0.15); --fm-color-muted: rgb(255 255 255 / 0.55); margin-top: var(--fm-space-7); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--fm-space-2) var(--fm-space-5); margin-top: var(--fm-space-4); font-size: var(--fm-text-xs); color: rgb(255 255 255 / 0.55); }
.site-footer__legal p { margin: 0; }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--fm-z-float);
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;              /* WhatsApp brand green (third-party) */
  color: #fff;
  box-shadow: var(--fm-shadow-lg);
  transition: transform var(--fm-dur) var(--fm-ease);
}
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; }
