/* ============================================================================
 *  Raphash Corporations — Global Brand Stylesheet
 * ========================================================================== */

/* ============================================================================
 * 1. DESIGN TOKENS
 * ========================================================================== */

:root {
  /* Brand palette */
  --green-900: #0f2f14;
  --green-800: #14511a;
  --green-700: #1b5e20;
  --green-600: #2e7d32;
  --green-500: #43a047;
  --green-200: #c8e6c9;
  --green-050: #eef6ef;

  --gold-700: #c58a08;
  --gold-600: #e0a410;
  --gold-500: #f9a825;
  --gold-400: #fbc02d;
  --gold-100: #fdf2cf;

  --red-600:  #c62828;
  --red-500:  #e53935;
  --amber-500:#f57c00;
  --blue-600: #1565c0;

  --ink-900:  #0f1a12;
  --ink-700:  #2a3a2d;
  --ink-500:  #4d6350;
  --ink-300:  #8fa394;
  --ink-100:  #e3ebe4;
  --paper:    #ffffff;
  --paper-2:  #f7f9f7;
  --paper-3:  #eef2ee;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(15,47,20,.06);
  --shadow-sm: 0 2px 8px rgba(15,47,20,.08);
  --shadow:    0 8px 24px rgba(15,47,20,.10);
  --shadow-lg: 0 18px 48px rgba(15,47,20,.18);
  --shadow-gold: 0 12px 32px rgba(249,168,37,.35);

  --ring: 0 0 0 4px rgba(249,168,37,.30);

  --font-sans:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  --header-h: 74px;
}

/* Mobile header height override */
@media (max-width: 860px) {
  :root { --header-h: 64px; }
}

/* ============================================================================
 * 2. RESET & BASE
 * ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--paper);
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--green-700); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.9rem, 4vw + 1rem, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2vw + 1rem, 2.15rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; }

/* ============================================================================
 * 3. LAYOUT PRIMITIVES
 * ========================================================================== */

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
  min-width: 0;
}
.container--tight { max-width: 900px; }
.site-main { flex: 1 0 auto; }

/* ============================================================================
 * 4. ACCESSIBILITY
 * ========================================================================== */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-500); color: var(--green-900);
  padding: 10px 18px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700; z-index: 9999;
}
.skip-link:focus { left: 0; outline: 2px solid var(--green-900); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ============================================================================
 * 5. TOP STRIP
 *
 *   Desktop:   [ tagline ]                [ icons ]
 *   Mobile:    [        icons (full width)        ]
 *
 *   Icons are bigger on mobile and spread evenly to fill the screen width.
 * ========================================================================== */

.top-strip {
  background: linear-gradient(90deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-600) 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(249,168,37,.35);
  width: 100%;
}

.top-strip__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 8px;
  min-height: 40px;
  min-width: 0;
}

.top-strip__left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  opacity: .92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}
.top-strip__left i { color: var(--gold-400); }

/* Icon row */
.top-strip__icons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.top-strip__icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gold-400);
  background: rgba(249,168,37,.10);
  font-size: .95rem;
  text-decoration: none;
  transition: background .18s, color .18s, transform .18s;
}
.top-strip__icon i { line-height: 1; }
.top-strip__icon:hover,
.top-strip__icon:focus-visible {
  background: var(--gold-500);
  color: var(--green-900);
  transform: translateY(-1px);
  outline: none;
}

/* --- Mobile: icons become larger and spread edge-to-edge ---------------- */
@media (max-width: 900px) {
  .top-strip__left { display: none; }

  .top-strip__inner {
    justify-content: stretch;
    padding: 6px 4px;
    min-height: 52px;
    gap: 0;
  }

  .top-strip__icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0;
    margin: 0;
  }

  .top-strip__icon {
    width:  clamp(32px, 9.5vw, 44px);
    height: clamp(32px, 9.5vw, 44px);
    font-size: clamp(1rem, 3.4vw, 1.25rem);
    flex: 0 0 auto;
  }
}

