/* ============================================================
   CIPC — Modernized header + mega-menu navigation.
   Loaded site-wide. EVERY rule is scoped under `.site-top` so it
   cannot leak into the rest of the Tailwind site. The logo/search
   band stays white; the navigation bar is the modern dark theme.
   ============================================================ */

:root {
  --blue:        oklch(0.64 0.17 252);
  --blue-bright: oklch(0.74 0.15 246);
  --blue-deep:   oklch(0.52 0.15 256);
  --blue-ink:    oklch(0.40 0.10 258);
  --red:         oklch(0.62 0.21 26);

  --bg:      oklch(0.165 0.022 258);
  --bg-2:    oklch(0.205 0.026 258);
  --card:    oklch(0.235 0.028 258);
  --card-2:  oklch(0.27 0.03 258);
  --line:    oklch(0.34 0.03 258);
  --line-2:  oklch(0.42 0.035 258);

  --ink:     oklch(0.98 0.004 258);
  --ink-2:   oklch(0.80 0.018 258);
  --ink-3:   oklch(0.64 0.02 258);

  --l-bg:     oklch(0.982 0.004 255);
  --l-panel:  oklch(0.958 0.007 255);
  --l-card:   oklch(1 0 0);
  --l-line:   oklch(0.905 0.012 255);
  --l-line-2: oklch(0.855 0.016 255);
  --l-ink:    oklch(0.27 0.026 258);
  --l-ink-2:  oklch(0.45 0.022 258);
  --l-ink-3:  oklch(0.585 0.018 258);

  --maxw: 1280px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: var(--font-body);
}
.site-top *, .site-top *::before, .site-top *::after { box-sizing: border-box; }
.site-top .container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ---------- utility strip (light) ---------- */
.site-top .utility {
  background: #fff;
  border-bottom: 1px solid var(--l-line);
  font-size: 13px;
  color: var(--l-ink-2);
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  max-height: 44px;
}
.site-top .utility-row { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.site-top .utility a { color: var(--l-ink-2); transition: color .15s; text-decoration: none; }
.site-top .utility a:hover { color: var(--blue); }
.site-top .u-left { display: flex; align-items: center; gap: 22px; }
.site-top .u-right { display: flex; align-items: center; gap: 18px; }
.site-top .u-phone { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--l-ink); white-space: nowrap; }
.site-top .tagline, .site-top .u-right a { white-space: nowrap; }
.site-top .u-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.site-top .lang-pill { border: 1px solid var(--l-line-2); border-radius: 999px; padding: 3px 12px; font-weight: 600; letter-spacing: .02em; }

/* ---------- main header band (white) ---------- */
.site-top .header { background: #fff; border-bottom: 1px solid var(--l-line); }
.site-top .header-row { display: flex; align-items: center; gap: 28px; height: 92px; transition: height .3s ease; }
.site-top .brand { display: flex; align-items: center; flex-shrink: 0; }
.site-top .brand img { height: 56px; width: auto; display: block; transition: height .3s ease; }

.site-top .search { flex: 1; max-width: 560px; position: relative; }
.site-top .search input {
  width: 100%; height: 48px; border-radius: 999px;
  border: 1px solid var(--l-line-2); background: #fff; color: var(--l-ink);
  padding: 0 56px 0 22px; font-family: var(--font-body); font-size: 15px;
  transition: border-color .2s, box-shadow .2s, height .3s ease; outline: none;
}
.site-top .search input::placeholder { color: var(--l-ink-3); }
.site-top .search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px oklch(0.64 0.17 252 / 0.15); }
.site-top .search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  height: 38px; width: 42px; border: none; border-radius: 999px;
  background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background .2s, height .3s ease;
}
.site-top .search button:hover { background: var(--blue-bright); }
.site-top .search button svg { width: 18px; height: 18px; }

