/* =========================================================
   Arto Printing — komponen
   Tab, chip, pencarian, kartu produk, badge, state kosong, tombol bagikan,
   alamat & peta. Dipakai lebih dari satu halaman.
   ========================================================= */

/* ---------- Katalog ---------- */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: thin;
}
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { border-color: var(--ink); }
.tab:focus-visible { outline-offset: 2px; }
.tab .count {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-mute);
  background: var(--sheet);
  border-radius: 999px;
  padding: 2px 8px;
}
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab[aria-selected="true"] .count { background: rgba(255,255,255,.16); color: #fff; }

.catalog-intro { margin: 0; color: var(--ink-soft); max-width: 48rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--teal-tint); border-color: var(--teal-deep); color: var(--ink); }
.chip .chip-count {
  margin-left: 6px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-mute);
}
.chip[aria-pressed="true"] .chip-count { color: var(--teal-deep); }
.search {
  position: relative;
  flex: 0 1 280px;
  margin-left: auto;
}
.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .95rem;
}
.search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,165,157,.2); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-mute); }
@media (max-width: 640px) { .search { flex: 1 1 100%; margin-left: 0; } }

.result-meta { color: var(--ink-mute); font-size: .9rem; margin: 0 0 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px 20px;
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--sheet);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform .35s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card:focus-visible { outline: none; }
.card:focus-visible .card-media { outline: 3px solid var(--teal); outline-offset: 3px; }
.badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: 0 1px 0 var(--line);
}
.badge.ready { background: var(--teal-deep); color: #fff; }
.card-title {
  font-weight: 700;
  font-size: .98rem;
  margin: 12px 0 2px;
  line-height: 1.3;
}
.card-sub { font-size: .86rem; color: var(--ink-mute); margin: 0; }
.card-ext { font-size: .8rem; color: var(--teal-deep); font-weight: 700; margin-top: 4px; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--ink-soft);
}
.empty button { margin-top: 12px; }

.load-row { display: flex; justify-content: center; margin-top: 40px; }

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .92rem;
}
.share a, .share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.share button.copy { width: auto; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.share a:hover, .share button:hover { border-color: var(--ink); }
.share svg { width: 18px; height: 18px; }

/* maskot kecil di state kosong */
.empty-mascot { width: 72px; margin: 0 auto 8px; }

/* ---------- Alamat & peta (beranda dan artikel) ---------- */
.address {
  display: flex;
  gap: 10px;
  color: var(--ink-soft);
  font-size: .95rem;
  max-width: 34rem;
}
.address svg { width: 20px; height: 20px; flex: none; color: var(--teal-deep); margin-top: 2px; }
.map {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--sheet);
}
@media (max-width: 860px) {
  .map { min-height: 320px; }
}

/* ---------- Testimoni (ulasan.json) — halaman Testimoni & cuplikan di Beranda ---------- */
.reviews-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.reviews-top .section-head { margin-bottom: 0; }
.reviews {
  columns: 3 300px;
  column-gap: 20px;
}
.review {
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 20px 22px;
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.review blockquote {
  margin: 0 0 14px;
  font-size: .98rem;
  line-height: 1.6;
  color: var(--ink);
}
.review figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .92rem;
}
.review figcaption img {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sheet);
}
.review .avatar-fallback {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  color: #fff;
  background: var(--ink);
}
.review.tone-c { border-top: 4px solid var(--teal); }
.review.tone-m { border-top: 4px solid var(--royal); }
.review.tone-y { border-top: 4px solid var(--ink); }

/* foto produk gagal dimuat -> logo pengganti */
.card-media img.img-fallback,
.detail-media img.img-fallback { object-fit: contain; padding: 22%; opacity: .55; }

/* ---------- Langkah pemesanan (.steps) — Cara Pesan & Beranda ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 56px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--c, var(--teal));
}
.steps li:nth-child(1) { --c: var(--teal-deep); }
.steps li:nth-child(2) { --c: var(--royal); }
.steps li:nth-child(3) { --c: var(--ink); }
.steps li:nth-child(4) { --c: var(--teal-deep); }
.steps li::before { color: #fff; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px; left: 52px; right: -10px;
  border-top: 1.5px dashed var(--line);
}
.steps h2,
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .steps li::after { display: none; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pita ajakan (.cta-band) — Beranda, Layanan, Cara Pesan ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--teal-tint);
  border-radius: var(--r-lg);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.1;
  margin: 0 0 6px;
}
.cta-band p { margin: 0; color: var(--ink-soft); max-width: 40rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Kerangka (skeleton) sebelum data dimuat — mencegah tata letak bergeser (CLS) ---------- */
/* kerangka kartu saat data dimuat */
.card.skeleton .card-media,
.card.skeleton .card-title,
.card.skeleton .card-sub {
  background: linear-gradient(90deg, var(--sheet) 25%, #e7ebf0 50%, var(--sheet) 75%);
  background-size: 200% 100%;
  animation: kilau 1.2s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.card.skeleton .card-media { border-radius: var(--r-md); }
.card.skeleton .card-title { height: 14px; width: 70%; }
.card.skeleton .card-sub { height: 12px; width: 40%; margin-top: 6px; }
@keyframes kilau { to { background-position: -200% 0; } }

.pill-skeleton,
.teks-skeleton {
  display: inline-block;
  flex: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #e6eaef 25%, #eef1f4 50%, #e6eaef 75%);
  background-size: 200% 100%;
  animation: kilau 1.2s ease-in-out infinite;
}
.teks-skeleton { display: block; height: 1em; width: 92%; margin: .45em 0; border-radius: 6px; }
.teks-skeleton.pendek { width: 60%; }
.teks-skeleton.judul { height: 1.3em; width: 70%; margin-bottom: 1em; }
.teks-skeleton.nama { width: 40%; margin-top: 1em; }
.teks-skeleton.judul-besar { height: 2.6em; width: 80%; margin-bottom: 1em; }
.teks-skeleton.blok { height: 9em; border-radius: var(--r-md); margin-top: 1.2em; }
.skeleton-review { min-height: 150px; }
.skeleton-group { min-height: 200px; }
.skeleton-media { aspect-ratio: 4 / 5; }
