@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS TOKENS ── */
:root {
  --cc-yellow:  #FFD93D;
  --cc-ink:     #111827;
  --cc-paper:   #F5F7FA;
  --cc-leaf:    #22C55E;
  --cc-slate:   #6B7280;
  --cc-white:   #FFFFFF;
  --cc-border:  #E5E7EB;
  --cc-radius:  8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cc-white);
  color: var(--cc-ink);
}

/* ─────────────────────────────────────────
   SITE HEADER
───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--cc-white);
  border-bottom: 1px solid var(--cc-border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
/* THIS IS FROM RESET-PASSWORD.HTML */
.form-group1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* ── Logo ── */
.header-logo {
  font-family: 'Nunito', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--cc-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.85;
}

.logo-emie-container {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-emie {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(-15deg);
  filter: drop-shadow(0 2px 4px rgba(255, 217, 61, 0.2));
  transition: transform 0.3s ease;
}

.header-logo:hover .logo-emie {
  transform: rotate(-15deg) scale(1.08);
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-cart {
  background: var(--cc-yellow);
  color: var(--cc-ink);
  padding: 1px 7px 2px;
  border-radius: 5px;
}

/* ── Nav ── */
.header-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
}

.header-nav a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cc-slate);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: var(--cc-radius);
  transition: color 0.15s, background 0.15s;
  position: relative;
  display: block;
}

.header-nav a:hover {
  color: var(--cc-ink);
  background: var(--cc-paper);
}

.header-nav a.active {
  color: var(--cc-ink);
  font-weight: 600;
}

.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 1rem;
  right: 1rem;
  height: 2.5px;
  background: var(--cc-yellow);
  border-radius: 2px;
}

/* ── Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cc-ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  flex-shrink: 0;
}

.header-icon-btn:hover {
  background: var(--cc-paper);
  border-color: #D1D5DB;
}

/* Cart badge */
.cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--cc-yellow);
  color: var(--cc-ink);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1;
}

/* ── Search bar ── */
.header-search {
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

.header-search.open {
  width: 280px;
  opacity: 1;
}

.search-inner {
  display: flex;
  align-items: center;
  background: var(--cc-paper);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 0 0.6rem;
  height: 38px;
  gap: 0.5rem;
  white-space: nowrap;
}

.search-inner:focus-within {
  border-color: var(--cc-yellow);
  box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.18);
}

#search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--cc-ink);
  width: 100%;
}

#search-input::placeholder {
  color: var(--cc-slate);
}

#search-submit {
  background: var(--cc-yellow);
  color: var(--cc-ink);
  border: none;
  padding: 0.28rem 0.75rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.2s, transform 0.2s;
}

#search-submit:hover {
  background: #f5cc28;
}

.header-search.open #search-submit {
  opacity: 1;
  transform: scale(1);
}

/* ─────────────────────────────────────────
   FLOATING EMIE COMPANION
───────────────────────────────────────── */

.emie-companion {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.emie-avatar {
  width: 88px;
  height: 88px;
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.emie-avatar:hover {
  transform: scale(1.06) translateY(-2px);
}

.emie-avatar.disabled img {
  opacity: 0.4;
  filter: grayscale(1);
}

.emie-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.emie-bubble {
  background: var(--cc-white);
  border: 2px solid var(--cc-ink);
  border-radius: 14px;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--cc-ink);
  max-width: 200px;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  position: relative;
}

/* Bubble tail */
.emie-bubble::after {
  content: '';
  position: absolute;
  bottom: -11px;
  right: 26px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 11px solid var(--cc-ink);
}

.emie-bubble::before {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 29px;
  z-index: 1;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--cc-white);
}

.emie-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─────────────────────────────────────────
   RESPONSIVE — TABLET (≤1024px)
───────────────────────────────────────── */

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 1.5rem;
    gap: 1rem;
  }

  .header-nav {
    gap: 0;
  }

  .header-nav a {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
  }

  .header-search.open {
    width: 220px;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — MOBILE (≤768px)
───────────────────────────────────────── */

@media (max-width: 768px) {
  .header-inner {
    position: relative;
    padding: 0 1rem;
    height: 60px;
    gap: 0.6rem;
  }

  .logo-emie-container {
    width: 38px;
    height: 38px;
  }

  .header-logo {
    font-size: 1.15rem;
    gap: 0.3rem;
  }

  .header-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
  }

  .header-icon-btn {
    width: 34px;
    height: 34px;
  }

  /* Search becomes a full-width dropdown instead of squeezing the row */
  .header-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    height: 0;
    opacity: 0;
    overflow: hidden;
    background: var(--cc-white);
    border-bottom: 1px solid var(--cc-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    transition: height 0.3s ease, opacity 0.25s ease;
  }

  .header-search.open {
    width: auto;
    height: 60px;
    opacity: 1;
  }

  .header-search .search-inner {
    margin: 0 1rem;
    height: 44px;
  }

  /* Emie companion shrinks and tucks closer to the corner */
  .emie-companion {
    bottom: 1rem;
    right: 1rem;
  }

  .emie-avatar {
    width: 60px;
    height: 60px;
  }

  .emie-bubble {
    max-width: 150px;
    font-size: 0.72rem;
    padding: 0.4rem 0.7rem;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — SMALL MOBILE (≤480px)
───────────────────────────────────────── */

@media (max-width: 480px) {
  .header-inner {
    padding: 0 0.75rem;
    gap: 0.4rem;
  }

  .logo-emie-container {
    width: 32px;
    height: 32px;
  }

  .header-logo {
    font-size: 1rem;
  }

  .header-nav a {
    padding: 0.35rem 0.4rem;
    font-size: 0.72rem;
  }

  .header-actions {
    gap: 0.25rem;
  }

  .header-icon-btn {
    width: 32px;
    height: 32px;
  }

  .cart-count {
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
  }

  .emie-avatar {
    width: 50px;
    height: 50px;
  }

  .emie-companion {
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .emie-bubble {
    max-width: 120px;
    font-size: 0.68rem;
  }
}
