/* ModeKita — tokens. Semua warna, font, dan jarak hidup di sini. */
:root {
  --white: #ffffff;
  --surface: #f5f4f0;
  --ink: #141414;
  --muted: #5c5a55;
  --accent: #166534;
  --accent-dark: #14532d;
  --line: #e3e1dc;
  --line-strong: #c9c6bf;
  --focus: #166534;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-card: 20px;
  --radius-img: 8px;
  --radius-dialog: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.08);
  --shadow-dialog: 0 2px 4px rgb(0 0 0 / 0.08), 0 16px 48px rgb(0 0 0 / 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 60;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  transition: top 150ms ease-out;
}

.skip-link:focus { top: 8px; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
}

.brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-dot { color: var(--accent); }

.header-search { flex: 1; max-width: 480px; margin-left: auto; }

.header-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.header-search input::placeholder { color: var(--muted); }

.category-nav {
  display: flex;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}

.chip[aria-pressed="true"] {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.btn-primary { color: var(--white); background: var(--accent); }
.btn-ghost { color: var(--ink); background: var(--white); border-color: var(--line-strong); }

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 40px;
  background: var(--surface);
}

.hero-kicker {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 56ch;
}

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

.hero-proof {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-photo { position: relative; margin: 0; }

.hero-photo-chip {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  outline: 1px solid rgb(0 0 0 / 0.1);
  outline-offset: -1px;
}

/* Satu momen gerak: hero muncul bertahap saat halaman dibuka. */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-kicker, .hero h1, .hero-sub, .hero-actions, .hero-proof, .hero-photo {
  animation: hero-rise 700ms ease-out both;
}

.hero h1 { animation-delay: 100ms; }
.hero-sub { animation-delay: 200ms; }
.hero-actions { animation-delay: 300ms; }
.hero-proof { animation-delay: 400ms; }
.hero-photo { animation-delay: 200ms; }

/* ---------- Katalog ---------- */
.catalog {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 56px;
  scroll-margin-top: 140px;
}

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.catalog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

.result-count { margin: 0; color: var(--muted); }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}

.sort-label { font-weight: 500; color: var(--muted); }

.catalog-toolbar select {
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.product-card {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}

.product-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--radius-img);
  cursor: pointer;
  overflow: hidden;
}

.product-photo-btn img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-img);
  outline: 1px solid rgb(0 0 0 / 0.1);
  outline-offset: -1px;
  transition: transform 250ms ease-out;
}

.product-name {
  margin: 12px 0 4px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.product-meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.product-price-old {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: line-through;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.product-photo-wrap { position: relative; }

.badge-baru { color: var(--white); background: var(--accent); }
.badge-promo { color: var(--white); background: var(--ink); }
.badge-habis { color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); }

.product-card.is-out { opacity: 0.92; }
.product-card.is-out .product-photo-btn img { filter: grayscale(0.5); }

.out-note {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* Elemen khas: garis bawah tinta saat nama produk disentuh. */
@media (hover: hover) {
  .product-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
  .product-photo-btn:hover img { transform: scale(1.03); }
  .product-card:hover .product-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .btn-primary:hover { background: var(--accent-dark); }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn:active { transform: scale(0.98); }
  .chip:hover { border-color: var(--ink); }
  .chip[aria-pressed="true"]:hover { background: var(--accent-dark); }
}

.empty-state {
  padding: 56px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
}

.empty-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.empty-sub { margin: 0 0 20px; color: var(--muted); }

/* ---------- Cara order ---------- */
.howto {
  background: var(--accent-dark);
  color: var(--white);
}

.howto-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 56px;
}

.howto-inner h2 {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

.howto-steps {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.howto-num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #7fb894;
}

.howto-steps h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.howto-steps p { margin: 0; color: #d8d5cf; }

@media (min-width: 768px) {
  .howto-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ---------- Info strip ---------- */
.info-strip {
  display: grid;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.info-item {
  padding: 24px;
  background: var(--surface);
  border-radius: 16px;
}

.info-item h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.info-item p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: grid;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}

.footer-logo {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.footer-logo span { color: #7fb894; }

.footer-brand p { margin: 0; color: #d8d5cf; }

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.footer-contact ul { margin: 0; padding: 0; list-style: none; }

.footer-contact li { margin-bottom: 8px; color: #d8d5cf; }

.footer-contact a { color: var(--white); }

.footer-note {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 32px;
  font-size: 14px;
  color: #a8a49d;
}

/* ---------- Dialog produk ---------- */
.product-dialog {
  width: calc(100% - 32px);
  max-width: 880px;
  max-height: calc(100dvh - 32px);
  padding: 16px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius-dialog);
  box-shadow: var(--shadow-dialog);
  overscroll-behavior: contain;
}

.product-dialog::backdrop { background: rgb(20 20 20 / 0.55); }

.dialog-close-form {
  display: flex;
  justify-content: flex-end;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.dialog-body {
  display: grid;
  gap: 20px;
}

.dialog-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-img);
  outline: 1px solid rgb(0 0 0 / 0.1);
  outline-offset: -1px;
}

/* Di HP foto dialog lebih pendek supaya tombol WhatsApp tidak jauh di bawah. */
@media (max-width: 767px) {
  .dialog-photo img { aspect-ratio: 4 / 3; }
}

.dialog-info h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.dialog-category { margin: 0 0 12px; color: var(--muted); }

.dialog-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
}

.dialog-desc { margin: 0 0 20px; color: var(--muted); }

.size-label { margin: 0 0 8px; font-weight: 600; }

.size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.size-btn {
  min-width: 48px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}

.size-btn[aria-pressed="true"] {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.size-hint { margin: 0 0 20px; font-size: 14px; color: var(--muted); }

.dialog-wa { width: 100%; }

.dialog-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.stock-out-text {
  margin: 0 0 20px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Lebar besar ---------- */
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .info-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.2fr 1fr; }
  .dialog-body { grid-template-columns: 1fr 1fr; align-items: start; }
  .dialog-photo img { aspect-ratio: 4 / 5; }
}

@media (min-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; padding: 64px 20px 56px; }
  .hero h1 { font-size: 56px; }
  .hero-photo img { aspect-ratio: 4 / 5; }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .category-nav { justify-content: center; overflow-x: visible; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-kicker, .hero h1, .hero-sub, .hero-actions, .hero-proof, .hero-photo { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
