/* ============================================
   TOKO ONLINE - Main Stylesheet
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2563eb;
  --primary-h: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --white: #ffffff;
  --green: #2e7d32;
  --orange: #e65100;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Navbar ─────────────────────────────────── */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-admin {
  background: var(--gray-800);
  color: var(--white);
}
.navbar-admin a {
  color: #d1d5db;
}
.navbar-admin a:hover,
.navbar-admin a.active {
  color: var(--white);
}
.navbar-brand a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}
.navbar-admin .navbar-brand a {
  color: var(--white);
}
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}
.navbar-menu a {
  font-size: 0.9rem;
}
.btn-logout {
  color: var(--danger) !important;
}
.btn-cart {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--gray-800);
  padding: 0.3rem;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: 700;
}
.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.7rem;
  margin-left: 4px;
}

/* ── Container ──────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-h);
  color: #fff;
  text-decoration: none;
}
.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-800);
}
.btn-secondary:hover {
  background: #d1d5db;
  text-decoration: none;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

/* ── Alerts ─────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ── Forms ──────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--gray-600);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Auth ───────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}
.auth-box {
  background: var(--white);
  padding: 36px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}
.auth-box h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
  text-align: center;
}
.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

/* ── Product Grid ───────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
}
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.product-info {
  padding: 12px;
}
.product-info h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.product-info .kategori {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.product-info .harga {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 6px 0;
}
.product-info .stok {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.product-card .btn {
  margin: 8px 12px 12px;
  width: calc(100% - 24px);
}

/* ── Filter ─────────────────────────────────── */
.filter-section {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filter-form input,
.filter-form select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* ── Cart ───────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 20px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}
.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
}
.cart-item-info {
  flex: 1;
}
.cart-item-info h3 {
  font-size: 0.95rem;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-qty {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}
.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--danger);
}
.cart-item-subtotal {
  font-weight: 700;
  min-width: 100px;
  text-align: right;
}
.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  height: fit-content;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 2px solid var(--gray-200);
  margin-top: 8px;
  font-size: 1rem;
}

