/* ==========================================================================
   Esmero Química — design system
   Palette derived from the brand mark: navy wordmark, green accent bar.
   ========================================================================== */

:root {
  --navy: #12244f;
  --navy-dark: #0b1733;
  --navy-mid: #1c3568;
  --green: #2e8b2e;
  --green-light: #4caf50;
  --green-dark: #226b22;
  --bg: #f7f7f4;
  --white: #ffffff;
  --gray: #4a5568;
  --gray-light: #718096;
  --border: #e2e4e0;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1200px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(18, 36, 79, 0.06);
  --shadow: 0 4px 16px rgba(18, 36, 79, 0.08);
  --shadow-lg: 0 12px 32px rgba(18, 36, 79, 0.12);
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Layout helpers ------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--white); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus { left: 0; color: var(--white); }

/* --- Section headings ---------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.05rem; color: var(--gray); }

.rule {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--green));
  border: 0;
  margin: 0 0 24px;
}
.section-head--center .rule { margin-left: auto; margin-right: auto; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--green); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-dark); color: var(--white); box-shadow: var(--shadow); }

.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); color: var(--white); }

.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }

.btn--ghost-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--navy); }

.btn--sm { padding: 9px 18px; font-size: 0.86rem; }
.btn--block { width: 100%; }

/* --- Header -------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.22s ease;
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--green); }

.header__actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  color: rgba(255, 255, 255, 0.86);
  padding: 104px 0 112px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -180px;
  top: -120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.28) 0%, transparent 68%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--green-light), #8bd68b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead { font-size: 1.16rem; max-width: 620px; margin-bottom: 34px; }
.hero__eyebrow { color: var(--green-light); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.page-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: rgba(255, 255, 255, 0.82);
  padding: 68px 0 60px;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { max-width: 620px; font-size: 1.05rem; }

.breadcrumb {
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.6);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.breadcrumb a:hover { color: var(--green-light); }
.breadcrumb span { margin: 0 8px; }

/* --- Grids --------------------------------------------------------------- */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Category cards ------------------------------------------------------ */

