/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1.2;
  transition: transform .15s, background-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn--sm { padding: 8px 16px; font-size: .9rem; }
.btn--block { width: 100%; }

.btn--shopee { background: var(--shopee); color: #fff; box-shadow: 0 8px 18px -8px rgba(238, 77, 45, .7); }
.btn--shopee:hover { background: var(--shopee-dark); }
.btn--orange { background: var(--orange); color: #fff; box-shadow: 0 8px 18px -8px rgba(255, 138, 52, .8); }
.btn--orange:hover { background: var(--orange-dark); }
.btn--yellow { background: var(--honey-light); color: var(--ink); }
.btn--outline { border-color: var(--cocoa); color: var(--cocoa-dark); background: #fff; }
.btn--outline:hover { background: var(--cocoa); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,.8); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--cocoa-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.round-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--sage); font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center; box-shadow: var(--shadow);
}

/* ========== Section title ========== */
.section { padding: 56px 0; }
.section--tight { padding: 28px 0; }
.section-title { text-align: center; margin-bottom: 24px; }
.section-title h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.section-title h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
  background: var(--honey-light); margin: 8px auto 0;
}
.section-title p { color: var(--muted); margin-top: 8px; }

.card-panel { background: var(--surface); border-radius: var(--radius-lg); padding: 40px 32px; box-shadow: var(--shadow); }

/* ========== Tabs ========== */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tab {
  padding: 6px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  color: var(--muted); background: var(--soft);
}
.tab[aria-selected="true"] { background: var(--orange); color: #fff; }

/* ========== Product card ========== */
.product-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 36px;
}
.product {
  display: flex; flex-direction: column; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.gallery { position: relative; aspect-ratio: 1 / 1; background: var(--soft); }
.gallery__track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery__dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(62,46,36,.25); box-shadow: 0 0 0 1.5px rgba(255,255,255,.9); transition: width .2s; }
.gallery__dots span.is-active { width: 18px; border-radius: 4px; background: var(--orange); }
.gallery__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.92);
  font-size: 1.2rem; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12);
  opacity: 0; transition: opacity .2s;
}
.gallery__nav--prev { left: 8px; }
.gallery__nav--next { right: 8px; }
.product:hover .gallery__nav { opacity: 1; }
@media (hover: none) { .gallery__nav { display: none; } }
.gallery__count { position: absolute; top: 10px; right: 10px; background: rgba(62,46,36,.7); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

.product__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product__cat { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cocoa); }
.product__name { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.product__price { color: var(--orange-dark); font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.product__body .btn { margin-top: auto; }

/* Skeleton */
.product--skeleton .gallery,
.product--skeleton .sk { background: linear-gradient(90deg, #F6ECDD 25%, #FCF7EF 50%, #F6ECDD 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.product--skeleton .sk { height: 14px; border-radius: 6px; margin: 4px auto; width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ========== Placeholder (dipakai kalau belum ada foto) ========== */
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; background: var(--soft); }
.placeholder svg { width: 62%; height: 62%; }

.empty-state { text-align: center; color: var(--muted); margin: -12px 0 32px; }

/* ========== Floating WhatsApp ========== */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp);
  display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4);
}
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

@media (max-width: 520px) {
  .card-panel { padding: 28px 14px; border-radius: var(--radius); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product__body { padding: 10px; }
  .product__name { font-size: .92rem; }
  .product__body .btn { padding: 8px 10px; font-size: .82rem; }
}
