/* RESET & DASAR */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: #333;
  background: #ffffff !important;
}

/* =================================== */
/* HEADER UTAMA */
/* =================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  overflow: visible !important;
  box-sizing: border-box;
  gap: 20px;
}

/* LOGO */
.logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* =================================== */
/* NAVIGASI DESKTOP & MEGA MENU */
/* =================================== */
.main-nav {
  /* Ditampilkan di desktop, disembunyikan di mobile oleh media query */
  display: flex;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav ul li {
  position: relative;
  overflow: visible;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 400;
  font-size: 14px;
  transition: color 0.25s ease;
}

.main-nav a:hover {
  color: #8CC63F;
}

/* MEGA MENU STYLE */
.has-mega-menu {
  position: relative;
  overflow: visible;
}

.has-mega-menu > a::after {
  content: " ▾";
  font-size: 11px;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  width: 600px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-radius: 8px;
}

.has-mega-menu.active .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.menu-column {
  min-width: 200px;
  flex: 1;
}

.menu-column h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #000;
  border-bottom: 2px solid #f1f1f1;
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-column li {
  margin: 8px 0;
  padding: 5px 0;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.menu-column a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s ease;
  display: block;
  padding: 8px 12px;
}

.menu-column a:hover {
  color: #8CC63F;
}

/* =================================== */
/* HEADER ACTIONS (ICON & TOMBOL) */
/* =================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: visible !important;
}

.btn-search,
.btn-cart {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: transform 0.2s ease;
  overflow: visible;
}

.btn-search:hover,
.btn-cart:hover {
  transform: scale(1.1);
}

.btn-search svg,
.btn-cart svg {
  width: 24px;
  height: 24px;
  stroke: #222;
  stroke-width: 2.3;
  transition: stroke 0.25s ease;
}

.btn-search:hover svg,
.btn-cart:hover svg {
  stroke: #8CC63F;
}

/* TOMBOL LOGIN (Desktop) */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* jarak antara ikon dan teks */
  background: #8CC63F;
  color: #fff;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  padding: 8px 18px;
  border-radius: 30px; /* bentuk lonjong */
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  margin-left: 14px; /* beri jarak kiri dari ikon sebelumnya */
  height: 40px;
  line-height: 1;
}

.btn-login i {
  font-size: 16px;
}

.btn-login:hover {
  background: #7bb539;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(140, 198, 63, 0.3);
}

/* =============================== */
/* CITITEX STYLE SLIDE SEARCH BAR  */
/* =============================== */
#search-bar {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  padding: 14px 0;
  background: #fff;

  box-shadow: 0 3px 10px rgba(0,0,0,0.12);

  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;

  transition: transform .35s ease, opacity .3s ease, visibility .3s ease;

  z-index: 1000000 !important;
}

/* Aktif = turun dari atas */
#search-bar.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Wrapper Align Tengah */
.search-wrapper {
  width: 94%;
  max-width: 900px;
  margin: auto;

  display: flex;
  align-items: center;
  gap: 10px;
}

/* Input kiri */
#search-bar input {
  flex: 1;
  height: 45px;

  padding: 0 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;

  font-size: 15px;
  outline: none;
}

/* Tombol Search */
.search-btn {
  width: 48px;
  height: 45px;

  border: none;
  border-radius: 8px;
  background: #8CC63F;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
}

/* Tombol Close (X) */
.close-btn {
  width: 48px;
  height: 45px;

  border: none;
  border-radius: 8px;
  background: #e0e0e0;
  color: #333;
  cursor: pointer;
  font-size: 18px;
}

/* =================================== */
/* HAMBURGER & MENU MOBILE */
/* =================================== */

/* HAMBURGER MENU BUTTON */
.btn-hamburger {
  /* Default disembunyikan, ditampilkan oleh media query */
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
  transition: transform 0.2s ease;
}

.btn-hamburger:hover {
  transform: scale(1.1);
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: #222;
  transition: all 0.3s ease;
  transform-origin: center;
}

.btn-hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.btn-hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.btn-hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Modern Mobile Navigation (Satu-satunya definisi) */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.close-mobile-menu {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  padding: 0;
  color: #666;
  transition: all 0.3s ease;
  border-radius: 50%;
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-mobile-menu:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
  transform: scale(1.1);
}

