/* Leswan — halaman publik. Ringan: tanpa framework CSS, tanpa JS pihak ketiga.
   Palet: wine #621d25, gold #d4b483, ink #2b2523, cream #f2eee4 */

:root {
  --wine: #621d25;
  --wine-deep: #4a1219;
  --gold: #d4b483;
  --gold-soft: #e8d9bd;
  --ink: #2b2523;
  --cream: #f2eee4;
  --card-bg: #ffffff;
  --text: #2b2523;
  --text-soft: #6e5f53;
  --border: #e6dcc8;
  --radius: 16px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--cream) 0%, #ece3d1 100%);
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  min-height: 100vh;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 18px 60px;
}

.profile {
  text-align: center;
  margin-bottom: 24px;
}

.avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(43, 37, 35, 0.22);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  color: var(--gold-soft);
  font-family: 'Fraunces', serif;
  font-size: 34px;
}

.profile h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: .01em;
}
.tagline {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  letter-spacing: .02em;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(98, 29, 37, 0.09);
  border: 1px solid rgba(98, 29, 37, 0.12);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}
.tab-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--wine);
  cursor: pointer;
  border-radius: 999px;
  transition: color .2s ease;
}
.tab-btn.active { color: #fff; }
.tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  border-radius: 999px;
  transition: transform .25s ease;
  box-shadow: 0 4px 12px rgba(98, 29, 37, 0.35);
}
.tab-indicator[data-pos="1"] { transform: translateX(100%); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.links-list { display: flex; flex-direction: column; gap: 12px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.link-card:hover, .link-card:active {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 37, 35, 0.14);
  border-color: var(--gold);
}
.link-icon {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--wine);
  border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
}

.cat-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-filter::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cat-chip.active { background: var(--wine); border-color: var(--wine); color: #fff; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.product-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 37, 35, 0.14);
  border-color: var(--gold);
}
.product-photo-link { display: block; text-decoration: none; }

/* ---- Foto produk: rasio 1:1 yang DIPAKSA lewat teknik padding-box,
   sehingga tidak tergantung dukungan browser atas `aspect-ratio`. ---- */
.product-photo-box {
  position: relative;
  width: 100%;
  padding-top: 100%; /* memaksa tinggi = lebar, rasio 1:1 di semua browser */
  background: var(--gold-soft);
  overflow: hidden;
}
.product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-photo-box.is-skeleton {
  background: linear-gradient(100deg, var(--gold-soft) 30%, #f3ead8 50%, var(--gold-soft) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

.product-info { padding: 10px 12px 14px; }
.product-name {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--wine);
  font-weight: 700;
  margin-bottom: 8px;
}

.product-actions { display: flex; flex-direction: column; gap: 6px; }
.btn-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter .15s ease;
}
.btn-order svg { width: 13px; height: 13px; flex: none; }
.btn-order:hover { filter: brightness(0.94); }
.btn-shopee { background: var(--wine); color: #fff; }
.btn-wa { background: #25D366; color: #fff; }

@media (min-width: 420px) {
  .product-actions { flex-direction: row; }
  .btn-order { flex: 1; }
}

.empty-msg, .loading-msg {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 20px 0;
}
.loading-msg[hidden], .empty-msg[hidden] { display: none; }
.sentinel { height: 1px; }

.site-footer {
  text-align: center;
  margin-top: 40px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

@media (min-width: 700px) {
  .page { max-width: 720px; padding-top: 48px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
