/* --- Variabel Warna untuk Tema --- */
:root {
  --bg-main: #eef2f3;
  --text-main: #333333;
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --accent-color: #4facfe;
}

/* Tema Gelap */
body.dark-mode {
  --bg-main: #0f172a; /* Warna gelap yang lebih elegan (slate) */
  --text-main: #f8fafc;
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  --accent-color: #38bdf8;
}

/* --- Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border 0.4s ease;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  /* Background gradient yang lebih smooth */
  background-image:
    radial-gradient(
      circle at 10% 10%,
      rgba(79, 172, 254, 0.3) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(0, 242, 254, 0.3) 0%,
      transparent 40%
    );
  background-attachment: fixed;
}

/* --- Glassmorphism Core Class --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px; /* Sedikit lebih melengkung */
}

/* --- Sidebar --- */
.sidebar {
  width: 280px;
  margin: 20px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.8rem;
  font-weight: 800;
}

/* Warna warni untuk Icon Sidebar */
.logo h2 i {
  color: #8b5cf6;
} /* Ungu untuk Logo */
nav a i.fa-house {
  color: #3b82f6;
} /* Biru */
nav a i.fa-box-open {
  color: #f59e0b;
} /* Kuning/Orange */
nav a i.fa-tag {
  color: #10b981;
} /* Hijau */
nav a i.fa-cart-shopping {
  color: #ec4899;
} /* Pink */

nav a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 12px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 16px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

nav a:hover,
nav a.active {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

nav a i {
  margin-right: 15px;
  font-size: 1.2rem;
}

.bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.user-info {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: bold;
}
.user-info i {
  color: #14b8a6;
  font-size: 1.5rem;
}

/* --- Main Content --- */
.content {
  flex: 1;
  padding: 20px 40px 20px 10px;
}

header {
  padding: 40px;
  margin-bottom: 30px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
header p {
  opacity: 0.8;
  font-size: 1.1rem;
}

/* --- Product Grid & Cards --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.product-card {
  padding: 30px 25px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Upgrade efek hover pada kartu produk */
.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.product-img {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

/* Icon Produk dengan Warna Gradasi (Lebih Mewah) */
.product-img i.fa-laptop {
  background: -webkit-linear-gradient(45deg, #00c6ff, #0072ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 8px 10px rgba(0, 114, 255, 0.3));
}

.product-img i.fa-mobile-screen {
  background: -webkit-linear-gradient(45deg, #f12711, #f5af19);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 8px 10px rgba(245, 175, 25, 0.3));
}

.product-img i.fa-headphones {
  background: -webkit-linear-gradient(45deg, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 8px 10px rgba(142, 45, 226, 0.3));
}

.price {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 15px 0 25px;
  color: var(--text-main);
}

/* --- Buttons --- */
.glass-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-main);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.glass-btn.primary {
  background: var(--text-main);
  color: var(--bg-main);
  border: none;
}

.glass-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.glass-btn.primary:hover {
  background: var(--accent-color);
  color: white;
}

#theme-toggle i {
  color: #fbbf24;
} /* Warna icon tema */

/* --- Animasi --- */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FITUR 4: QUICK VIEW MODAL & BUTTON --- */
.quick-view-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--text-main);
  z-index: 10;
  opacity: 0; /* Sembunyi awalnya */
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateY(0);
}

.quick-view-btn:hover {
  background: var(--accent-color);
  color: white;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 30px;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: 0.3s;
}
.close-modal:hover {
  color: #ef4444;
  transform: rotate(90deg);
}

/* --- FITUR 3: TOAST NOTIFICATIONS --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 15px 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  transform: translateX(120%);
  animation: slideIn 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.hide {
  animation: slideOut 0.4s forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}
@keyframes slideOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* --- FITUR 2: MOBILE RESPONSIVENESS (Di bawah 768px) --- */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  } /* Sembunyikan sidebar di HP */

  .content {
    padding: 10px 15px 80px 15px;
  } /* Beri ruang di bawah untuk navigasi */

  .top-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  .search-bar {
    width: 100%;
  }

  .hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-image {
    margin-top: 30px;
  }

  /* Munculkan Navigasi Bawah di HP */
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 1000;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
  }
  .mobile-nav a {
    color: var(--text-main);
    font-size: 1.2rem;
    transition: 0.3s;
  }
  .mobile-nav a.active,
  .mobile-nav a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
  }

  .product-card {
    padding: 20px;
  }
  .quick-view-btn {
    opacity: 1;
    transform: none;
  } /* Selalu tampilkan tombol mata di HP */
}