/* ── Checkout ───────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
.order-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Orders ─────────────────────────────────── */
.tab-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tab {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gray-200);
  font-size: 0.85rem;
  color: var(--gray-800);
}
.tab.active {
  background: var(--primary);
  color: #fff;
}
.tab:hover {
  text-decoration: none;
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-actions {
  display: flex;
  gap: 8px;
}
.kode {
  font-weight: 700;
  font-size: 0.95rem;
}
.tanggal {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Status badges */
.status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.status-dibayar {
  background: #dbeafe;
  color: #1e40af;
}
.status-diproses {
  background: #ede9fe;
  color: #5b21b6;
}
.status-dikirim {
  background: #d1fae5;
  color: #065f46;
}
.status-selesai {
  background: #dcfce7;
  color: #166534;
}
.status-dibatalkan {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Payment ────────────────────────────────── */
.payment-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.rekening-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.total-bayar {
  margin-top: 16px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
}
.harga-besar {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-top: 4px;
}
.payment-card {
  margin-bottom: 16px;
}
.payment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.payment-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-bottom: 16px;
}
.payment-info p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.payment-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.payment-actions input[type="text"] {
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.badge-metode {
  background: var(--gray-200);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  margin-left: 8px;
}

/* ── Admin ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  font-size: 2rem;
}
.stat-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-info p {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stats-mini {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.85rem;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.select-status {
  padding: 4px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 0.85rem;
}

/* ── Table ──────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th {
  background: var(--gray-100);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.table tr:hover td {
  background: #f9fafb;
}
.text-center {
  text-align: center;
}

/* ── Badges ─────────────────────────────────── */
.badge-role {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-admin {
  background: #fef3c7;
  color: #92400e;
}
.badge-customer {
  background: #dbeafe;
  color: #1e40af;
}
.badge-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
}
.badge-aktif {
  background: #dcfce7;
  color: #166534;
}
.badge-nonaktif {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Modal ──────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg {
  max-width: 640px;
}
.modal-content h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ── Pagination ─────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}
.pagination a {
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-size: 0.9rem;
}
.pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination a:hover {
  text-decoration: none;
  background: var(--gray-100);
}

/* ── Empty State ────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-600);
}
.empty-state p {
  margin-bottom: 16px;
}

/* ── Responsive ─────────────────────────────── */

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    height: 56px;
  }
  .nav-brand {
    gap: 0.4rem;
  }
  .nav-logo {
    height: 32px;
  }
  .brand-name {
    font-size: 0.9rem;
  }
  .nav-search {
    max-width: 200px;
  }
  .nav-search input {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  .nav-search button {
    padding: 0.4rem 0.8rem;
  }
  .nav-actions {
    gap: 0.4rem;
  }
  .btn-cart {
    font-size: 1.1rem;
  }
  .cart-badge {
    top: -3px;
    right: -5px;
    font-size: 0.65rem;
  }
  .btn-login,
  .btn-register {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }
  .btn-admin,
  .btn-orders {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  .btn-logout {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
  }
  .user-info span {
    font-size: 0.82rem;
  }

  /* Hide nav-actions except cart and toggle on mobile */
  .nav-actions .user-info,
  .nav-actions #authButtons {
    display: none;
  }
  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 320px;
    padding: 2rem 1rem;
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    max-width: none;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
  .hero-img {
    width: 160px;
    height: 160px;
    font-size: 3.5rem;
  }

  .section {
    padding: 2rem 1rem;
  }
  .section-title {
    font-size: 1.3rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }
  .cat-card {
    padding: 1rem 0.5rem;
  }
  .cat-card img {
    width: 48px;
    height: 48px;
  }
  .cat-card p {
    font-size: 0.8rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
  .product-card-img {
    height: 140px;
  }
  .emoji-placeholder {
    font-size: 3rem;
  }
  .product-card-body {
    padding: 0.6rem 0.8rem;
  }
  .product-card-cat {
    font-size: 0.7rem;
  }
  .product-card-name {
    font-size: 0.9rem;
  }
  .product-card-rating {
    font-size: 0.78rem;
  }
  .product-card-price {
    font-size: 0.95rem;
  }
  .product-card-actions {
    padding: 0.6rem 0.8rem;
    gap: 0.4rem;
  }
  .product-card-btn-detail,
  .product-card-btn {
    padding: 0.4rem 0.4rem;
    font-size: 0.75rem;
  }

  .container {
    padding: 1rem;
  }
  .cart-layout,
  .checkout-layout,
  .payment-layout,
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .navbar-menu {
    gap: 8px;
    font-size: 0.8rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Detail Product Page */
  .detail-container {
    padding: 1rem;
  }
  .detail-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .detail-img-wrap {
    order: -1;
  }
  .detail-img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .detail-info {
    text-align: center;
  }
  .detail-price {
    font-size: 1.2rem;
  }
  .detail-qty {
    justify-content: center;
  }
  .detail-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .detail-actions button {
    width: 100%;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 1rem;
  }
  .footer-main {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-brand {
    text-align: center;
  }
  .footer-col {
    text-align: center;
  }
  .footer-contact {
    justify-content: center;
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar {
    padding: 0 1.25rem;
  }
  .nav-search {
    max-width: 300px;
  }

  .hero {
    min-height: 380px;
    padding: 2.5rem 1.5rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-img {
    width: 200px;
    height: 200px;
    font-size: 4.5rem;
  }

  .section {
    padding: 2.25rem 1.25rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .product-card-img {
    height: 160px;
  }

  .container {
    padding: 1.5rem;
  }

  /* Detail Product Page */
  .detail-container {
    padding: 1.5rem;
  }
  .detail-content {
    gap: 2rem;
  }
  .detail-img {
    width: 300px;
    height: 300px;
  }

  /* Footer */
  .footer-main {
    gap: 2rem;
  }

  /* Show all nav elements on tablet */
  .nav-actions .user-info,
  .nav-actions #authButtons {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-actions.mobile-menu-open {
    position: static;
    box-shadow: none;
    border-top: none;
    padding: 0;
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .user-info,
  .nav-actions.mobile-menu-open #authButtons {
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .btn-login,
  .nav-actions.mobile-menu-open .btn-register,
  .nav-actions.mobile-menu-open .btn-admin,
  .nav-actions.mobile-menu-open .btn-orders,
  .nav-actions.mobile-menu-open .btn-logout {
    width: auto;
    margin: 0;
  }
}

/* Laptop (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .navbar {
    padding: 0 1.5rem;
  }
  .nav-search {
    max-width: 350px;
  }

  .hero {
    min-height: 400px;
    padding: 3rem 2rem;
  }
  .hero-content h1 {
    font-size: 2.1rem;
  }
  .hero-img {
    width: 210px;
    height: 210px;
    font-size: 4.8rem;
  }

  .section {
    padding: 2.5rem 1.5rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .container {
    padding: 2rem;
  }

  /* Detail Product Page */
  .detail-container {
    padding: 2rem;
  }
  .detail-img {
    width: 350px;
    height: 350px;
  }

  /* Footer */
  .footer-main {
    gap: 2.5rem;
  }

  /* Show all nav elements on laptop */
  .nav-actions .user-info,
  .nav-actions #authButtons {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-actions.mobile-menu-open {
    position: static;
    box-shadow: none;
    border-top: none;
    padding: 0;
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .user-info,
  .nav-actions.mobile-menu-open #authButtons {
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .btn-login,
  .nav-actions.mobile-menu-open .btn-register,
  .nav-actions.mobile-menu-open .btn-admin,
  .nav-actions.mobile-menu-open .btn-orders,
  .nav-actions.mobile-menu-open .btn-logout {
    width: auto;
    margin: 0;
  }
}

/* Desktop (1441px+) */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }
  .section {
    max-width: 1400px;
  }

  .hero {
    min-height: 450px;
    padding: 3.5rem 2.5rem;
  }
  .hero-content h1 {
    font-size: 2.4rem;
  }
  .hero-img {
    width: 240px;
    height: 240px;
    font-size: 5.2rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* Detail Product Page */
  .detail-img {
    width: 400px;
    height: 400px;
  }

  /* Show all nav elements on desktop */
  .nav-actions .user-info,
  .nav-actions #authButtons {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-actions.mobile-menu-open {
    position: static;
    box-shadow: none;
    border-top: none;
    padding: 0;
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .user-info,
  .nav-actions.mobile-menu-open #authButtons {
    flex-direction: row;
  }
  .nav-actions.mobile-menu-open .btn-login,
  .nav-actions.mobile-menu-open .btn-register,
  .nav-actions.mobile-menu-open .btn-admin,
  .nav-actions.mobile-menu-open .btn-orders,
  .nav-actions.mobile-menu-open .btn-logout {
    width: auto;
    margin: 0;
  }
}

/* ============================================
   PHP VERSION - Additional Styles
   ============================================ */

/* ── Green variable (used in original) ─────── */
:root {
  --green: #2e7d32;
  --orange: #e65100;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── Auth Page ──────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--gray-100);
}
.auth-box {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}
.auth-box h2 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  text-align: center;
  color: var(--gray-800);
}
.auth-box .form-group {
  margin-bottom: 1rem;
}
.auth-box .form-group input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.auth-box .form-group input:focus {
  outline: none;
  border-color: var(--primary);
}
.auth-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.auth-link a {
  color: var(--primary);
  cursor: pointer;
}

/* ── Navbar PHP ─────────────────────────────── */
.navbar {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.nav-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green);
  white-space: nowrap;
}
.nav-search {
  flex: 1;
  max-width: 400px;
  display: flex;
}
.nav-search input {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  outline: none;
}
.nav-search button {
  padding: 0.5rem 1rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.btn-cart {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--gray-800);
  padding: 0.3rem;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: 700;
}
.btn-login,
.btn-register {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-login {
  background: none;
  border: 1px solid var(--green);
  color: var(--green);
}
.btn-register {
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
}
.btn-admin {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-orders {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-logout {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-info span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-800);
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  color: var(--gray-800);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-800);
  margin: 3px 0;
  transition: 0.3s;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Menu */
.nav-actions.mobile-menu-open {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  flex-direction: column;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--gray-200);
}
.nav-actions.mobile-menu-open .user-info,
.nav-actions.mobile-menu-open #authButtons {
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.nav-actions.mobile-menu-open .btn-cart {
  align-self: flex-start;
}
.nav-actions.mobile-menu-open .btn-login,
.nav-actions.mobile-menu-open .btn-register,
.nav-actions.mobile-menu-open .btn-admin,
.nav-actions.mobile-menu-open .btn-orders,
.nav-actions.mobile-menu-open .btn-logout {
  width: 100%;
  text-align: center;
  margin: 0.25rem 0;
}

/* ── Hero ───────────────────────────────────── */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 2rem;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}
.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.hero-content p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.5rem;
}
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: #1b5e20;
  color: #fff;
  text-decoration: none;
}
.hero-img-wrap {
  position: relative;
  z-index: 1;
}
.hero-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btn-hero-upload {
  display: inline-block;
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
}

/* ── Section ────────────────────────────────── */
.section {
  padding: 2.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.25rem;
}

/* ── Category Grid ──────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.cat-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.cat-card p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

/* ── Product Card ───────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
}
.product-card-img-wrap {
  position: relative;
  cursor: pointer;
}
.product-card-img {
  height: 180px;
  background: #f1f8e9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.emoji-placeholder {
  font-size: 4rem;
}
.product-card-body {
  padding: 0.75rem 1rem;
  flex: 1;
}
.product-card-cat {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0.25rem 0;
}
.product-card-rating {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}
.product-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.product-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.product-card-btn-detail,
.product-card-btn {
  flex: 1 1 120px;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
.product-card-btn-detail {
  background: #e8f5e9;
  color: var(--green);
}
.product-card-btn {
  background: var(--green);
  color: #fff;
}
.product-card-btn:hover,
.product-card-btn-detail:hover {
  opacity: 0.95;
}

/* ── Filter Bar ─────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.filter-bar select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: #fff;
}

/* ── Detail Page ────────────────────────────── */
.detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.btn-back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.btn-back:hover {
  text-decoration: underline;
}
.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.detail-img-wrap {
  border-radius: 12px;
  overflow: hidden;
}
.detail-img {
  height: 360px;
  background: #f1f8e9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
}
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.detail-category {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
}
.detail-info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-800);
}
.detail-rating {
  font-size: 0.9rem;
}
.detail-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}
.detail-desc {
  color: #555;
  line-height: 1.7;
  font-size: 0.95rem;
}
.detail-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.detail-qty button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: #fff;
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-qty input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}
.detail-actions {
  display: flex;
  gap: 0.75rem;
}
.btn-cart-add {
  flex: 1;
  padding: 0.75rem;
  background: #e8f5e9;
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-buynow {
  flex: 1;
  padding: 0.75rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}

/* ── Cart Page ──────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin-top: 1rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
}
.cart-item-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.btn-qty {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}
.cart-item-subtotal {
  font-weight: 700;
  color: var(--primary);
  min-width: 90px;
  text-align: right;
}
.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--danger);
  font-size: 1.1rem;
  padding: 0.3rem;
}
.cart-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  height: fit-content;
}
.cart-summary h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: #555;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 2px solid var(--gray-100);
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* ── Checkout ───────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
}
.co-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.co-transfer-info {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #2e7d32;
  margin-top: 0.75rem;
}
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.payment-opt {
  cursor: pointer;
}
.payment-opt input {
  display: none;
}
.payment-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.payment-opt input:checked + .payment-card {
  border-color: var(--green);
  background: #f1f8e9;
}
.pay-icon {
  font-size: 1.5rem;
}
.pay-name {
  font-weight: 700;
  font-size: 0.9rem;
}
.pay-desc {
  font-size: 0.8rem;
  color: #777;
}
.order-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Riwayat ────────────────────────────────── */
.riwayat-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.riwayat-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.riwayat-id {
  font-weight: 700;
  color: var(--green);
}
.riwayat-date {
  font-size: 0.82rem;
  color: #888;
}
.riwayat-items {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.75rem;
}
.riwayat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.riwayat-total {
  font-weight: 700;
  color: var(--primary);
}

/* ── Pesanan Status ─────────────────────────── */
.pesanan-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.pesanan-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.pesanan-id {
  font-weight: 700;
  color: var(--green);
}
.pesanan-date {
  font-size: 0.82rem;
  color: #888;
}
.pesanan-user,
.pesanan-items {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.3rem;
}
.pesanan-total {
  font-weight: 700;
  color: var(--primary);
}
.pesanan-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-selesai {
  background: #dcfce7;
  color: #166534;
}
.status-proses {
  background: #ede9fe;
  color: #5b21b6;
}
.status-baru {
  background: #fef3c7;
  color: #92400e;
}
.pesanan-empty {
  text-align: center;
  padding: 3rem;
  color: #888;
}

/* ── Detail Pesanan ─────────────────────────── */
.detail-pesanan-section {
  margin-bottom: 1.25rem;
}
.detail-pesanan-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.detail-pesanan-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Admin ──────────────────────────────────── */
.admin-wrap {
  display: flex;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  width: 220px;
  background: #1a1a2e;
  color: #fff;
  padding: 1.5rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.admin-logo {
  padding: 0 1.25rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.75rem;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  color: #aaa;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}
.admin-nav-btn:hover,
.admin-nav-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}
.btn-back-store {
  display: block;
  margin: 1rem 1.25rem 0;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
  border-radius: var(--radius);
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
}
.btn-back-store:hover {
  color: #fff;
  text-decoration: none;
}
.admin-main {
  flex: 1;
  padding: 1.75rem;
  background: var(--gray-100);
  overflow-y: auto;
}
.admin-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.admin-tab-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.badge-count {
  background: var(--green);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.admin-table-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  color: #555;
  border-bottom: 1px solid var(--gray-100);
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: #f9fafb;
}
.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: #e3f2fd;
  color: #1565c0;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-del {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: #fee2e2;
  color: #c62828;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 640px;
}
.admin-form .form-group {
  margin-bottom: 1rem;
}
.admin-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #555;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

/* ── Laporan Cards ──────────────────────────── */
.laporan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.laporan-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.laporan-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.laporan-card-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-800);
}
.laporan-card-label {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.2rem;
}

