/* ============================= */
/* RESET & GLOBAL */
/* ============================= */
/* ===== STICKY FOOTER SYSTEM ===== */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Wrapper utama konten */
.main-wrapper {
  flex: 1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary: #4facfe;
  --secondary: #c471ed;
  --bg: #1e2248;
  --card: #2a2f63;
  --text: #ffffff;
}

/* ============================= */
/* NAVBAR */
/* ============================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: var(--card);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-left ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-left ul li {
  cursor: pointer;
}

.nav-center input {
  width: 400px;
  padding: 10px 15px;
  border-radius: 25px;
  border: none;
  outline: none;
}

.nav-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ============================= */
/* CART */
/* ============================= */

.cart-wrapper {
  display: flex;
  align-items: center;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
}

.cart-link svg {
  width: 26px;
  height: 26px;
}

.cart-sup {
  position: absolute;
  top: 3px;
  right: -1px;
  font-size: 11px;
  font-weight: 600;
  color: #ff3b3b;
}
.cart-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
/* ============================= */
/* PROFILE DROPDOWN */
/* ============================= */

.profile-dropdown {
  position: relative;
}

.profile-trigger {
  cursor: pointer;
}

.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 50px;
  width: 220px;
  background: white;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  display: none;
  z-index: 999;
}

.profile-menu a {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.profile-menu a:hover {
  background: #f2f2f2;
}

.profile-menu hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 8px 0;
}

/* ============================= */
/* MOBILE SIDEBAR */
/* ============================= */

.hamburger {
  font-size: 24px;
  cursor: pointer;
  display: none;
  margin-right: 15px;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background: var(--card);
  z-index: 2000;
  padding: 20px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.side-content {
  flex: 1;
  overflow-y: auto;
}

.side-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.side-card {
  background: #3a3f80;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.side-user {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kelas-mobile,
.logout-mobile {
  display: block;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
}

.kelas-mobile {
  background: #3a3f80;
  color: white;
}

.logout-mobile {
  background: #f5f5f5;
  color: #e74c3c;
}

/* ============================= */
/* OVERLAY */
/* ============================= */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 1500;
}

/* ============================= */
/* FOOTER */
/* ============================= */

.footer {
  margin-top: auto;
  padding: 30px;
  text-align: center;
  background: var(--card);
  background: #2a2f63;
}

.footer-public-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.footer-public-links a {
  color: #ffffff;
  font-weight: 700;
}

.footer-public-links a:hover {
  text-decoration: underline;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 1280px) {
  .desktop-menu,
  .desktop-only {
    display: none !important;
  }

  .hamburger {
    display: block;
  }

  .nav-center {
    flex: 1;
    margin-left: 10px;
  }

  .nav-center input {
    width: 100%;
  }
}

/* =========================
   NAVBAR HOVER EFFECT
========================= */

/* MENU TEXT */
.menu li {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu li:hover {
  color: #4facfe;
}

/* underline animasi */
.menu li::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #4facfe;
  transition: 0.3s;
}

.menu li:hover::after {
  width: 100%;
}

/* LOGO */
.logo-trigger {
  transition: all 0.3s ease;
}

.logo-trigger:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* SEARCH BOX */
.search div {
  transition: all 0.3s ease;
}

.search div:hover {
  box-shadow: 0 5px 20px rgba(79, 172, 254, 0.3);
  transform: translateY(-1px);
}

/* CART ICON */
.cart-link {
  position: relative;
  display: inline-block;
  transition: 0.3s;
}

.cart-link:hover {
  transform: scale(1.1);
}

.cart-link:hover .cart-icon {
  filter: brightness(1.2);
}

/* KELAS ICON */
.kelas-link {
  transition: 0.3s;
}

.kelas-link:hover {
  transform: scale(1.1);
}

/* PROFILE */
.profile-trigger {
  cursor: pointer;
  transition: 0.3s;
}

.profile-trigger:hover {
  transform: scale(1.08);
}

/* DROPDOWN PROFILE ITEM */
.profile-menu a {
  display: block;
  padding: 10px 15px;
  transition: 0.2s;
}

.profile-menu a:hover {
  background: #f5f7ff;
  color: #4facfe;
}

/* SEARCH DROPDOWN ITEM (biar konsisten sama JS lo) */
#searchDropdown div {
  transition: 0.2s;
}

#searchDropdown div:hover {
  background: #f1f1f1;
  padding-left: 18px;
}

/* SIDEBAR ITEM (optional biar konsisten) */
.side-content a {
  transition: 0.2s;
}

.side-content a:hover {
  color: #4facfe;
  transform: translateX(3px);
}
