/* ================= GLOBAL ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family: 'Segoe UI', sans-serif;
}

body{
  background:linear-gradient(135deg, #e3f2fd, #ffffff);
  color:#333;
}

/* ================= LOGIN ================= */
.auth-box{
  width:320px;
  margin:120px auto;
  padding:25px;
  background:white;
  border-radius:20px;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
  text-align:center;
  animation:fadeIn 0.6s ease;
}

.auth-box h2{
  color:#1e88e5;
  margin-bottom:15px;
}

.auth-box input{
  width:100%;
  padding:12px;
  margin:8px 0;
  border-radius:10px;
  border:1px solid #ccc;
  transition:0.3s;
}

.auth-box input:focus{
  border-color:#1e88e5;
  box-shadow:0 0 5px rgba(30,136,229,0.3);
  outline:none;
}

.auth-box button{
  width:100%;
  padding:12px;
  margin-top:10px;
  border:none;
  border-radius:10px;
  background:linear-gradient(45deg,#1e88e5,#42a5f5);
  color:white;
  font-weight:bold;
  cursor:pointer;
  transition:0.3s;
}

.auth-box button:hover{
  transform:scale(1.05);
}

/* ================= HEADER ================= */
header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 20px;
  background:linear-gradient(45deg,#1e88e5,#1565c0);
  color:white;
  box-shadow:0 3px 10px rgba(0,0,0,0.2);
}

header h2{
  font-size:20px;
}

header input{
  width:40%;
  padding:10px;
  border-radius:20px;
  border:none;
}

header button{
  background:white;
  border:none;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
}

/* ================= NAV ================= */
nav{
  display:flex;
  justify-content:center;
  gap:10px;
  padding:10px;
  background:#1565c0;
}

nav button{
  background:white;
  border:none;
  padding:8px 15px;
  border-radius:20px;
  cursor:pointer;
  transition:0.3s;
}

nav button:hover{
  background:#bbdefb;
  transform:scale(1.05);
}

/* ================= FILTER ================= */
#katalog > div{
  text-align:center;
  padding:10px;
}

#katalog button{
  margin:5px;
  padding:6px 12px;
  border:none;
  border-radius:20px;
  background:#e3f2fd;
  cursor:pointer;
  transition:0.3s;
}

#katalog button:hover{
  background:#90caf9;
}

/* ================= PRODUK GRID ================= */
.produk-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:15px;
  padding:20px;
}

/* ================= CARD PRODUK ================= */
.produk{
  background:white;
  border-radius:15px;
  overflow:hidden;
  box-shadow:0 5px 15px rgba(0,0,0,0.1);
  transition:0.3s;
}

.produk:hover{
  transform:translateY(-8px);
  box-shadow:0 10px 20px rgba(0,0,0,0.15);
}

/* GAMBAR */
.produk img{
  width:100%;
  height:140px;
  object-fit:cover;
}

/* CONTENT */
.produk-content{
  padding:12px;
  text-align:center;
}

.produk h4{
  font-size:14px;
  margin-bottom:5px;
}

.produk p{
  color:#1e88e5;
  font-weight:bold;
  margin-bottom:10px;
}

/* BUTTON */
.produk button{
  width:100%;
  padding:8px;
  border:none;
  border-radius:8px;
  background:#1e88e5;
  color:white;
  cursor:pointer;
  transition:0.3s;
}

.produk button:hover{
  background:#1565c0;
}

/* ================= CART ================= */
#keranjang, #checkout, #pembayaran{
  padding:20px;
}

#cartItems div{
  background:white;
  padding:12px;
  margin-bottom:10px;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,0.1);
}

#cartItems button{
  margin-left:5px;
  padding:4px 8px;
  border:none;
  background:#1e88e5;
  color:white;
  border-radius:5px;
  cursor:pointer;
}

/* ================= CHECKOUT ================= */
#checkout button{
  margin-top:10px;
  padding:12px;
  width:100%;
  background:#1e88e5;
  color:white;
  border:none;
  border-radius:10px;
  cursor:pointer;
}

/* ================= PEMBAYARAN ================= */
#pembayaran select,
#pembayaran input{
  width:100%;
  padding:10px;
  margin:10px 0;
  border-radius:8px;
  border:1px solid #ccc;
}

#pembayaran button{
  width:100%;
  padding:12px;
  background:#1e88e5;
  color:white;
  border:none;
  border-radius:10px;
  cursor:pointer;
}

#pembayaran button:hover{
  background:#1565c0;
}

/* ================= QRIS ================= */
#qrisBox{
  text-align:center;
  margin-top:15px;
}

#qrisBox img{
  margin-top:10px;
}

