/* ============================================================
   PortoUMKM - Design Tokens (diambil dari DESIGN.md)
   ============================================================ */
:root, [data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --surface-subtle-sky: #fbeef0;
  --surface-border-sky: #f3d6da;
  --text-primary: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #8c2f3a;
  --primary-hover: #6e232a;
  --secondary: #a83c49;
  --tertiary: #c97b85;
  --secondary-fixed-dim: #e8aeb4;
  --accent: #8c2f3a;
  --accent-hover: #6e232a;
  --accent-light: rgba(140, 47, 58, 0.12);
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #1ebe57;
  --promo-badge-bg: #e11d48;
  --promo-badge-text: #ffffff;
  --shadow-card: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-card-hover: 0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -2px rgba(15,23,42,0.04);
  --shadow-wa: 0 20px 25px -5px rgba(37,211,102,0.25), 0 8px 10px -6px rgba(37,211,102,0.2);
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-full: 9999px;
}

* , *::before, *::after { box-sizing: border-box; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
html, body { font-family: 'Inter', sans-serif; }
body { margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* -- Loading Overlay -- */
.loading-overlay {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .3s ease;
}
.spinner-brand {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--accent-light); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-inline {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .6s linear infinite; margin-right: 6px; vertical-align: -2px;
}

/* -- Navbar Publik -- */
.public-navbar { position: sticky; top: 0; z-index: 500; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.navbar-main { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo { height: 30px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.brand-badge { font-size: 10px; font-weight: 700; color: var(--primary); letter-spacing: .02em; display: flex; align-items: center; gap: 4px; margin-bottom: 1px; white-space: nowrap; }
.brand-title { font-size: 20px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.search-popover-wrap { position: relative; }
.mobile-nav-wrap { position: relative; }
.mobile-nav-toggle { display: flex; }
@media (min-width: 900px) { .mobile-nav-toggle { display: none !important; } }
.umkm-dropdown-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  max-height: 220px; overflow-y: auto; margin-top: 4px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(15,23,42,.12);
}
.umkm-dropdown-panel.hidden { display: none; }
.umkm-dropdown-item { padding: 9px 12px; font-size: 13.5px; cursor: pointer; color: var(--text-body); }
.umkm-dropdown-item:hover { background: var(--surface-subtle-sky); color: var(--primary); }
.umkm-dropdown-empty { padding: 10px 12px; font-size: 13px; color: var(--text-muted); text-align: center; }
.mobile-nav-panel {
  position: absolute; top: 100%; left: 0; z-index: 600;
  width: min(240px, 80vw); background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  box-shadow: 0 12px 24px rgba(15,23,42,.12); padding: 6px; margin-top: 8px;
  display: flex; flex-direction: column;
}
.mobile-nav-panel.hidden { display: none; }
.mobile-nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; color: var(--text-body); }
.mobile-nav-link i { font-size: 16px; color: var(--primary); width: 18px; text-align: center; }
.mobile-nav-link:hover, .mobile-nav-link.active { background: var(--surface-subtle-sky); color: var(--primary); }
.mobile-search-row {
  position: absolute; top: 100%; right: 0; z-index: 600;
  width: min(280px, 85vw); background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  box-shadow: 0 12px 24px rgba(15,23,42,.12); padding: 10px; margin-top: 8px;
}
.mobile-search-row.hidden { display: none; }
.nav-links { display: none; gap: 4px; flex: 1; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-link { padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; color: var(--text-body); }
.nav-link:hover { background: var(--surface-subtle-sky); color: var(--primary); }
.nav-link.active { background: var(--primary); color: #fff; }
.navbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box { align-items: center; gap: 8px; background: var(--surface-subtle-sky); border: 1px solid var(--surface-border-sky); border-radius: var(--radius-full); padding: 8px 16px; width: 280px; color: var(--text-muted); }
.search-box input { border: none; outline: none; background: transparent; font-size: 13px; color: var(--text-primary); width: 100%; }
.cart-btn, .admin-link { position: relative; width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-body); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cart-btn:hover, .admin-link:hover { border-color: var(--primary); color: var(--primary); }
.cart-badge { position: absolute; top: -4px; right: -4px; background: var(--promo-badge-bg); color: #fff; font-size: 10px; font-weight: 700; border-radius: var(--radius-full); min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

/* -- Admin Sidebar -- */
.admin-sidebar { position: fixed; top: 0; left: 0; width: 264px; height: 100vh; background: var(--sidebar-bg); z-index: 1000; display: flex; flex-direction: column; overflow-y: auto; }
.admin-sidebar-header { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-nav { list-style: none; margin: 0; padding: 10px 0; flex: 1; }
.admin-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 20px; color: var(--sidebar-text); font-size: 14px; font-weight: 500; background: none; border: none; text-align: left; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 10px 0; }
.admin-sidebar-toggle { position: fixed; top: 14px; left: 14px; z-index: 1001; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--sidebar-bg); color: #fff; border: none; }
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .admin-sidebar.show { transform: translateX(0); }
}

body.admin-mode .main-content { margin-left: 264px; }
body.admin-mode .public-navbar,
body.admin-mode .public-footer { display: none !important; }
body.admin-mode .admin-sidebar-toggle { display: flex !important; }
@media (max-width: 900px) { body.admin-mode .main-content { margin-left: 0; padding-top: 64px; } }

body { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1 0 auto; min-height: 70vh; }
.public-footer { flex-shrink: 0; }
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 24px; }
.page-wrap-fluid { padding: 24px; }

/* -- Footer -- */
.public-footer { background: var(--surface-subtle-sky); border-top: 1px solid var(--surface-border-sky); padding: 28px 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.footer-bottom { max-width: 1280px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 12px; }

/* -- Hero & Home -- */
.hero-section { background: linear-gradient(135deg, #ffffff 0%, var(--surface-subtle-sky) 100%); border-bottom: 1px solid var(--surface-border-sky); }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-subtle-sky); border: 1px solid var(--surface-border-sky); color: var(--primary); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-full); }
.hero-title { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-primary); }
@media (min-width: 768px) { .hero-title { font-size: 40px; } }
.pill-feature { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-body); background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 6px 12px; }

/* -- Hero image carousel (di samping judul hero) -- */
.hero-carousel { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card-hover); aspect-ratio: 4/3; background: #0f172a; cursor: pointer; }
.hero-carousel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s ease; }
.hero-carousel .hero-carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-carousel .hero-carousel-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-carousel .hero-carousel-dots span.active { background: #fff; width: 18px; border-radius: 4px; }
.hero-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.85); border: none; color: var(--text-primary); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.hero-carousel-nav.prev { left: 8px; } .hero-carousel-nav.next { right: 8px; }

/* -- Widget/Benefit row (revisi baru: Pemberdayaan UMKM, Order WA Otomatis, dst) -- */
.widget-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .widget-row { grid-template-columns: repeat(4, 1fr); } }
.widget-item { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 14px 12px; font-size: 12px; font-weight: 600; color: var(--text-body); }
.widget-item i { font-size: 20px; flex-shrink: 0; }
.widget-item.widget-maroon { background: #fdeeee; border-color: #f5d5d5; } .widget-item.widget-maroon i { color: #a13d3d; }
.widget-item.widget-green { background: #eafaf0; border-color: #cdf0da; } .widget-item.widget-green i { color: #1ea34f; }
.widget-item.widget-blue { background: #eef7fd; border-color: #d3ebf9; } .widget-item.widget-blue i { color: var(--primary); }
.widget-item.widget-yellow { background: #fffaeb; border-color: #fbedc4; } .widget-item.widget-yellow i { color: #c99a13; }

/* -- Promo Banner Slider (flyer admin, terpisah dari hero carousel) -- */
.promo-banner-slider { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); cursor: pointer; }
.promo-banner-slide { width: 100%; aspect-ratio: 1600 / 320; object-fit: cover; display: block; background: var(--surface-subtle-sky); }
@media (max-width: 640px) { .promo-banner-slide { aspect-ratio: 1600 / 320; } }
.promo-banner-caption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(15,23,42,.75), transparent); color: #fff; padding: 16px; }
.promo-banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.promo-banner-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.promo-banner-dots span.active { background: #fff; width: 18px; border-radius: 4px; }

/* -- Sector / Klaster Cards -- */
.sector-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); transition: box-shadow .2s ease, transform .2s ease; }
.sector-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.sector-card-img { height: 160px; width: 100%; object-fit: cover; background: var(--surface-subtle-sky); }
.sector-tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--primary); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); }

/* -- Flyer Slider (Home) -- */
.flyer-slider { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.flyer-slide { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--surface-subtle-sky); }
.flyer-caption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(15,23,42,.75), transparent); color: #fff; padding: 16px; }
.flyer-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.flyer-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.flyer-dot.active { background: #fff; }

/* -- Category Chips -- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--radius-full); border: 1px solid var(--border-color); background: #fff; color: var(--text-body); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--surface-subtle-sky); border-color: var(--primary); color: var(--primary); }
.chip-solid.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tag-quick { font-size: 12px; color: var(--text-muted); font-weight: 500; cursor: pointer; }
.tag-quick:hover, .tag-quick.active { color: var(--primary); font-weight: 700; }

/* -- Product Grid & Card (PressMart Model) -- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { background: #fff; border: 1px solid #f1f5f9; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; cursor: pointer; }
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: #cbd5e1; }
.product-card-img-wrap { position: relative; aspect-ratio: 1/1; background: #f8fafc; overflow: hidden; }
.product-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img-wrap .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 34px; }
.badge-discount { position: absolute; top: 8px; left: 8px; background: var(--promo-badge-bg); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: var(--radius-sm); }
.badge-category { position: absolute; top: 8px; right: 8px; background: var(--surface-subtle-sky); color: var(--primary); font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-sm); }
.badge-rating { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.95); color: #f59e0b; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 3px; }
.product-umkm-row { margin-bottom: 2px; }
.product-card-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-umkm { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.product-title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.product-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.product-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.price-now { font-size: 15px; font-weight: 800; color: var(--primary); }
.price-old { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.price-unit { font-size: 11px; color: var(--text-muted); }
.product-card-footer { padding: 0 12px 12px; display: flex; gap: 6px; }

/* -- Buttons -- */
.btn-primary { background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); height: 38px; padding: 0 16px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); border-radius: var(--radius-sm); height: 38px; padding: 0 16px; font-weight: 600; font-size: 13px; }
.btn-ghost:hover { background: var(--surface-subtle-sky); }
.btn-danger { background: #dc2626; color: #fff; border: none; border-radius: var(--radius-sm); height: 38px; padding: 0 16px; font-weight: 600; font-size: 13px; }
.btn-danger:hover { background: #b91c1c; }
.btn-wa { background: var(--whatsapp-green); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wa:hover { background: var(--whatsapp-green-hover); }
.btn-icon-sm { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: #fff; color: var(--text-body); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon-sm:hover { border-color: var(--primary); color: var(--primary); }

/* -- Forms -- */
.form-label { font-size: 13px; font-weight: 600; color: var(--text-body); margin-bottom: 4px; display: block; }
.form-input, .form-select, .form-textarea {
  width: 100%; height: 42px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm);
  padding: 0 14px; font-size: 14px; background: #fff; color: var(--text-primary);
}
.form-textarea { height: auto; padding: 10px 14px; min-height: 90px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-light); }
.form-group { margin-bottom: 16px; }

/* -- Cards / KPI (Admin Dashboard) -- */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.stat-card { padding: 18px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }
.insight-card { background: linear-gradient(135deg, var(--primary), #6e232a); color: #fff; border-radius: var(--radius-md); padding: 20px; }
.insight-card li { margin-bottom: 8px; font-size: 13.5px; }

/* -- Tables (Admin) -- */
.table-wrap { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-color); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
table.data-table thead th { background: var(--primary); color: #fff; font-weight: 600; padding: 10px 14px; text-align: left; white-space: nowrap; }
table.data-table tbody td { padding: 10px 14px; border-top: 1px solid var(--border-color); vertical-align: middle; }
table.data-table tbody tr:hover { background: var(--surface-subtle-sky); }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); }
.status-pill.aktif { background: #dcfce7; color: #15803d; }
.status-pill.nonaktif { background: #f1f5f9; color: #64748b; }

/* -- Admin Tabs (mengikuti referensi dashboard) -- */
.admin-tabbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-tab-active { background: var(--primary); color: #fff; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 13px; font-weight: 700; }

/* -- Modal -- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.hidden { display: none; }
.modal-box { background: var(--bg-secondary); border-radius: var(--radius-md); width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.modal-box.modal-lg { max-width: 640px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.modal-header h5 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 16px; color: var(--text-muted); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-color); }

/* -- Toast -- */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(360px, 90vw); }
.toast-item { background: var(--bg-secondary); color: var(--text-primary); border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(0,0,0,.15); padding: 12px 16px; border-left: 4px solid var(--primary); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: toastIn .2s ease; }
.toast-item.success { border-left-color: #16a34a; }
.toast-item.danger { border-left-color: #dc2626; }
.toast-item.warning { border-left-color: #d97706; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px);} to {opacity:1; transform:none;} }

/* -- Cart / Order Summary -- */
.cart-item { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: #fff; margin-bottom: 12px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; width: fit-content; }
.qty-stepper button { width: 30px; height: 30px; background: var(--surface-subtle-sky); border: none; color: var(--primary); font-weight: 700; }
.qty-stepper span { width: 40px; text-align: center; font-weight: 700; font-size: 13px; }
.qty-stepper .qty-input { width: 40px; text-align: center; font-weight: 700; font-size: 13px; border: none; border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); height: 30px; -moz-appearance: textfield; }
.qty-stepper .qty-input::-webkit-outer-spin-button, .qty-stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* -- Empty State -- */
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-muted); }
.empty-state i { font-size: 40px; color: var(--border-color); margin-bottom: 12px; display: block; }

/* -- Pagination -- */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn { min-width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: #fff; font-size: 13px; font-weight: 600; color: var(--text-body); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; }

/* -- Login Admin -- */
.login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-card-hover); padding: 32px; }

.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

/* ============================================================
   TAMPILAN MOBILE - perkecil huruf & rapikan tata letak
   agar lebih profesional di layar HP (<=640px)
   ============================================================ */
@media (max-width: 640px) {
  html { font-size: 15px; } /* skala turun semua ukuran berbasis rem (util Tailwind) */

  /* -- Navbar & Brand -- */
  .navbar-main { padding: 8px 14px; gap: 10px; }
  .brand-title { font-size: 17px; }
  .brand-badge { font-size: 9px; }
  .brand-logo { height: 24px; }
  .navbar-actions { gap: 6px; }
  .cart-btn, .admin-link, .mobile-nav-toggle { width: 34px; height: 34px; font-size: 14px; }
  .mobile-search-row { right: 0; left: auto; }

  /* -- Hero -- */
  .hero-title { font-size: 22px; line-height: 1.2; }
  .hero-badge { font-size: 8.5px; padding: 3px 9px; }
  .pill-feature { font-size: 11px; padding: 5px 10px; }

  /* -- Widget & Sektor -- */
  .widget-item { font-size: 11px; padding: 10px 8px; }
  .widget-item i { font-size: 17px; }
  .sector-tag { font-size: 10px; padding: 3px 8px; }

  /* -- Kartu Produk -- */
  .product-title { font-size: 12.5px; min-height: 32px; }
  .product-desc { font-size: 10px; }
  .product-umkm, .price-unit { font-size: 10px; }
  .price-now { font-size: 13px; }
  .price-old { font-size: 11px; }
  .badge-discount, .badge-category, .badge-rating { font-size: 9px; padding: 2px 6px; }

  /* -- Chip & Tag -- */
  .chip { height: 30px; padding: 0 12px; font-size: 11.5px; }
  .tag-quick { font-size: 11px; }

  /* -- Tombol -- */
  .btn-primary, .btn-ghost, .btn-danger, .btn-wa { height: 34px; padding: 0 12px; font-size: 12px; }
  .btn-icon-sm { width: 34px; height: 34px; }

  /* -- Judul Section & Body Text -- */
  h1.text-xl, h1.text-2xl { font-size: 18px !important; }
  h2.text-xl { font-size: 16px !important; }
  .card, .stat-card { padding: 14px !important; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 10.5px; }

  /* -- Form & Tabel Admin -- */
  .form-input, .form-select, .form-textarea { height: 38px; font-size: 13px; }
  .form-label { font-size: 12px; }
  table.data-table { font-size: 11.5px; }
  table.data-table thead th, table.data-table tbody td { padding: 8px 10px; }

  /* -- Footer: kecil banget & rata tengah, tidak menyamping -- */
  .public-footer { padding: 16px 14px; font-size: 11px; }
  .public-footer p.italic { font-size: 11px; }
  .footer-bottom {
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 2px; font-size: 9.5px; margin-top: 10px;
  }
}
