/* ==========================================================================
   DEALR NETWORK — Nav, footer, shared layout shells
   ========================================================================== */

/* Nav */
    position: fixed; z-index: 102; top: var(--nav-height); right: 0; bottom: auto; width: min(84vw, 340px);
  position: sticky; top: 0; z-index: 100; height: var(--nav-height);
  display: flex; align-items: center;
  background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.site-nav.is-scrolled{ background: var(--nav-scrolled-bg); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.site-nav .container{ display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo{ display: flex; align-items: center; gap: 9px; }
.nav-logo .brand-logo{ width: 24px; height: 24px; object-fit: contain; transition: transform var(--dur-base) var(--ease-out); }
.nav-logo:hover .brand-logo{ transform: rotate(-8deg) scale(1.05); }
.nav-logo span{ font-family: var(--font-display); font-weight: 700; font-size: 17px; }

.nav-search{
  flex: 1; max-width: 420px; margin: 0 var(--space-6);
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-quiet); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 8px 16px; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-search:focus-within{ border-color: var(--green-line); background: var(--green-dim); }
.nav-search input{ background: none; border: none; color: var(--white); font-size: 13.5px; flex: 1; }
.nav-search input:focus{ outline: none; }
.nav-search svg{ width: 15px; height: 15px; color: var(--text-faint); flex-shrink: 0; }

.nav-links{ display: flex; align-items: center; gap: var(--space-5); }
.nav-links a{ position: relative; font-size: 13.5px; color: var(--text-dim); transition: color var(--dur-fast) var(--ease-out); }
.nav-links a::after{
  content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--green);
  transition: right var(--dur-base) var(--ease-out);
}
.nav-links a:hover{ color: var(--white); }
.nav-links a:hover::after{ right: 0; }
.nav-user{ display: flex; align-items: center; gap: 10px; }
.theme-toggle{
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  color: var(--text-dim); background: transparent; font: inherit; font-size: 12.5px; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover{ color: var(--white); background: var(--surface-hover); border-color: var(--line-strong); }
.theme-toggle svg{ width: 16px; height: 16px; flex: 0 0 auto; }
.nav-avatar{
  width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--black);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; font-size: 12.5px; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.nav-avatar:hover{ transform: scale(1.08); box-shadow: var(--shadow-glow); }
.nav-menu-toggle{ display: none; }
.nav-backdrop{ display: none; }
@media (max-width: 860px){
  .nav-search{ display: none; }
  .site-nav .container{ position: relative; z-index: 103; }
  .nav-menu-toggle{
    display: flex; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel);
    position: relative; z-index: 103;
  }
  .nav-menu-toggle span{ width: 17px; height: 2px; border-radius: 2px; background: var(--white); }
  .nav-links{
    position: fixed; z-index: 102; top: var(--nav-height); right: 0; bottom: auto; width: min(84vw, 340px);
    height: calc(100vh - var(--nav-height)); height: calc(100dvh - var(--nav-height));
    display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: var(--space-4);
    background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
    overflow-y: auto; transform: translateX(100%); visibility: hidden;
    transition: transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
  }
  .nav-links.is-open{ transform: translateX(0); visibility: visible; }
  .nav-links > a{ display: block; padding: 13px 12px; border-radius: var(--radius-sm); color: var(--text); }
  .nav-links > a:hover{ background: var(--surface-quiet); }
  .nav-links > a::after{ display: none; }
  .nav-links > .theme-toggle{ width: 100%; justify-content: flex-start; padding: 13px 12px; border-radius: var(--radius-sm); }
  .nav-user{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); }
  .nav-user > a:not(.nav-avatar){ flex: 1 1 auto; }
  .nav-backdrop:not([hidden]){
    display: block; position: absolute; z-index: 101; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--nav-height)); height: calc(100dvh - var(--nav-height));
    background: rgba(0,0,0,0.68); backdrop-filter: blur(2px);
  }
}

/* Footer */
.site-footer{ border-top: 1px solid var(--line); padding: var(--space-6) 0; margin-top: var(--space-8); }
.footer-row{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.footer-logo{ display: flex; align-items: center; gap: 8px; }
.footer-logo .brand-logo{ width: 18px; height: 18px; object-fit: contain; }
.footer-logo span{ font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.footer-links{ display: flex; gap: var(--space-5); font-size: 12.5px; color: var(--text-faint); }
.footer-links a:hover{ color: var(--white); }
.footer-tag{ font-family: var(--font-body); font-size: 11px; color: var(--text-faint); }

@media (max-width: 640px){
  .site-footer{ padding: var(--space-5) 0; }
  .footer-row{ align-items: flex-start; flex-direction: column; }
  .footer-links{ flex-wrap: wrap; gap: var(--space-3); }
  .footer-tag{ line-height: 1.5; }
}

/* Page shell used by every page */
.page-main{ min-height: calc(100vh - var(--nav-height)); }
.page-head{ padding: var(--space-7) 0 var(--space-5); }
.page-head h1{ font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.01em; text-transform: uppercase; }
.page-head p{ margin-top: 10px; color: var(--text-dim); font-size: 14.5px; }
