/* 🌸 TAMPILAN UMUM 🌸 */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #4807ed;
  color: #333;
}

/* 🌸 NAVBAR 🌸 */
header {
  background-color: #4807ed;
  color: white;
  padding: 15px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-btn {
  background-color: #48ea08;
  color: #f7f9f7;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.admin-btn:hover {
  background-color: #ffe6cc;
}

#checkout-button {
  background: #48ea08;
  color: #fafaf9;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

#checkout-button:hover {
  background-color: #ffe6cc;
}

/* 🌸 BAGIAN UTAMA 🌸 */
main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

main h1 {
  text-align: center;
  color: #222;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

main h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: #48ea08;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* 🌸 GRID PRODUK 🌸 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

/* 🌸 CARD PRODUK 🌸 */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h2 {
  font-size: 1.1rem;
  margin: 10px 0 5px;
}

.product-card .price {
  color: #48ea08;
  font-weight: bold;
  font-size: 1.1rem;
}

.product-card p {
  font-size: 0.9rem;
  padding: 0 10px;
  color: #666;
  min-height: 45px;
}

.buy-btn {
  background: #48ea08;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 15px;
  margin: 12px 0 18px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.buy-btn:hover {
  background: #48ea08;
}

/* 🌸 MODAL CHECKOUT 🌸 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: white;
  margin: 4% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: 0.3s;
}

.close-button:hover {
  color: #48ea08;
}

.modal-content h2 {
  text-align: center;
  margin-top: 0;
  color: #48ea08;
}

label {
  display: block;
  margin: 12px 0 5px;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  font-family: inherit;
}

button[type="submit"] {
  width: 100%;
  background: #48ea08;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

button[type="submit"]:hover {
  background: #48ea08;
}

/* 🌸 RINGKASAN PESANAN 🌸 */
#cart-summary p {
  background: #f9f9f9;
  padding: 8px 10px;
  border-radius: 4px;
  margin: 5px 0;
}

#total-price {
  color: #48ea08;
  font-weight: 700;
}

/* 🌸 RESPONSIVE 🌸 */
@media (max-width: 600px) {
  .product-card img {
    height: 160px;
  }
  nav {
    flex-direction: column;
    gap: 10px;
  }
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f5f5f5;
  margin: 0;
  color: #333;
}

/* LOGIN PAGE */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 320px;
}

.login-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  width: 100%;
  padding: 10px;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

button:hover {
  background: #0056b3;
}

.error {
  color: red;
  text-align: center;
  margin-top: 1rem;
}

/* DASHBOARD */
.admin-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f4f4f4;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.logout-btn {
  background: #dc3545;
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 5px;
}

h3 {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

.btn-add {
  background: #28a745;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 1rem;
}

.edit-link {
  color: #007BFF;
  text-decoration: none;
  margin-right: 10px;
}

.delete-link {
  color: #dc3545;
  text-decoration: none;
}

img {
  border-radius: 5px;
}

body {
            font-family: 'Poppins', sans-serif;
            background: #f5f5f5;
            margin: 0;
            padding: 0;
        }

        .form-container {
            max-width: 600px;
            margin: 3rem auto;
            background: #fff;
            padding: 2rem 2.5rem;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        h2 {
            text-align: center;
            margin-bottom: 1.5rem;
            color: #333;
        }

        label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: #555;
        }

        input[type="text"],
        input[type="number"],
        textarea,
        input[type="file"] {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ccc;
            border-radius: 6px;
            margin-bottom: 1rem;
            font-size: 15px;
            transition: border-color 0.2s ease;
        }

        input[type="text"]:focus,
        input[type="number"]:focus,
        textarea:focus {
            border-color: #ff7b00;
            outline: none;
        }

        textarea {
            resize: vertical;
            min-height: 100px;
        }

        button {
            background: #ff7b00;
            color: white;
            font-weight: 600;
            border: none;
            padding: 12px;
            width: 100%;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            transition: background 0.2s ease;
        }

        button:hover {
            background: #e46a00;
        }

        .back-link {
            display: inline-block;
            margin-top: 1rem;
            text-decoration: none;
            color: #007BFF;
            font-weight: 500;
        }

        .error {
            background: #fdd;
            color: #b30000;
            padding: 10px;
            border-radius: 6px;
            margin-bottom: 1rem;
            text-align: center;
        }
        /* ... (CSS Anda yang sudah ada) ... */

/* Gaya untuk tombol Beli Langsung */
.buy-now-btn {
  background: #005c21; /* Warna hijau lebih gelap */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 15px;
  margin: 5px 0 5px; /* Memberi sedikit jarak */
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
  width: calc(100% - 30px); /* Menyesuaikan lebar */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.buy-now-btn:hover {
  background: #007a2c;
}

/* Sedikit penyesuaian pada tombol keranjang agar konsisten */
.buy-btn {
    width: calc(100% - 30px);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ... (CSS Anda yang sudah ada) ... */
/* ... (kode CSS Anda yang lain) ... */

/* Pastikan link (a) yang menjadi tombol Beli Langsung tidak ada garis bawah */
.buy-now-btn {
  text-decoration: none; /* Hapus garis bawah dari link */
}