.cat-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(46, 139, 46, 0.4);
}
.cat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--green));
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--white);
}
.cat-card__icon svg { width: 26px; height: 26px; }
.cat-card h3 { margin-bottom: 8px; }
.cat-card p { font-size: 0.93rem; margin-bottom: 16px; }
.cat-card__more {
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

/* --- Pillars ------------------------------------------------------------- */

.pillar { padding-top: 22px; border-top: 3px solid var(--green); }
.pillar h3 { font-size: 1.05rem; margin-bottom: 8px; }
.pillar p { font-size: 0.93rem; }

/* --- Product cards ------------------------------------------------------- */

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.product-card__media {
  position: relative;
  background: linear-gradient(160deg, #eef1ee, #e4e9e4);
  aspect-ratio: 4 / 3;
}
.product-card__media img {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  object-fit: contain;
}

.product-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product-card__body h3 { font-size: 1.03rem; margin-bottom: 8px; }
.product-card__body p { font-size: 0.89rem; margin-bottom: 14px; }

.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(46, 139, 46, 0.1);
  color: var(--green-dark);
  margin-bottom: 12px;
}
.badge--navy { background: rgba(18, 36, 79, 0.08); color: var(--navy); }

.product-card__sizes {
  font-size: 0.79rem;
  color: var(--gray-light);
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.product-card__foot { margin-top: auto; }

/* --- Catalog filters ----------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 17px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.search-field { position: relative; min-width: 260px; }
.search-field input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--navy);
  background: var(--white);
}
.search-field input::placeholder { color: var(--gray-light); }
.search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--gray-light);
}

.result-count { font-size: 0.88rem; color: var(--gray-light); margin-bottom: 6px; }
.sizes-note { font-size: 0.9rem; color: var(--gray); margin: 12px 0 0; }
.result-count + .sizes-note { margin: 0 0 22px; }
.empty-state {
  text-align: center;
  padding: 64px 20px;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* --- Product detail ------------------------------------------------------ */

.detail { display: grid; grid-template-columns: 440px 1fr; gap: 56px; align-items: start; }
.detail__media {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  display: grid;
  place-items: center;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.detail__media img { width: auto; height: auto; max-width: 100%; max-height: 520px; object-fit: contain; }
.detail h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.detail__lead { font-size: 1.08rem; color: var(--gray); margin-bottom: 28px; }

.spec { margin-bottom: 30px; }
.spec h2 {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.spec ul { margin: 0; padding-left: 20px; }
.spec li { margin-bottom: 7px; }

.size-list { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.size-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 15px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.notice {
  background: rgba(18, 36, 79, 0.04);
  border-left: 3px solid var(--navy);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  font-size: 0.9rem;
}
.notice--warn { background: rgba(217, 119, 6, 0.07); border-left-color: #d97706; }

.detail__cta {
  margin-top: 36px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.detail__cta p { flex: 1; min-width: 220px; margin: 0; font-weight: 600; color: var(--navy); }

/* --- Segments ------------------------------------------------------------ */

.segments { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.segments li {
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 45%, var(--green-dark) 100%);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 76px 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 560px; margin: 0 auto 30px; font-size: 1.05rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- Company page -------------------------------------------------------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px;
}
.value-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.value-card p { font-size: 0.92rem; }

.statement { font-size: 1.12rem; line-height: 1.6; color: var(--navy); max-width: 34em; }

.stat { text-align: center; }
.stat__num {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.stat__label {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-light);
}

/* --- Forms --------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--navy); }
.field .req { color: var(--green); }

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 139, 46, 0.14);
}
.field textarea { resize: vertical; min-height: 130px; }
.field .error { font-size: 0.8rem; color: #c53030; display: none; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: #c53030; }
.field.is-invalid .error { display: block; }

.checkbox { flex-direction: row; align-items: flex-start; gap: 11px; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--green); }
.checkbox label { font-size: 0.86rem; font-weight: 400; color: var(--gray); line-height: 1.5; }

.form-status { margin-top: 18px; padding: 14px 18px; border-radius: 8px; font-size: 0.92rem; display: none; }
.form-status.is-ok { display: block; background: rgba(46, 139, 46, 0.1); color: var(--green-dark); }
.form-status.is-err { display: block; background: rgba(197, 48, 48, 0.09); color: #c53030; }

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 19px; height: 19px; color: var(--green); flex-shrink: 0; margin-top: 3px; }
.contact-list strong { display: block; color: var(--navy); font-size: 0.86rem; }
.contact-list span { font-size: 0.92rem; }

.map-embed {
  margin-top: 24px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eceeec;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-link {
  margin-top: 10px;
  font-size: 0.88rem;
}

.map-placeholder {
  margin-top: 24px;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(45deg, #eceeec, #eceeec 12px, #e4e7e4 12px, #e4e7e4 24px);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  font-size: 0.88rem;
  color: var(--gray-light);
}

/* --- Prose (policy page) ------------------------------------------------- */

.prose { max-width: 780px; }
.prose h2 { font-size: 1.35rem; margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* --- Footer -------------------------------------------------------------- */

.footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.62); padding: 68px 0 0; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.3fr;
  gap: 44px;
  padding-bottom: 48px;
}
.footer__logo {
  background: var(--white);
  border-radius: 8px;
  padding: 12px 16px;
  display: inline-block;
  margin-bottom: 18px;
}
.footer__logo img { height: 46px; width: auto; }
.footer p { font-size: 0.9rem; }
.footer h4 {
  color: var(--white);
  font-size: 0.79rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer__contact { font-size: 0.9rem; }
.footer__contact li { margin-bottom: 14px; }
.footer__address span { display: block; white-space: nowrap; }
.footer a { color: rgba(255, 255, 255, 0.62); font-size: 0.9rem; }
.footer a:hover { color: var(--green-light); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 0.83rem;
}

/* --- TODO marker (visible to the client, easy to grep) ------------------- */

.todo {
  background: #fff8e1;
  border-bottom: 1px dashed #d97706;
  color: #92600a;
  padding: 0 3px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; gap: 34px; }
  .detail__media { position: static; max-width: 420px; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .nav-toggle { display: block; }
  .header__actions .btn { display: none; }
  .split { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .hero { padding: 72px 0 78px; }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .filters { flex-direction: column; align-items: stretch; }
  .search-field { min-width: 0; }
}

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

/* --- Floating WhatsApp --------------------------------------------------- */

.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.42);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); color: var(--white); }
.wa-float svg { width: 30px; height: 30px; }
