/* Estilos compartidos entre páginas — Imcopartes Web */

@import url("./colors_and_type.css");
@import url("./styles-base.css");

/* ==========================================================================
   WHATSAPP FAB — botón flotante presente en todas las páginas
   ========================================================================== */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 10px 24px rgb(37 211 102 / 0.35),
    0 2px 6px rgb(34 34 33 / 0.18);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 120ms var(--ease-out);
}
.wa-fab:hover {
  transform: translateY(-2px);
  background: #20BA5A;
  box-shadow:
    0 14px 32px rgb(37 211 102 / 0.42),
    0 3px 8px rgb(34 34 33 / 0.22);
}
.wa-fab:active { transform: translateY(0); }
.wa-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.wa-fab__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 240ms var(--ease-out), margin 240ms var(--ease-out), padding 240ms var(--ease-out);
}
.wa-fab:hover .wa-fab__label,
.wa-fab:focus-visible .wa-fab__label {
  max-width: 180px;
  margin-left: 8px;
  padding-right: 4px;
}
@media (max-width: 640px) {
  .wa-fab { right: 16px; bottom: 16px; padding: 14px; }
  .wa-fab__label { display: none; }
}

/* Pulse halo on first load to draw attention */
.wa-fab::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid #25D366;
  opacity: 0;
  animation: waPulse 2.6s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0%   { transform: scale(0.95); opacity: 0.55; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ==========================================================================
   COOKIE BANNER (shared)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
}
.cookie-banner__inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1200px; margin: 0 auto;
  flex-wrap: wrap;
}
.cookie-banner__text { flex: 1; min-width: 280px; font-size: 13px; line-height: 1.55; color: var(--fg); }
.cookie-banner__text strong { color: var(--imco-black); }
.cookie-banner__text a { color: var(--imco-blue); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; justify-content: center; }
}

/* ==========================================================================
   PAGE HEAD (compartido para páginas internas que NO sean Home)
   ========================================================================== */