/* ================= ANIMASI ================= */
@keyframes fadeIn{
  from{
    opacity:0;
    transform:translateY(-10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ================= RESPONSIVE ================= */
@media(max-width:600px){
  header input{
    width:60%;
  }

  .auth-box{
    margin:60px auto;
  }
}

.img-produk{
  width:100%;
  height:120px;
  object-fit:cover;
  border-radius:10px;
}

.img-cart{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:8px;
}

.cart-item{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.right-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-icon {
  background: white;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
}

.cart-mini {
  font-size: 16px;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.right-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-icon {
  background: white;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
}

/* POPUP PROFIL */
.popup-profil {
  position: absolute;
  right: 20px;
  top: 70px;
  width: 300px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  display: none;
  z-index: 999;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.popup-menu {
  display: flex;
  justify-content: space-around;
  padding: 15px;
}

.item {
  text-align: center;
  cursor: pointer;
}

.icon {
  font-size: 25px;
}
/* ================= FIX NAVBAR KANAN ================= */

/* Bungkus kanan (keranjang + profil) */
.right-menu{
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Keranjang mini */
.cart-mini{
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.3s;
}
#cartCountTop{
  color: #000000;
  font-size: 17px;
  font-weight: bold;
}
.cart-mini:hover{
  transform: scale(1.05);
}

/* Profil icon */
.profile-icon{
  background: white;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.3s;
}

.profile-icon:hover{
  transform: scale(1.1);
}

/* ================= HILANGKAN ELEMENT LIAR ================= */

/* kalau masih ada logout nyangkut kiri */
button[onclick="logout()"]{
  display: none;
}

/* ================= POSISI HEADER LEBIH RAPI ================= */
header{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* ================= SEARCH TENGAH ================= */
header input{
  width:40%;
  max-width:400px;
}
/* ================= WARNA TEKS MENU PROFIL ================= */

.popup-menu .item:nth-child(1) p{
  color: #1e88e5; /* Pembayaran - biru */
}

.popup-menu .item:nth-child(2) p{
  color: #43a047; /* Pesanan - hijau */
}

.popup-menu .item:nth-child(3) p{
  color: #fb8c00; /* Pengiriman - orange */
}

.popup-menu .item:nth-child(4) p{
  color: #fdd835; /* Favorit - kuning */
}

.popup-menu .item:nth-child(5) p{
  color: #e53935; /* Logout - merah */
}
.popup-menu{
  display: flex;
  justify-content: space-between; /* kasih jarak rata */
  align-items: center;
  padding: 15px 20px;
}

/* tiap item */
.item{
  text-align: center;
  cursor: pointer;
  flex: 1; /* biar rata */
}

/* kasih jarak tulisan */
.item p{
  margin-top: 8px;
  font-size: 13px;
}

/* jarak antar item (opsional kalau mau lebih longgar) */
.item:not(:last-child){
  margin-right: 10px;
}
#cartCount{
  color: rgb(0, 0, 0); /* ganti sesuai warna yang kamu mau */
}

.profile-name {
  font-weight: bold;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  background: #f5f5f5;
  border-radius: 8px 8px 0 0;
}

.profile-name span {
  display: block;
  margin-top: 5px;
  color: #007bff;
}

/* CONTAINER LIST */
#listPesananUser {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

/* CARD PESANAN */
.card-pesanan {
  background: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-left: 6px solid #2d7ef7;
  transition: 0.3s;
}

.card-pesanan:hover {
  transform: scale(1.01);
}

/* JUDUL ORDER */
.card-pesanan h4 {
  margin-bottom: 8px;
  color: #2d7ef7;
}

/* TEXT */
.card-pesanan p {
  margin: 4px 0;
}

/* STATUS */
.status-menunggu {
  background: orange;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.status-proses {
  background: #3498db;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.status-selesai {
  background: green;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

/* WRAPPER MENU DI POPUP */
.popup-menu {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
}

/* ITEM MENU */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  transition: 0.3s;
}

/* HOVER */
.menu-item:hover {
  background: #f1f1f1;
}

/* ICON */
.menu-item i,
.menu-item span {
  font-size: 25px;
}

/* TEXT */
.menu-item p {
  font-size: 13px;
  margin: 0;
  color: #333;
}
.popup-profil{
  display:none;
}

/* ================= PEMBAYARAN ================= */

#pembayaran{
  padding:20px;
}

#pembayaran h2,
#pembayaran h3{
  margin-bottom:15px;
}

.payment-box{
  background:#ffffff;
  padding:15px;
  margin-bottom:15px;
  border-radius:15px;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
}

.payment-box label{
  display:block;
  margin-bottom:8px;
  font-weight:bold;
  color:#333;
}

.payment-box input,
.payment-box textarea,
.payment-box select{
  width:100%;
  padding:12px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:14px;
  box-sizing:border-box;
}

.payment-box textarea{
  min-height:80px;
  resize:none;
}

#rekeningInfo{
  font-size:16px;
  font-weight:bold;
  color:#1565c0;
}

#qrisBox{
  text-align:center;
}

#qrisImg{
  margin-top:10px;
  border-radius:12px;
  border:1px solid #ddd;
  padding:10px;
  background:white;
}

#totalBayar{
  font-size:28px;
  font-weight:bold;
  color:#2e7d32;
}

.btn-bayar{
  width:100%;
  padding:15px;
  border:none;
  border-radius:12px;
  background:#1e88e5;
  color:white;
  font-size:18px;
  font-weight:bold;
  cursor:pointer;
  transition:0.3s;
}

.btn-bayar:hover{
  background:#1565c0;
}

/* RESPONSIVE */
@media(max-width:600px){

  .payment-box{
    padding:12px;
  }

  #totalBayar{
    font-size:22px;
  }

  .btn-bayar{
    font-size:16px;
  }
}
.checkout-card{
  display: flex;
  align-items: center;
  gap: 15px;

  background: #fff;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;

  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.checkout-img{
  width: 80px;
  height: 80px;

  object-fit: cover;

  border-radius: 10px;
}

.checkout-detail{
  flex: 1;
}
.status-menunggu{
    background: #ffb300;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-selesai{
    background: #28a745;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-ditolak{
    background: #dc3545;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.qty-input{
    width:55px;
    height:30px;
    text-align:center;
    border:1px solid #ccc;
    border-radius:8px;
    font-size:16px;
    padding:4px;
}