/* ======================
   THEME VARIABLES
===================== */
:root {
  --bg-color: #f5f7fa;
  --text-color: #222;
  --header-bg: #0b2a5b;
  --hero-bg: linear-gradient(to right, #0b2a5b, #163f87);
  --footer-bg: #081d3a;
  --link-color: #fff;
}

body.dark {
  --bg-color: #0f172a;
  --text-color: #e5e7eb;
  --header-bg: #020617;
  --hero-bg: linear-gradient(to right, #020617, #020617);
  --footer-bg: #020617;
}

/* ======================
   RESET & BASE
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
}

/* ======================
   LAYOUT
===================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

main {
  flex: 1; /* push footer to bottom */
}

/* ======================
   HEADER
===================== */
.telecom-header {
  background: var(--header-bg);
  color: var(--link-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.6s ease, box-shadow 0.3s ease;
}

.telecom-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.telecom-header.visible {
  transform: translateY(0);
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 0;
}

/* Navigation */
.nav {
    flex: 0 0 auto;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1; /* takes remaining width */
}

.nav-center {
    display: flex;
    gap: 25px;
    margin-left: 40px; /* adjust to visually balance */
}

.nav-center a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-center a:hover {
    opacity: 0.75;
}

/* .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 15px;
} */

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-center a {
    position: relative;
}

.nav-center a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #f68b1e;
    transition: width 0.3s ease;
}

.nav-center a:hover::after {
    width: 100%;
}

/* Logo */
.logo {
    flex: 0 0 auto;
    margin-right: 10px; /* tighter */
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--link-color);
  text-decoration: none;
}

.logo img {
  height: 60px;
  /* width: 110; */
  width: auto;
  display: block;
}

.logo-text {
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--link-color);
    margin-left: auto;   /* 🔥 PUSHES IT FAR RIGHT */
}

/* ======================
   FOOTER
===================== */
.telecom-footer {
  background: var(--footer-bg);
  color: #ccc;
  padding: 20px 0;
  transform: translateY(100%);
  transition: transform 0.6s ease;
}

.telecom-footer.visible {
  transform: translateY(0);
}

.footer-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
}

.footer-flex .small {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.7;
}

/* ======================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .logo img {
    height: 40px;
  }

  .logo-text {
    font-size: 16px;
  }
}

/* ======================
   ACCESSIBILITY
===================== */
@media (prefers-reduced-motion: reduce) {
  .telecom-header,
  .telecom-footer {
    transition: none;
    transform: none;
  }
}

header {
  background: var(--brand-dark);
}

h2 {
  color: var(--brand-primary);
}

a {
  color: var(--brand-primary);
}

/* ===== JUMIA STYLE SEARCH BAR ===== */
/* .search-form { */
    /* flex: 0 1 420px;   👈 CHANGE THIS NUMBER anytime */
    /* display: flex;
    align-items: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    margin-right: 25px;
} */

.search-form {
    flex: 0 0 400px; /* adjustable */
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #f5f5f5;
}

.search-form input::placeholder {
    color: #999;
}

.search-form button {
    background-color: #f68b1e;   /* Jumia orange */
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background-color: #e67e00;
}

.search-form {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: #999;
}

.search-form input {
    padding-left: 35px;
}

/* =========================
   ACCOUNT DROPDOWN (PRO)
========================= */

.account-dropdown {
  position: relative;
}

.account-btn {
  background: none;
  border: none;
  color: white;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-btn:hover {
  opacity: 0.85;
}

.arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* Dropdown animation */
.dropdown-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: white;
  width: 220px;
  border-radius: 8px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
}

.dropdown-menu.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu a {
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.dropdown-menu a:hover {
  background: #f6f6f6;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.signin-btn {
  background: #f68b1e;
  color: white !important;
  font-weight: bold;
  justify-content: center;
}

.signin-btn:hover {
  background: #e07a12;
}

/* Rotate arrow when open */
.account-dropdown.open .arrow {
  transform: rotate(180deg);
}

/* =========================
   MOBILE VERSION
========================= */

@media (max-width: 768px) {

  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    transform: translateY(0);
  }

  .dropdown-menu.active {
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
  }

}

.cart-icon {
    position: relative;
    font-size: 20px;
}

.cart-icon a {
    color: white;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.cart-icon a:hover {
    opacity: 0.8;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff3b3b;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}