.mobile-nav ul {
  list-style: none;
  margin: 20px 0 0 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav li {
  margin: 0;
  border-bottom: 1px solid #eee;
}

.mobile-nav li:last-child {
  border-bottom: none;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #333;
  text-decoration: none;
  font-weight: 400;
  font-size: 16px;
  transition: color 0.3s ease;
}

.mobile-nav a:hover {
  color: #8CC63F;
}

/* Mobile Submenu */
.has-mobile-submenu,
.has-mega-menu {
  position: relative;
}

.has-mobile-submenu > a::after,
.has-mega-menu > a::after {
  content: "▾";
  font-size: 14px;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.has-mobile-submenu.active > a::after,
.has-mega-menu.active > a::after {
  transform: rotate(180deg);
}

.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-radius: 0 0 8px 8px;
  margin-top: -16px;
  
}

.has-mobile-submenu.active .mobile-submenu,
.has-mega-menu.active .mobile-submenu {
  max-height: 500px;
}

.mobile-submenu li {
  border-bottom: 1px solid #e9ecef;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  transition: background-color 0.2s ease;
}

.mobile-submenu li:last-child {
  border-bottom: none;
}

.mobile-submenu a {
  padding: 8px 20px 8px 40px;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  display: block;
  transition: all 0.2s ease;
}

.mobile-submenu a:hover {
  background: rgba(140, 198, 63, 0.1);
  color: #8CC63F;
  padding-left: 40px;
}


/* Tombol Login Mobile */
.mobile-nav .btn-login-mobile {
  background: linear-gradient(135deg, #8CC63F 0%, #7bb539 100%);
  color: #fff;
  padding: 12px 0;
  border: none;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(140, 198, 63, 0.3);
  position: relative;
  overflow: hidden;
  width: 100%;
  display: block;
  margin-top: 16px; /* Tambahan jarak */
  border-radius: 14px; /* Menyamakan dengan style lama */
}

.mobile-nav .btn-login-mobile::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.mobile-nav .btn-login-mobile:hover::before {
  left: 100%;
}

.mobile-nav .btn-login-mobile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(140, 198, 63, 0.4);
}


/* =================================== */
/* SEARCH MODAL (Pop-up) */
/* =================================== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.search-modal.active .search-modal-content {
  transform: scale(1);
}

.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}

.search-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.close-modal-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-modal-btn:hover {
  background: #f5f5f5;
}

.search-modal-body {
  padding: 24px;
}

.modal-search-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e1e1e1;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
  margin-bottom: 20px;
}

.modal-search-input:focus {
  border-color: #8CC63F;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: #f9f9f9;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 16px;
}

.search-result-item h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #333;
}

.search-result-item p {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #666;
}

/* =================================== */
/* RESPONSIVE */
/* =================================== */
@media (max-width: 768px) {
  /* Tampilkan tombol hamburger */
  .btn-hamburger {
    display: flex;
  }

  /* Sembunyikan navigasi desktop */
  .main-nav {
    display: none;
  }

  /* Sembunyikan tombol login desktop di mobile */
  .btn-login {
    display: none;
  }

  /* Kurangi gap header-actions untuk mobile */
  .header-actions {
    gap: 8px;
  }

  /* Kurangi padding container untuk mobile */
  .container {
    padding: 12px 16px;
    gap: 12px;
  }

  /* Search bar slide-down untuk desktop dan mobile */
  .search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0;
    background: #fff;
    overflow: hidden;
    transition: max-height 0.4s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    z-index: 102;
  }

  .search-bar.active {
    max-height: 85px;
  }

  .search-form {
    padding: 0 25px;
  }
}

/* Untuk layar sangat kecil (HP kecil) */
@media (max-width: 480px) {
  .container {
    padding: 10px 12px;
    gap: 8px;
  }

  .logo img {
    height: 40px;
  }

  .site-header {
    min-height: 80px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-search,
  .btn-cart {
    padding: 9px;
  }

  .btn-search svg,
  .btn-cart svg {
    width: 25px;
    height: 25px;
  }

  .btn-hamburger {
    width: 22px;
    height: 18px;
  }
}