.site-top .header-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; flex-shrink: 0; }
.site-top .partner-logo { height: 30px; width: auto; object-fit: contain; display: block; }
.site-top .icon-btn {
  display: flex; align-items: center; gap: 9px; color: var(--l-ink); cursor: pointer;
  font-weight: 600; font-size: 14px; transition: color .15s; text-decoration: none;
  background: none; border: none;
}
.site-top .icon-btn:hover { color: var(--blue); }
.site-top .icon-btn svg { width: 24px; height: 24px; }
.site-top .cart { position: relative; }
.site-top .cart .count {
  position: absolute; top: -8px; right: -10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------- nav (dark) ---------- */
.site-top .navbar { background: oklch(0.125 0.02 258); border-bottom: 1px solid var(--line); position: relative; }
.site-top .nav { display: flex; align-items: stretch; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-top .nav-item { position: static; }
.site-top .nav-item.has-dropdown { position: relative; }
.site-top .nav-link {
  display: flex; align-items: center; gap: 7px; height: 54px; padding: 0 18px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--ink-2);
  letter-spacing: .01em; cursor: pointer; transition: color .15s, background .15s;
  border: none; border-bottom: 2px solid transparent; background: none; text-decoration: none;
}
.site-top .nav-link svg { width: 13px; height: 13px; opacity: .7; transition: transform .2s; }
.site-top .nav-item:hover > .nav-link { color: var(--ink); background: oklch(0.18 0.025 258); }
.site-top .nav-item:hover > .nav-link svg { transform: rotate(180deg); }
.site-top .nav-item.active > .nav-link { color: var(--ink); }

.site-top .nav-link.ia { color: var(--blue-bright); font-weight: 600; }
.site-top .nav-link.ia .badge {
  font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; background: var(--blue); color: #fff; padding: 2px 7px;
  border-radius: 999px; line-height: 1;
}
.site-top .nav-item.active > .nav-link.ia { border-bottom-color: var(--blue); }

/* ---------- mega menu ---------- */
.site-top .mega {
  position: absolute; top: 100%; left: 0; right: 0; background: oklch(0.185 0.024 258);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px oklch(0 0 0 / 0.6);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 90;
}
.site-top .nav-item.has-mega:hover .mega,
.site-top .nav-item.has-mega.open .mega,
.site-top .mega:hover { opacity: 1; visibility: visible; transform: translateY(0); }
.site-top .nav-item.has-mega.open > .nav-link svg { transform: rotate(180deg); }

.site-top .mega-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 36px; padding: 34px 0; align-items: start; }
.site-top .mega-inner.is-categories { grid-template-columns: 2.3fr 1fr 1fr; }
.site-top .mega-inner.is-systems { grid-template-columns: 1.6fr 320px; }
.site-top .mega-inner.is-ia { grid-template-columns: 1fr 1fr 1fr 320px; }
.site-top .mega-col h4 {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-bright);
  margin: 0 0 16px; font-weight: 600; font-family: var(--font-body);
}
.site-top .mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.site-top .mega-col.wide ul { display: block; columns: 2; column-gap: 36px; }
.site-top .mega-col.wide li { margin-bottom: 11px; break-inside: avoid; }
.site-top .mega-col a {
  color: var(--ink-2); font-size: 14.5px; font-weight: 500; display: flex; align-items: center; gap: 9px;
  transition: color .15s, transform .15s; text-decoration: none;
}
.site-top .mega-col a:hover { color: var(--blue-bright); transform: translateX(3px); }
.site-top .mega-col a small { color: var(--ink-3); font-weight: 400; font-size: 13px; }

.site-top .mega-feature {
  background: linear-gradient(160deg, var(--blue-ink), oklch(0.18 0.024 258));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.site-top .mega-feature .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-bright); }
.site-top .mega-feature h5 { font-family: var(--font-display); font-size: 19px; margin: 0; color: var(--ink); }
.site-top .mega-feature .ph { height: 120px; width: 100%; }
.site-top .mega-feature img { height: 120px; width: 100%; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.site-top .mega-feature p { font-size: 13px; color: var(--ink-2); margin: 0; }
.site-top .mega-feature .link { color: var(--blue-bright); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }

/* brands: compact scrollable grid */
.site-top .brands-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px 28px;
  max-height: 360px; overflow-y: auto; padding: 30px 0;
}
.site-top .brands-grid a { color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; padding: 4px 0; transition: color .15s; }
.site-top .brands-grid a:hover { color: var(--blue-bright); }

/* simple dropdown (services) */
.site-top .dropdown {
  position: absolute; top: 100%; left: 0; min-width: 240px; background: oklch(0.185 0.024 258);
  border: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 30px 60px -20px oklch(0 0 0 / 0.6);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 90; padding: 8px 0;
}
.site-top .nav-item.has-dropdown:hover .dropdown,
.site-top .nav-item.has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.site-top .dropdown a { display: block; padding: 9px 18px; color: var(--ink-2); font-size: 14.5px; text-decoration: none; transition: color .15s, background .15s; }
.site-top .dropdown a:hover { color: var(--blue-bright); background: oklch(0.21 0.026 258); }

/* striped placeholder used in mega feature cards */
.site-top .ph {
  position: relative; border-radius: var(--radius-sm); background-color: var(--bg-2);
  background-image: repeating-linear-gradient(-45deg, oklch(0.64 0.17 252 / 0.10) 0 10px, transparent 10px 20px);
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--ink-3);
}
.site-top .ph::after {
  content: attr(data-label); font-family: "Space Grotesk", monospace; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; border: 1px dashed var(--line-2);
  border-radius: 6px; background: oklch(0.165 0.022 258 / 0.6);
}

/* shrink-on-scroll */
.site-top.shrunk .utility { max-height: 0; opacity: 0; }
.site-top.shrunk .header-row { height: 66px; }
.site-top.shrunk .brand img { height: 40px; }
.site-top.shrunk .search input { height: 42px; }
.site-top.shrunk .search button { height: 34px; }

/* mobile trigger lives in the existing Alpine overlay menu */
.site-top .menu-toggle { display: none; }

@media (max-width: 1080px) {
  .site-top .mega-inner.is-categories { grid-template-columns: 1fr 1fr; }
  .site-top .mega-inner.is-systems { grid-template-columns: 1fr; }
  .site-top .mega-inner.is-ia { grid-template-columns: 1fr 1fr; }
  .site-top .brands-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .site-top .container { padding-inline: 20px; }
  .site-top .tagline { display: none; }
  .site-top .search { display: none; }
  .site-top .navbar { display: none; }
  .site-top .header-row { height: 74px; }
}