/* Very small screens: slightly tighten to keep every icon on one line */
@media (max-width: 360px) {
  .top-strip__icon {
    width: 30px;
    height: 30px;
    font-size: .95rem;
  }
  .top-strip__icons { padding-inline: 2px; }
}

/* Per-network hover tints */
.top-strip__icon--wa:hover { background: #25d366; color: #fff; }
.top-strip__icon--tg:hover { background: #229ed9; color: #fff; }
.top-strip__icon--fb:hover { background: #1877f2; color: #fff; }
.top-strip__icon--ig:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.top-strip__icon--x:hover  { background: #000; color: #fff; }
.top-strip__icon--yt:hover { background: #ff0000; color: #fff; }
.top-strip__icon--tt:hover { background: #000; color: #fff; }

/* ============================================================================
 * 6. SITE HEADER
 *
 *   Desktop:  [ brand ] [ nav ... ] [ bell ] [ cart ] [ user menu ] [ login/reg ]
 *   Mobile:   [ brand (full name) ] [ bell ] [ cart ] [ ☰ ]
 *
 *   The brand ALWAYS shows the mark, the brand name, and "Nigeria Limited"
 *   on every viewport. Sizing shrinks progressively.
 * ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--ink-100);
  box-shadow: var(--shadow-xs);
  width: 100%;
  max-width: 100vw;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  min-width: 0;
  max-width: 100%;
}

/* --- Brand ------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  min-width: 0;
  flex-shrink: 1;
}
.brand__mark {
  display: inline-block;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(27,94,32,.25));
}
.brand__mark svg { width: 42px; height: 42px; transition: width .18s, height .18s; }

.brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.12rem;
  background: linear-gradient(95deg, var(--green-700) 0%, var(--green-600) 55%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.brand__sub {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Primary nav (desktop) --------------------------------------------- */
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; align-items: center; }
.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink-700);
  transition: background .18s, color .18s, transform .18s;
}
.main-nav__link i { font-size: .9rem; color: var(--green-600); transition: color .18s; }
.main-nav__link:hover { background: var(--green-050); color: var(--green-700); transform: translateY(-1px); }
.main-nav__link.is-active {
  background: linear-gradient(95deg, var(--green-700), var(--green-600));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.main-nav__link.is-active i { color: var(--gold-400); }

/* --- Right cluster ----------------------------------------------------- */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  min-width: 0;
}

/* --- Icon buttons ------------------------------------------------------ */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-700);
  transition: background .18s, border-color .18s, color .18s, transform .18s;
  flex: 0 0 auto;
}
.icon-btn:hover { background: var(--green-050); color: var(--green-700); border-color: var(--green-200); }
.icon-btn i { font-size: 1.1rem; }

.icon-btn--guest { opacity: .85; }
.icon-btn--guest:hover { opacity: 1; }

/* Bold hamburger */
.menu-toggle {
  background: linear-gradient(135deg, var(--green-050), #ffffff);
  border: 1px solid var(--green-200);
  margin-left: 15px;
}
.menu-toggle i {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--green-800);
}
.menu-toggle:hover {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  border-color: var(--green-700);
  transform: translateY(-1px);
}
.menu-toggle:hover i { color: #fff; }

/* ============================================================================
 * 7. RESPONSIVE HEADER SIZING
 * ========================================================================== */

.hide-mobile { display: initial; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .hide-mobile { display: none !important; }
  .main-nav    { display: none; }
  .menu-toggle { display: inline-flex; }

  .site-header__inner { gap: 10px; padding-inline: 12px; }
  .header-actions { gap: 2px; }
  .menu-toggle { margin-left: 15px; } 

  .icon-btn { width: 50px; height: 50px; border-radius: 10px; }
  .icon-btn i { font-size: 1.05rem; }
  .menu-toggle i { font-size: 1.35rem; }

  .brand { gap: 8px; }
  .brand__mark svg { width: 38px; height: 38px; }
  .brand__name { font-size: 2rem; }
  .brand__sub { font-size: .8rem; letter-spacing: .14em; }
}

@media (max-width: 640px) {
  .site-header__inner { padding-inline: 10px; gap: 8px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn i { font-size: 1rem; }
  .menu-toggle i { font-size: 1.3rem; }
  .brand__mark svg { width: 40px; height: 40px; }
  .brand__name { font-size: 1.1rem; }
  .brand__sub { font-size: .7rem; }
}

@media (max-width: 460px) {
  .site-header__inner { gap: 6px; padding-inline: 8px; }
  .header-actions { gap: 0; }
  .menu-toggle { margin-left: 10px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 9px; }
  .icon-btn i { font-size: .95rem; }
  .menu-toggle i { font-size: 1.25rem; }
  .brand { gap: 6px; }
  .brand__mark svg { width: 30px; height: 30px; }
  .brand__name { font-size: .82rem; }
  .brand__sub { font-size: .55rem; letter-spacing: .1em; margin-top: 2px; }
}

@media (max-width: 360px) {
  .site-header__inner { gap: 4px; padding-inline: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .menu-toggle { margin-left: 6px; }
  .icon-btn i { font-size: .9rem; }
  .menu-toggle i { font-size: 1.2rem; }
  .brand__mark svg { width: 28px; height: 28px; }
  .brand__name { font-size: .75rem; }
  .brand__sub { font-size: .5rem; letter-spacing: .08em; }
}

/* ============================================================================
 * 8. BUTTONS
 * ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 14px; font-size: .85rem; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--green { background: linear-gradient(95deg, var(--green-700), var(--green-600)); color: #fff; box-shadow: var(--shadow-sm); }
.btn--green:hover { box-shadow: var(--shadow); color: #fff; transform: translateY(-2px); }

.btn--gold { background: linear-gradient(95deg, var(--gold-500), var(--gold-400)); color: var(--green-900); box-shadow: var(--shadow-gold); }
.btn--gold:hover { color: var(--green-900); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(249,168,37,.45); }

.btn--ghost { background: #fff; color: var(--ink-900); border-color: var(--ink-100); }
.btn--ghost:hover { color: var(--green-700); border-color: var(--green-200); background: var(--green-050); }

.btn--outline { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn--outline:hover { background: var(--green-700); color: #fff; }

.btn--danger { background: linear-gradient(95deg, var(--red-500), var(--red-600)); color: #fff; }
.btn--danger:hover { color: #fff; }

.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ============================================================================
 * 9. BADGES
 * ========================================================================== */

.badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff, 0 4px 10px rgba(198,40,40,.4);
  transform: translate(4px, -4px);
  animation: badge-pop .28s ease;
}
.badge--red { background: linear-gradient(180deg, var(--red-500), var(--red-600)); }

@keyframes badge-pop {
  0%   { transform: translate(4px,-4px) scale(0); }
  70%  { transform: translate(4px,-4px) scale(1.15); }
  100% { transform: translate(4px,-4px) scale(1); }
}

/* ============================================================================
 * 10. FLASH MESSAGES & TOASTS
 * ========================================================================== */

.flash-region {
  position: fixed; inset: auto 16px 16px auto;
  z-index: 9000;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 280px; max-width: 380px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--ink-900);
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--green-600);
  pointer-events: auto;
  animation: flash-in .28s ease;
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.flash--success { border-left-color: var(--green-600); }
.flash--error   { border-left-color: var(--red-500); }
.flash--warning { border-left-color: var(--amber-500); }
.flash--info    { border-left-color: var(--blue-600); }
.flash__icon i { font-size: 1.05rem; }
.flash--success .flash__icon i { color: var(--green-600); }
.flash--error   .flash__icon i { color: var(--red-500); }
.flash--warning .flash__icon i { color: var(--amber-500); }
.flash--info    .flash__icon i { color: var(--blue-600); }
.flash__text { flex: 1; font-size: .92rem; line-height: 1.5; }
.flash__close { background: transparent; border: 0; color: var(--ink-500); }
.flash__close:hover { color: var(--ink-900); }

.toast-host {
  position: fixed; inset: auto auto 16px 16px;
  z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  min-width: 240px; max-width: 340px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: flash-in .24s ease;
}
.toast i { font-size: 1.05rem; }
.toast--success i { color: var(--green-600); }
.toast--error   i { color: var(--red-500); }
.toast--warning i { color: var(--amber-500); }
.toast--info    i { color: var(--blue-600); }

/* ============================================================================
 * 11. NOTIFICATION DROPDOWN
 * ========================================================================== */

.notif-panel {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: clamp(16px, 4vw, 40px);
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
  animation: dropdown-in .2s ease;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-panel__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--paper-2);
}
.notif-panel__head strong { font-family: var(--font-display); }
.notif-panel__mark { background: transparent; border: 0; color: var(--green-700); font-weight: 700; font-size: .82rem; }
.notif-panel__mark:hover { color: var(--gold-600); }
.notif-panel__body { max-height: 380px; overflow-y: auto; }
.notif-panel__foot { padding: 10px 14px; background: var(--paper-2); border-top: 1px solid var(--ink-100); text-align: center; font-size: .85rem; }

.notif-item {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
}
.notif-item:hover { background: var(--green-050); }
.notif-item__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-050); color: var(--green-700);
  flex-shrink: 0;
}
.notif-item__title { font-weight: 700; font-size: .9rem; }
.notif-item__msg   { font-size: .82rem; color: var(--ink-500); }
.notif-item__time  { font-size: .72rem; color: var(--ink-300); margin-left: auto; white-space: nowrap; }
.notif-item.is-unread { background: #fffbea; }
.notif-item.is-unread .notif-item__icon { background: var(--gold-100); color: var(--gold-700); }
.notif-empty { padding: 30px 16px; text-align: center; color: var(--ink-500); }
.notif-empty i { font-size: 1.8rem; margin-bottom: 8px; display: block; color: var(--ink-300); }

/* ============================================================================
 * 12. MOBILE DRAWER
 * ========================================================================== */

.mobile-drawer { position: fixed; inset: 0; z-index: 70; }
.mobile-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,47,20,.45);
  backdrop-filter: blur(2px);
}
.mobile-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(320px, 86vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(0,0,0,.25);
  padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  animation: drawer-in .24s ease;
}
@keyframes drawer-in {
  from { transform: translateX(30px); opacity: .4; }
  to   { transform: none; opacity: 1; }
}
.mobile-drawer__head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 8px;
}
.mobile-drawer__link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--ink-900);
  font-weight: 600;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
}
.mobile-drawer__link i { color: var(--green-600); width: 20px; text-align: center; }
.mobile-drawer__link:hover { background: var(--green-050); color: var(--green-700); }
.mobile-drawer__link--accent {
  background: linear-gradient(95deg, var(--green-700), var(--green-600));
  color: #fff;
}
.mobile-drawer__link--accent i { color: var(--gold-400); }
.mobile-drawer__link--danger { color: var(--red-600); }
.mobile-drawer__link--danger i { color: var(--red-600); }
.mobile-drawer__auth { display: grid; gap: 8px; margin-top: 8px; }
.mobile-drawer__logout { margin: 0; }