/* --- LAYOUT DETAIL PRODUK --- */
.page-header {
  margin-bottom: 20px;
}
.back-btn {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}
.back-btn:hover {
  color: var(--accent-color);
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.detail-image {
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.05);
}
.detail-info {
  padding: 40px;
  position: relative;
}
.detail-title {
  font-size: 2rem;
  margin: 15px 0 10px;
}
.detail-meta {
  display: flex;
  gap: 15px;
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 20px;
}
.detail-meta .rating {
  color: #f59e0b;
  font-weight: bold;
}
.detail-price {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 30px;
}
.detail-description {
  margin-bottom: 30px;
  line-height: 1.6;
  opacity: 0.9;
}

.seller-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  margin-bottom: 30px;
}
.seller-card h4 {
  margin-bottom: 5px;
}
.seller-card p {
  font-size: 0.85rem;
  opacity: 0.7;
}
.action-buttons {
  display: flex;
  gap: 15px;
}

/* --- LAYOUT KERANJANG (CART) --- */
.cart-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 15px;
}
.cart-item .item-img {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  color: var(--accent-color);
}
.cart-item .item-details {
  flex: 1;
}
.cart-item .price {
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 5px;
}
.item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  border-radius: 8px;
  padding: 5px;
  border: 1px solid var(--glass-border);
}
.item-quantity input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: bold;
  outline: none;
}
.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 5px;
}
.delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.delete-btn:hover {
  background: #ef4444;
  color: white;
}

.cart-summary {
  padding: 30px;
  position: sticky;
  top: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  opacity: 0.9;
}
.summary-row.total {
  font-weight: bold;
  font-size: 1.2rem;
  opacity: 1;
}

