:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #ea580c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* header */
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.actions { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.actions form.inline { display: inline; }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 4px 6px;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 14px;
}
.mobile-menu.open { display: flex; }
.mobile-menu form.inline { display: block; }

@media (max-width: 640px) {
  .actions { display: none; }
  .burger { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: #cbd5e1; text-decoration: none; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-block { width: 100%; justify-content: center; }

/* hero */
.hero {
  background: linear-gradient(180deg, #ecfdf5 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { padding: 36px 20px 22px; }
.hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -.02em;
}
.hero p.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 18px;
}

/* tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.tabs a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.tabs a:hover { text-decoration: none; border-color: #cbd5e1; }
.tabs a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

main.wrap { padding-top: 32px; padding-bottom: 88px; }

/* listing grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 16px;
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(15,23,42,.05), 0 16px 32px -14px rgba(15,23,42,.18); }
.card .thumb {
  aspect-ratio: 16 / 10;
  background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") no-repeat center / 28px;
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-dark); }
.card h2 { font-size: 14.5px; line-height: 1.3; margin: 0; }
.card h2 a { color: var(--ink); }
.card h2 a:hover { text-decoration: none; color: var(--primary-dark); }
.card .summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.card .price { font-weight: 800; font-size: 14px; color: var(--ink); }
.card .price small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.sold { background: #fee2e2; color: #991b1b; }
.badge.inactive { background: #f1f5f9; color: #475569; }
.badge.pending { background: #fef3c7; color: #92400e; }

/* listing detail */
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.detail-title { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin: 4px 0 10px; letter-spacing: -.01em; }
.detail-sub { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.kicker-pill {
  display: inline-block;
  background: #ecfdf5;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 999px;
}
.price-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.price-box .usd { font-size: 28px; font-weight: 800; }
.price-box .idr { color: var(--muted); font-size: 15px; }

/* gallery / slider */
.gallery { position: relative; margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; background: #f1f5f9; }
.gallery .track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.gallery .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,23,42,.55);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery .nav:hover { background: rgba(15,23,42,.8); }
.gallery .prev { left: 12px; }
.gallery .next { right: 12px; }
.gallery .dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.gallery .dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 0;
}
.gallery .dots button.active { background: #fff; }

@media (max-width: 640px) {
  .gallery .track img { height: 280px; }
  .gallery { margin-left: -20px; margin-right: -20px; border-radius: 0; }
  .gallery .nav { display: none; }
}

.content-body { line-height: 1.55; font-size: 15px; color: #1e293b; margin-bottom: 24px; }
.content-body p { margin: 0 0 10px; }
.content-body ul { margin: 0 0 10px; padding-left: 20px; }
.content-body li { margin-bottom: 3px; }
.content-body hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

.contact-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.contact-box h3 { margin: 0 0 8px; font-size: 15px; }

.back-link { display: inline-block; margin-top: 8px; font-size: 14px; }

/* footer */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

/* forms */
form.stack { display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
form.stack label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; }
input, textarea, select, button { font: inherit; }
input[type=text], input[type=number], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 220px; resize: vertical; }
form.inline { display: inline; }

.visually-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 4px;
}
.photo-tile {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f1f5f9;
  flex: 0 0 auto;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.removed { opacity: .3; }
.photo-tile .remove-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15,23,42,.7);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.photo-tile.add-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border-style: dashed;
}
.photo-tile.add-tile:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 640px) {
  .hero .wrap { padding: 32px 16px 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .card .body { padding: 12px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}