/* ============================================================================
 * 13. CHAT WIDGET
 *
 *  [hidden] overrides are essential: without them, display:flex wins over
 *  the browser default, so `panel.hidden = true` has no visual effect.
 * ========================================================================== */

/* --- Launcher --------------------------------------------------------- */
.chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  box-shadow: 0 14px 34px rgba(15,47,20,.35), inset 0 -3px 6px rgba(0,0,0,.15);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .2s;
}
.chat-launcher:hover { transform: translateY(-3px) scale(1.04); }
.chat-launcher__icon { font-size: 1.35rem; position: relative; z-index: 2; }
.chat-launcher__pulse {
  position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,168,37,.5), transparent 60%);
  animation: chat-pulse 2.2s ease-out infinite;
}
@keyframes chat-pulse {
  0%   { transform: scale(.85); opacity: .75; }
  100% { transform: scale(1.25); opacity: 0; }
}
.chat-launcher.is-open { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); color: var(--green-900); }
.chat-launcher__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  color: #fff; font-weight: 800; font-size: .72rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px #fff;
}

/* --- Panel ------------------------------------------------------------ */
.chat-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 51;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: chat-in .22s ease;
}
@keyframes chat-in {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Explicit [hidden] overrides — see Fix A in the accompanying note */
.chat-panel[hidden]    { display: none !important; }
.chat-launcher[hidden] { display: none !important; }

.chat-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  flex-shrink: 0;
}
.chat-panel__id { display: flex; align-items: center; gap: 10px; }
.chat-panel__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-500); color: var(--green-900); font-size: 1rem;
}
.chat-panel__title { font-weight: 700; font-size: .95rem; }
.chat-panel__status { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; opacity: .9; }
.chat-panel__status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 0 3px rgba(76,175,80,.3);
}