/* ── Footer ─────────────────────────────────── */
.footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 2.5rem 1.5rem 1rem;
  margin-top: 3rem;
}
.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.footer-logo {
  display: block;
  height: 48px;
  width: 48px;
  object-fit: cover;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 50%;
  overflow: hidden;
}
.footer-logo-fallback {
  font-size: 2.5rem;
}
.footer-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand-sub {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.2rem;
}
.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-link {
  display: block;
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  text-decoration: none;
}
.footer-link:hover {
  color: #fff;
}
.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.footer-contact i {
  color: var(--green);
  width: 16px;
}
.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Alerts ─────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Empty State ────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #888;
}
.empty-state p {
  margin: 1rem 0;
  font-size: 1rem;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .admin-sidebar {
    width: 180px;
  }
  .detail-content {
    grid-template-columns: 1fr;
  }
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }
  .hero-img-wrap {
    margin-top: 1.5rem;
  }
  .hero-img {
    width: 160px;
    height: 160px;
  }
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .admin-wrap {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.75rem;
  }
  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-nav-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .nav-search {
    order: 3;
    width: 100%;
    max-width: 100%;
  }
  .laporan-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Gambar Produk — helper classes ─────────── */

/* Gambar upload (foto asli): isi penuh area */
.prod-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ikon icons8 di card produk: besar, terpusat, dengan padding */
.prod-img-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: auto;
  padding: 8px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

/* Ikon icons8 di halaman detail produk: lebih besar */
.prod-img-icon-lg {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: auto;
  padding: 16px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Ikon icons8 di grid kategori */
.cat-card .prod-img-icon {
  width: 72px;
  height: 72px;
  padding: 4px;
}

/* Gambar produk di tabel admin */
.admin-prod-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.admin-prod-img--icon {
  object-fit: contain;
  background: #f1f8e9;
  padding: 4px;
}
.admin-prod-emoji {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #f1f8e9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* Area gambar produk — background lebih bersih untuk ikon */
.product-card-img:has(.prod-img-icon) {
  background: #fff;
}
.detail-img:has(.prod-img-icon-lg) {
  background: #fff;
}

/* ── Gambar di Keranjang ─────────────────────── */
.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.cart-item-img--icon {
  object-fit: contain;
  background: #f1f8e9;
  padding: 6px;
}
.cart-item-img--emoji {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #f1f8e9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