/* --- LAYOUT PROFIL --- */
.profile-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}
.profile-sidebar {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-avatar {
  position: relative;
  margin-bottom: 15px;
}
.profile-avatar img {
  border-radius: 50%;
  border: 3px solid var(--accent-color);
}
.role-badge {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #8b5cf6;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}
.profile-menus {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.profile-menus .glass-btn {
  text-align: left;
  justify-content: flex-start;
  padding: 12px 20px;
}
.profile-menus .glass-btn.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.profile-main {
  padding: 30px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.stat-card i {
  font-size: 2.5rem;
}
.stat-card h3 {
  font-size: 1.5rem;
}
.stat-card p {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Tabel Glassmorphism */
.table-responsive {
  overflow-x: auto;
}
.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.glass-table th,
.glass-table td {
  padding: 15px;
  border-bottom: 1px solid var(--glass-border);
}
.glass-table th {
  opacity: 0.8;
  font-weight: normal;
}
.action-icon {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  margin-right: 10px;
  transition: 0.3s;
}
.action-icon.edit {
  color: var(--accent-color);
}
.action-icon.delete {
  color: #ef4444;
}
.action-icon:hover {
  transform: scale(1.2);
}

/* --- RESPONSIVITAS TAMBAHAN UNTUK HP --- */
@media (max-width: 768px) {
  .detail-container,
  .cart-container,
  .profile-container {
    grid-template-columns: 1fr;
  }
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* --- LAYOUT DETAIL PRODUK --- */
.page-header {
  margin-bottom: 20px;
}
.back-btn {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}
.back-btn:hover {
  color: var(--accent-color);
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.detail-image {
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.05);
}
.detail-info {
  padding: 40px;
  position: relative;
}
.detail-title {
  font-size: 2rem;
  margin: 15px 0 10px;
}
.detail-meta {
  display: flex;
  gap: 15px;
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 20px;
}
.detail-meta .rating {
  color: #f59e0b;
  font-weight: bold;
}
.detail-price {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 30px;
}
.detail-description {
  margin-bottom: 30px;
  line-height: 1.6;
  opacity: 0.9;
}

.seller-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  margin-bottom: 30px;
}
.seller-card h4 {
  margin-bottom: 5px;
}
.seller-card p {
  font-size: 0.85rem;
  opacity: 0.7;
}
.action-buttons {
  display: flex;
  gap: 15px;
}

/* --- LAYOUT KERANJANG (CART) --- */
.cart-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 15px;
}
.cart-item .item-img {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  color: var(--accent-color);
}
.cart-item .item-details {
  flex: 1;
}
.cart-item .price {
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 5px;
}
.item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  border-radius: 8px;
  padding: 5px;
  border: 1px solid var(--glass-border);
}
.item-quantity input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: bold;
  outline: none;
}
.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 5px;
}
.delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.delete-btn:hover {
  background: #ef4444;
  color: white;
}

.cart-summary {
  padding: 30px;
  position: sticky;
  top: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  opacity: 0.9;
}
.summary-row.total {
  font-weight: bold;
  font-size: 1.2rem;
  opacity: 1;
}

/* --- LAYOUT PROFIL --- */
.profile-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}
.profile-sidebar {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-avatar {
  position: relative;
  margin-bottom: 15px;
}
.profile-avatar img {
  border-radius: 50%;
  border: 3px solid var(--accent-color);
}
.role-badge {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #8b5cf6;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}
.profile-menus {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.profile-menus .glass-btn {
  text-align: left;
  justify-content: flex-start;
  padding: 12px 20px;
}
.profile-menus .glass-btn.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.profile-main {
  padding: 30px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.stat-card i {
  font-size: 2.5rem;
}
.stat-card h3 {
  font-size: 1.5rem;
}
.stat-card p {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Tabel Glassmorphism */
.table-responsive {
  overflow-x: auto;
}
.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.glass-table th,
.glass-table td {
  padding: 15px;
  border-bottom: 1px solid var(--glass-border);
}
.glass-table th {
  opacity: 0.8;
  font-weight: normal;
}
.action-icon {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  margin-right: 10px;
  transition: 0.3s;
}
.action-icon.edit {
  color: var(--accent-color);
}
.action-icon.delete {
  color: #ef4444;
}
.action-icon:hover {
  transform: scale(1.2);
}

/* --- RESPONSIVITAS TAMBAHAN UNTUK HP --- */
@media (max-width: 768px) {
  .detail-container,
  .cart-container,
  .profile-container {
    grid-template-columns: 1fr;
  }
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FORM INPUTS GLASSMORPHISM --- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  opacity: 0.9;
}

.glass-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-radius: 10px;
  outline: none;
  transition: 0.3s;
}

body.dark-mode .glass-input {
  background: rgba(0, 0, 0, 0.2);
}

.glass-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.3);
}
/* --- HALAMAN LOGIN & REGISTER --- */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.theme-toggle-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
}

.auth-wrapper {
  width: 100%;
  max-width: 450px;
}

.auth-box {
  padding: 40px;
  text-align: center;
  position: relative;
}

.auth-logo {
  color: var(--accent-color);
  margin-bottom: 20px;
}
.auth-logo i {
  font-size: 3rem;
  margin-bottom: 10px;
}
.auth-logo h2 {
  font-size: 1.8rem;
  color: var(--text-main);
}

.auth-box h3 {
  margin-bottom: 5px;
}
.auth-box > p {
  opacity: 0.8;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.auth-box .form-group {
  text-align: left;
  margin-bottom: 20px;
}
.auth-box label {
  font-size: 0.9rem;
}
.auth-box label i {
  color: var(--accent-color);
  margin-right: 5px;
  width: 15px;
}

/* Styling dropdown option agar tulisan terlihat di mode gelap/terang */
select.glass-input option {
  background-color: var(--bg-main);
  color: var(--text-main);
}

.forgot-password {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.forgot-password a {
  color: var(--accent-color);
  text-decoration: none;
}
.forgot-password a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 30px;
  font-size: 0.9rem;
}
.auth-footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}
.auth-footer a:hover {
  text-decoration: underline;
}

.back-home {
  display: inline-block;
  margin-top: 15px;
  color: var(--text-main) !important;
  opacity: 0.8;
  text-decoration: none;
  font-weight: normal !important;
}
.back-home:hover {
  opacity: 1;
  transform: translateX(-5px);
  transition: 0.3s;
}

/* --- TOP HEADER (Search & Profile) --- */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  margin-bottom: 30px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  border-radius: 20px;
  padding: 5px 15px;
  width: 50%;
  border: 1px solid var(--glass-border);
}