.chat-iconbtn {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 0;
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-iconbtn:hover { background: rgba(255,255,255,.28); }

.chat-panel__body { flex: 1; position: relative; overflow: hidden; }
.chat-view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.chat-view[hidden] { display: none !important; }

/* Conversation list ---------------------------------------------------- */
.chat-list-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--paper-2);
  font-weight: 700; font-size: .85rem; color: var(--ink-700);
  flex-shrink: 0;
}
.chat-newbtn { background: transparent; border: 0; color: var(--green-700); font-weight: 700; font-size: .82rem; }
.chat-newbtn:hover { color: var(--gold-600); }

.chat-list { flex: 1; overflow-y: auto; }
.chat-list__item {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 0; border-bottom: 1px solid var(--ink-100);
  background: #fff; text-align: left;
}
.chat-list__item:hover { background: var(--green-050); }
.chat-list__item.is-active { background: var(--green-050); }
.chat-list__avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--green-050); color: var(--green-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-list__body { flex: 1; min-width: 0; }
.chat-list__title { display: block; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list__snippet { display: block; font-size: .78rem; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--ink-300); font-size: .7rem; }
.chat-list__unread {
  background: var(--red-500); color: #fff;
  font-weight: 800; font-size: .65rem;
  padding: 2px 6px; border-radius: 999px;
}

/* Thread ---------------------------------------------------------------- */
.chat-thread-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--paper-2);
  flex-shrink: 0;
}
.chat-thread-head .chat-iconbtn { background: var(--ink-100); color: var(--ink-700); }
.chat-thread-head .chat-iconbtn:hover { background: var(--ink-300); color: #fff; }
.chat-thread-title { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 14px;
  background: var(--paper-2);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg--me   { align-self: flex-end;   align-items: flex-end; }
.chat-msg--them { align-self: flex-start; align-items: flex-start; }

.chat-msg__name {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink-500);
  margin-bottom: 3px;
  padding: 0 4px;
}
.chat-msg--me .chat-msg__name { text-align: right; }

.chat-msg__bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: var(--shadow-xs);
}
.chat-msg--me .chat-msg__bubble {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg--them .chat-msg__bubble {
  background: #fff;
  color: var(--ink-900);
  border-bottom-left-radius: 4px;
}
.chat-msg__time { font-size: .68rem; color: var(--ink-300); margin-top: 4px; }

.chat-compose {
  display: flex; gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--ink-100);
  background: #fff;
  flex-shrink: 0;
}
.chat-compose input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--ink-100);
  background: var(--paper-2);
  font-size: .9rem;
}
.chat-compose input:focus { outline: none; border-color: var(--green-600); background: #fff; }
.chat-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
}
.chat-send:hover { background: linear-gradient(135deg, var(--green-800), var(--green-700)); }