.page-head {
  position: relative;
  background: var(--imco-black);
  color: #fff;
  padding: 88px 32px 96px;
  overflow: hidden;
}
.page-head__diagonal {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    125deg,
    transparent 0%, transparent 55%,
    rgb(20 93 158 / 0.12) 55.2%,
    rgb(20 93 158 / 0.12) 70%,
    transparent 70.2%
  );
}
.page-head__inner {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px;
  align-items: end;
}
.page-head__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue-300); margin-bottom: 16px;
}
.page-head__title {
  font-size: 64px; font-weight: 900; line-height: 1.02;
  letter-spacing: -0.02em; margin: 0 0 20px;
  color: #fff; text-wrap: balance;
}
.page-head__title em {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  color: var(--blue-400);
  text-transform: uppercase;
  font-size: 0.55em; letter-spacing: 0;
  display: inline-block;
  transform: translateY(-0.08em);
}
.page-head__lead {
  font-size: 18px; line-height: 1.55;
  color: var(--neutral-300);
  margin: 0; max-width: 56ch;
}
.page-head__lead strong { color: #fff; font-weight: 700; }

.page-head__side {
  display: flex; flex-direction: column; gap: 12px; align-self: end;
}

@media (max-width: 960px) {
  .page-head { padding: 64px 24px 72px; }
  .page-head__inner { grid-template-columns: 1fr; gap: 32px; }
  .page-head__title { font-size: 44px; }
}

/* ==========================================================================
   SECTION RHYTHM
   ========================================================================== */
.section--alt { background: var(--neutral-50); }
.section--dark { background: var(--imco-black); color: #fff; }
.section--dark .section__head h2 { color: #fff; }
.section--dark .section__head .eye { color: var(--blue-300); }
.section--dark p { color: var(--neutral-300); }

.section__head--center {
  text-align: center;
  flex-direction: column;
  align-items: center;
}
.section__head--center .eye { display: block; margin-bottom: 10px; }
.section__head--center h2 { text-wrap: balance; }

/* ==========================================================================
   NAV — extras
   ========================================================================== */
.nav__mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: var(--fg);
}
@media (max-width: 960px) {
  /* Two-row mobile nav: logo gets the full top row (more brand presence),
     CTA + hamburger drop to a second row underneath. */
  .nav {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand brand"
      "cta   toggle";
    row-gap: 10px;
    column-gap: 12px;
    padding: 14px 18px 12px;
  }
  .nav__brand {
    grid-area: brand;
    justify-self: stretch;
    display: flex;
    justify-content: center;
    padding: 4px 0;
  }
  .nav__brand img {
    height: auto;
    width: 100%;
    max-width: 360px;
    object-fit: contain;
  }
  .nav__links { display: none; }
  .nav__search { min-width: 0; }
  .nav__actions {
    grid-area: cta;
    display: contents; /* let .btn and .nav__mobile-toggle land in their own grid cells */
  }
  .nav__actions .nav__search { display: none; }
  .nav__actions .btn {
    grid-area: cta;
    justify-self: stretch;
    justify-content: center;
  }
  .nav__mobile-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: end;
    width: 42px; height: 42px;
    justify-content: center; align-items: center;
  }
  .nav--mobile-open .nav__links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 18px 18px;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav--mobile-open .nav__links a { padding: 10px 4px; font-size: 16px; }
}
@media (max-width: 480px) {
  .nav__brand img { max-width: 320px; }
}

/* ==========================================================================
   FOOTER overrides — multi-line legal block
   ========================================================================== */
.footer__legal {
  max-width: 1200px; margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--neutral-800);
  display: flex; justify-content: space-between; gap: 32px;
  font-size: 12px; color: var(--neutral-400);
  flex-wrap: wrap;
}
.footer__legal-info { line-height: 1.7; max-width: 60ch; }
.footer__legal-info strong { color: #fff; }
.footer__legal-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__bottom {
  max-width: 1200px; margin: 24px auto 0; padding-top: 18px;
  border-top: 1px solid var(--neutral-800);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--neutral-500); flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE FIXES — mobile breakpoints for shared layout primitives
   These live in shared.css because the same patterns appear in every page
   (stats strip, section heads, footer columns).
   ========================================================================== */

/* Stats strip: 3 cols → stacks at ≤640. The values ("+3.000", "Bogotá",
   "Colombia") are wide; 36px num on a 130px col overflows the card. */
@media (max-width: 640px) {
  .stats__inner {
    grid-template-columns: 1fr;
    padding: 20px 20px;
    gap: 14px;
  }
  .stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .stat:last-child { border-bottom: 0; }
  .stat__num { font-size: 26px; flex: 0 0 auto; }
  .stat__label { margin-top: 0; font-size: 11px; }
}

/* Section heads: h2 on the left + action button on the right via
   space-between. On mobile that pushes the button off-canvas behind the
   heading. Stack them and shrink the h2. */
@media (max-width: 720px) {
  .section__head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
  }
  .section__head h2 {
    font-size: 28px !important;
    line-height: 1.15;
  }
  .section__head .btn { align-self: flex-start; }
}

/* Footer: 4-column grid collapses to 2 then 1. Without this the columns
   are <100px wide and headings like "EMPRESA" get cut off. */
@media (max-width: 860px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__legal { flex-direction: column; gap: 16px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

/* Catalog CTA card: the dark PDF card had no max-width on mobile and
   sometimes pushed its inner content (button, parentheses) past the
   safe-area edge. Tighten padding + ensure buttons stay inside. */
@media (max-width: 640px) {
  .catalog-cta__inner .btn { width: 100%; justify-content: center; }
  .catalog-cta__ctas { flex-direction: column; gap: 10px; width: 100%; }
  .catalog-cta__art { max-width: 100%; }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.eye {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--imco-blue);
}
.btn-success {
  background: var(--success); color: #fff; border-color: var(--success);
}
.btn-success:hover { background: #186E48; }

/* Loading-state spinner used as Babel-transpile placeholder */
.page-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; color: var(--fg-muted); font-size: 14px;
}