.search-bar i {
  color: #888;
}

.search-bar input {
  border: none;
  background: transparent;
  padding: 10px;
  width: 100%;
  color: var(--text-main);
  outline: none;
}

.search-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.search-btn:hover {
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  color: var(--text-main);
  font-size: 1.2rem;
  transition: 0.3s;
}

.icon-btn:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* --- HERO BANNER --- */
.hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 50px;
  margin-bottom: 40px;
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.2) 0%,
    rgba(0, 242, 254, 0.2) 100%
  );
}

.hero-content {
  max-width: 60%;
}
.hero-content .badge {
  background: #ef4444;
  color: white;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin: 15px 0;
  line-height: 1.2;
}
.hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 25px;
}
.hero-btn {
  width: auto;
  padding: 12px 30px;
  display: inline-flex;
}

.hero-image {
  color: var(--accent-color);
}
.hero-image i {
  filter: drop-shadow(0 15px 25px rgba(79, 172, 254, 0.4));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* --- PRODUCT SECTION TITLE --- */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

/* --- PRODUCT CARDS UPGRADE --- */
.product-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.seller-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #10b981;
  color: white;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: bold;
  z-index: 10;
}

.seller-badge.member {
  background: #8b5cf6;
}

.product-img {
  height: 180px;
  background: rgba(0, 0, 0, 0.03);
  margin-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.product-info {
  padding: 20px;
}
.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.rating {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.rating .sold {
  color: var(--text-main);
  opacity: 0.6;
  font-size: 0.8rem;
  margin-left: 5px;
}

.price {
  margin: 0 0 20px 0;
}

/* --- FOOTER --- */
.site-footer {
  margin-top: 50px;
  padding: 40px 50px 20px;
}

/* ==========================================
           CSS KHUSUS UPGRADE MAXIMAL INDEX.HTML
           ========================================== */

/* Dropdown Profil */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: 0.2s;
  font-size: 0.95rem;
}
.dropdown-item:hover {
  background: rgba(79, 172, 254, 0.1);
  color: var(--accent-color);
}
.dark-mode .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Kategori Cepat */
.category-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 30px;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar {
  display: none;
}
.category-item {
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
}
.category-item:hover {
  transform: translateY(-5px);
  background: var(--accent-color);
  color: white;
}
.category-item i {
  font-size: 1.8rem;
}
.category-item span {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}
.dark-mode .category-item {
  background: rgba(0, 0, 0, 0.2);
}
.dark-mode .category-item:hover {
  background: var(--accent-color);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -15px;
  margin-bottom: 40px;
}
.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
}
.badge-item i {
  color: #10b981;
  font-size: 1.2rem;
}

/* Flash Sale Banner */
.flash-sale-banner {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.flash-timer {
  display: flex;
  gap: 10px;
}
.timer-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

/* Skeleton Loader (Animasi Memuat) */
.skeleton-card {
  height: 320px;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    rgba(200, 200, 200, 0.1) 25%,
    rgba(200, 200, 200, 0.2) 50%,
    rgba(200, 200, 200, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
.dark-mode .skeleton-card {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 30px;
}

.footer-col h3 {
  margin-bottom: 20px;
  color: var(--accent-color);
}
.footer-col p {
  opacity: 0.8;
  line-height: 1.6;
}
.footer-col a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 10px;
  opacity: 0.8;
  transition: 0.3s;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--accent-color);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 15px;
}
.social-icons a {
  font-size: 1.5rem;
}

.footer-bottom {
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ==========================================
   PERBAIKAN TATA LETAK LAYAR LEBAR (DESKTOP)
   ========================================== */

/* 1. Memusatkan dan membatasi lebar semua konten utama */
.content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Memusatkan semua elemen ke tengah */
}

/* 2. Standar lebar E-Commerce (Max 1280px) */
.content > * {
    width: 100%;
    max-width: 1280px !important; 
}

/* 3. Merapikan Header & Search Bar agar tidak kepanjangan */
.top-header {
    justify-content: space-between;
}

.search-bar {
    max-width: 600px; /* Batasi panjang kolom pencarian */
    width: 100%;
    margin-right: 20px;
}

/* 4. Memastikan Dropdown Profil tetap berada di posisinya */
.profile-dropdown-container {
    margin-left: auto;
}