/* Guest prompt ---------------------------------------------------------- */
.chat-guest {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 24px;
  height: 100%;
  gap: 12px;
}
.chat-guest__icon {
  font-size: 2rem;
  color: var(--green-700);
  width: 64px; height: 64px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-050);
}
.chat-guest__title { font-family: var(--font-display); font-size: 1.1rem; margin: 0; }
.chat-guest__lead  { font-size: .9rem; color: var(--ink-500); max-width: 32ch; margin: 0; }
.chat-guest__actions { width: 100%; display: grid; gap: 8px; margin-top: 6px; }
.chat-guest__hint  { font-size: .78rem; color: var(--ink-500); margin: 6px 0 0; }

.chat-empty, .chat-loading, .chat-error {
  text-align: center;
  color: var(--ink-500);
  padding: 30px 16px;
  font-size: .9rem;
  display: flex; flex-direction: column;
  gap: 8px; align-items: center;
}
.chat-empty i { font-size: 1.8rem; color: var(--ink-300); }

@media (max-width: 520px) {
  .chat-panel { right: 12px; left: 12px; bottom: 84px; width: auto; height: min(74vh, 560px); }
  .chat-launcher { right: 14px; bottom: 14px; width: 54px; height: 54px; }
}

/* ============================================================================
 * 14. CARDS & SECTIONS
 * ========================================================================== */

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  padding: clamp(16px, 2vw, 24px);
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s;
}
.card:hover { box-shadow: var(--shadow); }
.card--accent { border-color: var(--green-200); }
.card--gold   { border-color: var(--gold-500); }

