/* ============================================================
   LAYOUT — header, nav, footer, mobile drawer
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 15, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-700);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 34px; width: auto; }
.brand-word { display: none; }

.main-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--paper-200);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--paper-050); background: var(--ink-800); }
.main-nav a.active { color: var(--teal-400); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--paper-100);
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--ink-800); border-color: var(--ink-600); }
.icon-btn svg { width: 20px; height: 20px; }

.count-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--teal-500);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.count-badge:empty { display: none; }
.count-badge[data-zero="true"] { display: none; }

.menu-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-600);
  background: transparent;
  color: var(--paper-100);
}
.menu-toggle svg { width: 20px; height: 20px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
}
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(84vw, 340px);
  background: var(--ink-900);
  border-left: 1px solid var(--ink-700);
  padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.mobile-drawer-panel a {
  padding: 14px 10px;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink-800);
}
.mobile-drawer-close {
  align-self: flex-end;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper-100);
  margin-bottom: 8px;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.mobile-drawer-close:hover { background: var(--ink-800); }

@media (min-width: 900px) {
  .brand-word { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--ink-700);
  background: var(--ink-900);
  padding: 56px 0 28px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img { height: 30px; margin-bottom: 14px; }
.footer-brand p { max-width: 320px; font-size: 14px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-300);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14.5px;
  color: var(--paper-200);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--teal-400); }
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-sm);
}
.footer-social a:hover { border-color: var(--teal-500); color: var(--teal-400); }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--ink-800);
  font-size: 13px;
  color: var(--paper-300);
  font-family: var(--font-mono);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---- WhatsApp floating action button ---- */
.wa-fab {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-500);
  color: var(--ink-950);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(31,199,189,0.55);
  transition: transform .15s ease;
}
.wa-fab:hover { transform: scale(1.06); background: var(--teal-400); }
.wa-fab svg { width: 26px; height: 26px; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink-800);
  border: 1px solid var(--teal-500);
  color: var(--paper-050);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
