:root {
  --blue-900: #0b1f4b;
  --blue-700: #123a8c;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-100: #dbeafe;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 40, 116, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.accent { color: var(--blue-600); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { font-size: 22px; font-weight: 800; color: var(--blue-900); text-decoration: none; letter-spacing: 0.5px; }
.brand span { color: var(--blue-600); }

.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--blue-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { background: var(--blue-500); }

.btn-outline { background: transparent; color: #fff; border: 2px solid var(--blue-600); }
.btn-outline:hover { background: var(--blue-100); }

.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border: 1px solid #d1d5db; color: var(--ink); }
.btn-ghost:hover { background: #f3f4f6; }
.btn-danger { background: #dc2626; color: #fff; }

.nav-cta { padding: 9px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-600) 100%);
  color: #fff;
  padding: 84px 0 76px;
}

.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }

.hero-text h1 { font-size: 40px; line-height: 1.2; margin-bottom: 16px; }
.hero-text p { font-size: 17px; opacity: 0.92; max-width: 540px; margin-bottom: 28px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.hero-card-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.hero-card p { font-size: 14px; opacity: 0.9; margin-bottom: 14px; }

.hero-list { list-style: none; }
.hero-list li { padding: 6px 0 6px 26px; position: relative; font-size: 15px; }
.hero-list li::before { content: ""; position: absolute; left: 0; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #34d399; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-title { font-size: 30px; color: var(--blue-900); text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 40px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Slider ---------- */
.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-viewport {
  overflow: hidden;
  flex: 1;
  border-radius: var(--radius);
}

.slider-track {
  display: flex;
  transition: transform 0.4s ease;
}

.slider-track .product-card {
  flex: 0 0 calc(100% / 3 - 18px);
  margin-right: 26px;
}

.testimonial-card {
  flex: 0 0 calc(100% / 3 - 18px);
  margin-right: 26px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.testimonial-img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  display: block;
  background: #f3f4f6;
}
.testimonial-body { padding: 14px 18px; }
.testimonial-body p { font-size: 14px; color: var(--blue-900); font-weight: 600; text-align: center; }

.slider-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--blue-600);
  background: #fff;
  color: var(--blue-600);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 2;
}
.slider-btn:hover { background: var(--blue-600); color: #fff; }
.slider-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.loading { text-align: center; color: var(--muted); padding: 40px 0; width: 100%; }

.product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); }

.product-img-placeholder {
  height: 170px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 30px; font-weight: 800; letter-spacing: 1px;
}
.product-img { width: 100%; height: 190px; object-fit: cover; }

.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

.product-name { font-size: 17px; font-weight: 700; color: var(--blue-900); margin-bottom: 6px; }
.product-desc { font-size: 14px; color: var(--muted); flex: 1; margin-bottom: 14px; }

.product-meta { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-top: auto; }

.product-price { font-size: 20px; font-weight: 800; color: var(--blue-600); }
.product-unit { font-size: 13px; color: var(--muted); }

.product-stock { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); }
.product-stock.out { background: #fee2e2; color: #b91c1c; }

/* ---------- Compare ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.compare-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.compare-best { border-color: var(--blue-600); position: relative; }
.compare-badge {
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--blue-600);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.compare-card h3 { font-size: 18px; color: var(--blue-900); margin-bottom: 14px; }
.compare-card ul { list-style: none; }
.compare-card li {
  padding: 7px 0 7px 26px;
  position: relative;
  font-size: 14px;
  color: var(--ink);
}
.compare-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.compare-best li::before { background: #34d399; }
.compare-card:not(.compare-best) li::before { background: #f87171; }

/* ---------- Usage ---------- */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}
.usage-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.usage-item:hover { transform: translateY(-4px); }
.usage-icon { font-size: 34px; display: block; margin-bottom: 8px; }
.usage-item p { font-size: 14px; font-weight: 600; color: var(--blue-900); }

/* ---------- Delivery ---------- */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 860px;
  margin: 0 auto;
}
.delivery-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.delivery-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-900);
  transition: background 0.2s;
}
.delivery-head:hover { background: var(--blue-100); }
.delivery-arrow {
  font-size: 14px;
  color: var(--blue-600);
  transition: transform 0.25s ease;
}
.delivery-item.open .delivery-arrow { transform: rotate(180deg); }
.delivery-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.delivery-item.open .delivery-body { max-height: 240px; }
.delivery-body ul { list-style: none; padding: 0 18px 16px; }
.delivery-body li {
  padding: 7px 0 7px 22px;
  position: relative;
  font-size: 14px;
  color: var(--ink);
  border-top: 1px solid #f0f2f5;
}
.delivery-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
}

.gallery-card {
  flex: 0 0 calc(100% / 3 - 18px);
  margin-right: 26px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.gallery-img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  display: block;
  background: #f3f4f6;
}

/* ---------- Delivery Highlights ---------- */
.delivery-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}
.delivery-highlight {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.dh-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-600);
  margin-bottom: 4px;
}
.dh-label { font-size: 14px; color: var(--muted); }

.dh-free-ongkir {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-600);
  margin-top: 34px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }

.feature { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; margin-bottom: 14px;
}
.feature h3 { font-size: 16px; margin-bottom: 6px; color: var(--blue-900); }
.feature p { font-size: 14px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card {
  max-width: 520px; margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.contact-card p { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: rgba(255, 255, 255, 0.85); text-align: center; padding: 22px 0; font-size: 14px; }

/* ---------- WA float ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: #25d366; color: #fff; text-decoration: none;
  padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.wa-float:hover { filter: brightness(1.05); }

/* ---------- Forms / Admin ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--blue-900); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 11px 13px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

.field-error {
  position: relative; bottom: -10px; text-align: center;
  color: #b91c1c; font-size: 14px; margin-top: 10px;
}

.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--blue-900); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 600; z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #dc2626; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 48px 20px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-size: 26px; color: var(--blue-900); }

.admin-actions { display: flex; gap: 10px; }

.card { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 24px; }
.card h2 { font-size: 18px; color: var(--blue-900); margin-bottom: 16px; }

.login-box { max-width: 400px; margin: 60px auto; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e5e7eb; font-size: 14px; vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-table input, .admin-table textarea { width: 100%; }

.admin-table .price-input { max-width: 130px; }
.admin-table .unit-input { max-width: 110px; }
.admin-table .btn { padding: 8px 14px; font-size: 13px; }

.admin-table-wrap { overflow-x: auto; }

.row-actions { display: flex; gap: 8px; }

.empty-state { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Toggle Switch ---------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.25s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--blue-600); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-900);
}

.f-img-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.f-img-placeholder {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
}
.f-image-url {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.f-image-url:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

.img-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.img-upload-preview {
  width: 80px;
  height: 80px;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f9fafb;
  cursor: pointer;
  flex-shrink: 0;
}
.img-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-upload-icon {
  font-size: 28px;
  color: #9ca3af;
  font-weight: 300;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-remove-img { color: #dc2626; }

.f-img-preview-wrap {
  margin-bottom: 4px;
}
.f-img-preview-wrap .f-img-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 30px; }
  .nav { display: none; }
}

@media (max-width: 900px) {
  .slider-track .product-card, .testimonial-card, .gallery-card { flex: 0 0 calc(50% - 13px); }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 52px; }
  .slider-track .product-card, .testimonial-card, .gallery-card { flex: 0 0 100%; }
  .slider-btn { width: 34px; height: 34px; font-size: 14px; }
}