.section { padding: clamp(40px, 6vw, 80px) 0; }
.section--tinted { background: var(--green-050); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-700);
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section__title { margin-bottom: 10px; }
.section__lead { color: var(--ink-500); }

/* ============================================================================
 * 15. FORMS
 * ========================================================================== */

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink-700); }
.form-hint { display: block; font-size: .78rem; color: var(--ink-500); margin-top: 5px; }
.form-control {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: #fff;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink-900);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control:focus { outline: none; border-color: var(--green-600); box-shadow: var(--ring); }
.form-control:disabled { background: var(--paper-2); color: var(--ink-300); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%234d6350' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}

.form-error { color: var(--red-600); font-size: .82rem; margin-top: 4px; display: block; }
.form-alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fdecea;
  border-left: 4px solid var(--red-500);
  color: #5b1212;
  margin-bottom: 16px;
  font-size: .9rem;
}
.form-alert ul { margin: 6px 0 0; padding-left: 18px; }

.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
  .form-row--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================================
 * 16. TABLES (responsive)
 * ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--ink-100);
  background: #fff;
}
table.data { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ink-100); }
table.data thead { background: var(--paper-2); }
table.data th {
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-500);
}
table.data tbody tr:hover { background: var(--green-050); }

/* ============================================================================
 * 17. UTILITIES
 * ========================================================================== */

.text-muted { color: var(--ink-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }  .mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 24px; }  .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }

/* ============================================================================
 * 18. FOOTER
 * ========================================================================== */

.site-footer {
  background: linear-gradient(180deg, var(--green-900), var(--green-800));
  color: #d5e3d7;
  margin-top: auto;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 54px 0 34px;
}
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer__col h4 { color: #fff; font-family: var(--font-display); }
.site-footer__h { font-size: 1rem; font-weight: 800; margin-bottom: 14px; color: #fff !important; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-footer__brand-name { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.site-footer__lead { font-size: .9rem; color: #b9cbbd; }
.site-footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.site-footer__list a, .site-footer__list li { color: #b9cbbd; }
.site-footer__list a:hover { color: var(--gold-400); }
.site-footer__list i { color: var(--gold-500); margin-right: 8px; }
.site-footer__contact { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: #d5e3d7; font-size: .9rem; }
.site-footer__contact i { color: var(--gold-500); width: 18px; text-align: center; }
.site-footer__contact:hover { color: var(--gold-400); }
.site-footer__contact--static { cursor: default; }
.site-footer__muted { font-size: .85rem; color: #9fb3a4; }
.site-footer__social { display: inline-flex; gap: 10px; margin-top: 12px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: #fff;
}
.social-btn:hover { background: var(--gold-500); color: var(--green-900); }
.social-btn--wa:hover { background: #25d366; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; color: #9fb3a4; }
.site-footer__bar-inner { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.site-footer__bar-links { display: inline-flex; gap: 16px; }
.site-footer__bar-links a { color: #9fb3a4; }
.site-footer__bar-links a:hover { color: var(--gold-400); }

/* ============================================================================
 * 19. REDUCED MOTION
 * ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}