/* ============================================================
   digimycam — sistem reka bentuk
   Rose  #E8407F  utama, butang, harga
   Plum  #2B1721  teks
   Blush #FFF5F8  latar
   Lilac #EDE4FB  pasangan gradien
   Mauve #9C8894  teks sekunder
   ============================================================ */

:root {
  --rose: #e8407f;
  --rose-dark: #c72a65;
  --rose-soft: #ffd9e7;
  --plum: #2b1721;
  --blush: #fff5f8;
  --lilac: #ede4fb;
  --mauve: #9c8894;
  --line: #f3dde6;
  --green: #0e8a5f;
  --amber: #b8791f;
  --paper: #ffffff;

  --display: 'Fraunces', Georgia, serif;
  --body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --data: 'Space Grotesk', ui-monospace, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --bottom-bar: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--body);
  background: var(--blush);
  color: var(--plum);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  padding-bottom: calc(var(--bottom-bar) + env(safe-area-inset-bottom));
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}

/* Logo Y2K — kesan pelekat berlapis, dibuat dengan text-shadow */
.logo {
  font-family: var(--display);
  font-weight: 900;
  font-style: italic;
  font-size: 25px;
  letter-spacing: -0.02em;
  color: var(--rose);
  text-shadow:
    1px 1px 0 #fff, 2px 2px 0 #fff, 3px 3px 0 var(--rose-soft),
    4px 4px 0 var(--rose-soft), 5px 5px 0 #fbb8d2;
  line-height: 1;
  padding-right: 6px;
}
.logo .heart { font-style: normal; font-size: 0.7em; text-shadow: none; }

.topbar-links { display: none; gap: 22px; font-size: 14.5px; font-weight: 500; }
.topbar-links a:hover { color: var(--rose); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--lilac) 0%, #fde7f0 55%, var(--blush) 100%);
  padding: 22px 0 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(26px, 7vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 13ch;
  margin: 0 auto 10px;
}
.hero h1 em { color: var(--rose); font-style: italic; }
.hero p {
  color: #6b5560;
  font-size: 14px;
  max-width: 30ch;
  margin: 0 auto;
}
.badge-trust {
  display: inline-block;
  background: rgba(255,255,255,.85);
  border: 1px solid #fff;
  color: var(--rose-dark);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 14px;
  font-family: var(--data);
}

/* ---------- Penapis ---------- */
.filters { padding: 18px 0 4px; }
.filter-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--mauve); font-family: var(--data); margin-bottom: 8px;
}
.scroller {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 10px; margin-bottom: 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.scroller::-webkit-scrollbar { display: none; }

/* Bulatan warna — penapis utama */
.swatch {
  flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: center; gap: 5px; width: 52px;
}
.swatch .dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--line), inset 0 0 0 1px rgba(0,0,0,.07);
  transition: box-shadow .15s, transform .15s;
}
.swatch:hover .dot { transform: scale(1.06); }
.swatch.on .dot { box-shadow: 0 0 0 2.5px var(--rose); }
.swatch .nm { font-size: 10.5px; color: var(--mauve); font-weight: 500; }
.swatch.on .nm { color: var(--rose); font-weight: 700; }
.swatch .dot.all {
  background: conic-gradient(#f48fb1, #9575cd, #42a5f5, #e53935, #d4af6a, #f48fb1);
}

.chip {
  flex: 0 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 15px;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
}
.chip.on { background: var(--plum); color: #fff; border-color: var(--plum); }

/* ---------- Grid ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 16px 0 12px;
}
.section-head h2 {
  font-family: var(--display); font-style: italic;
  font-size: 22px; font-weight: 700;
}
.count { font-family: var(--data); font-size: 12px; color: var(--mauve); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 28px;
}

.card {
  background: var(--paper);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(232,64,127,.13); }

.card-img { position: relative; aspect-ratio: 1/1; background: #faeef3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .empty {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: #dcc3ce; font-size: 26px;
}

.tag-sold {
  position: absolute; inset: 0;
  background: rgba(43,23,33,.55);
  display: grid; place-items: center;
  color: #fff; font-family: var(--data); font-weight: 700;
  font-size: 13px; letter-spacing: .16em;
}
.tag-reserved {
  position: absolute; top: 8px; left: 8px;
  background: var(--amber); color: #fff;
  font-family: var(--data); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; padding: 3px 8px; border-radius: 99px;
}
.tag-sample {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(255,255,255,.94);
  color: var(--rose-dark);
  font-family: var(--data); font-size: 9.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
}

.card-body { padding: 10px 11px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card-brand {
  font-family: var(--data); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; color: var(--mauve);
}
.card-model { font-size: 14px; font-weight: 700; line-height: 1.25; }
.card-meta { font-family: var(--data); font-size: 11px; color: var(--mauve); }
.card-price {
  font-family: var(--data); font-size: 16px; font-weight: 700;
  color: var(--rose-dark); margin-top: auto; padding-top: 5px;
}
.card.sold .card-price { color: var(--mauve); text-decoration: line-through; }

/* Hati gred */
.hearts { display: flex; gap: 1.5px; font-size: 11px; line-height: 1; }
.hearts .h { color: var(--rose); }
.hearts .h.off { color: #f0dbe3; }

/* ---------- Halaman unit ---------- */
.gallery { background: var(--paper); border-bottom: 1px solid var(--line); }
.gallery-main { aspect-ratio: 4/3; background: #faeef3; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 7px; overflow-x: auto; padding: 9px 16px 12px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs img {
  width: 56px; height: 56px; flex: 0 0 auto; border-radius: 8px;
  object-fit: cover; border: 2px solid transparent; cursor: pointer;
}
.thumbs img.on { border-color: var(--rose); }

.unit-head { padding: 16px 0 6px; }
.unit-head .card-brand { margin-bottom: 3px; }
.unit-head h1 {
  font-family: var(--display); font-style: italic;
  font-size: 26px; font-weight: 700; line-height: 1.15;
}
.unit-id { font-family: var(--data); font-size: 11px; color: var(--mauve); }
.price-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.price-big { font-family: var(--data); font-size: 27px; font-weight: 700; color: var(--rose-dark); }
.status-pill {
  font-family: var(--data); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; padding: 4px 10px; border-radius: 99px;
}
.status-pill.available { background: #e3f5ed; color: var(--green); }
.status-pill.reserved { background: #fdf0dc; color: var(--amber); }
.status-pill.sold { background: #f0e6ea; color: var(--mauve); }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-bottom: 12px;
}
.panel h3 {
  font-family: var(--display); font-style: italic;
  font-size: 17px; margin-bottom: 10px;
}
.panel h3 .sub { font-family: var(--data); font-style: normal; font-size: 10px; color: var(--mauve); font-weight: 500; }

.spec { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-size: 13.5px; }
.spec dt { color: var(--mauve); }
.spec dd { font-family: var(--data); font-weight: 500; text-align: right; }

.tests-list { list-style: none; display: grid; gap: 7px; font-size: 13.5px; }
.tests-list li { display: flex; gap: 8px; align-items: flex-start; }
.tests-list .tick { color: var(--green); font-weight: 700; flex: 0 0 auto; }

.defects { background: #fffaf0; border-color: #f5e4c3; }
.defects h3 { color: #8a6417; }
.defects p { font-size: 13.5px; color: #5c4a26; white-space: pre-wrap; }

/* Sample shots — elemen tanda tangan */
.samples-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.samples-grid img { border-radius: var(--r-sm); aspect-ratio: 4/3; object-fit: cover; }
.samples-note {
  font-size: 12px; color: var(--mauve); margin-top: 9px;
  display: flex; gap: 6px; align-items: center;
}

.grade-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.grade-row .hearts { font-size: 17px; }
.grade-label { font-weight: 700; font-size: 14.5px; }
.grade-note { font-size: 12.5px; color: var(--mauve); }

/* ---------- Butang ---------- */
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rose); color: #fff;
  font-family: var(--body); font-size: 15.5px; font-weight: 700;
  padding: 14px; border-radius: 99px; border: none; width: 100%;
  box-shadow: 0 5px 16px rgba(232,64,127,.32);
  cursor: pointer;
}
.btn-wa:hover { background: var(--rose-dark); }
.btn-wa.off { background: #d6c5cd; box-shadow: none; pointer-events: none; }

/* ---------- Bar bawah (mobile) ---------- */
.bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottombar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: var(--bottom-bar);
  font-size: 10.5px; font-weight: 600; color: var(--mauve);
}
.bottombar a .ic { font-size: 17px; line-height: 1; }
.bottombar a.on { color: var(--rose); }
.bottombar a.wa { color: var(--rose); font-weight: 700; }

/* ---------- Halaman teks ---------- */
.page-head { padding: 24px 0 14px; text-align: center; }
.page-head h1 {
  font-family: var(--display); font-style: italic;
  font-size: 30px; font-weight: 700;
}
.page-head p { color: var(--mauve); font-size: 14px; margin-top: 5px; }

.steps { list-style: none; counter-reset: s; display: grid; gap: 11px; }
.steps li {
  counter-increment: s;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 15px 14px 52px; position: relative;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 14px; top: 13px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose); color: #fff;
  font-family: var(--data); font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.steps li b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.steps li span { font-size: 13px; color: var(--mauve); }

.excl { list-style: none; display: grid; gap: 7px; font-size: 13px; }
.excl li { display: flex; gap: 8px; }
.excl .x { color: var(--mauve); flex: 0 0 auto; }

.empty-state {
  text-align: center; padding: 44px 20px 70px; color: var(--mauve);
  grid-column: 1 / -1;
}
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

footer {
  text-align: center; padding: 26px 16px 34px;
  color: var(--mauve); font-size: 12px;
  border-top: 1px solid var(--line); margin-top: 26px;
}
footer a { color: var(--rose); font-weight: 600; }

/* ---------- Admin ---------- */
.admin-body { background: #f7f4f6; }
.form-grid { display: grid; gap: 12px; }
.field label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--mauve); margin-bottom: 4px;
  font-family: var(--data); letter-spacing: .04em;
}
.field input[type=text], .field input[type=number], .field input[type=password],
.field select, .field textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--body); font-size: 15px; background: #fff; color: var(--plum);
}
.field textarea { min-height: 74px; resize: vertical; }
.field .hint { font-size: 11.5px; color: var(--mauve); margin-top: 3px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.drop {
  display: flex; flex-direction: column; gap: 3px;
  border: 2px dashed #e4cdd7; border-radius: var(--r);
  padding: 18px 14px; text-align: center; background: #fff;
  cursor: pointer; margin-top: 10px;
}
.drop:hover, .drop:focus-within { border-color: var(--rose); }
.drop input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.drop-t { font-size: 14px; font-weight: 700; color: var(--plum); }
.drop-s { font-size: 12px; color: var(--mauve); line-height: 1.4; }
.drop.pink { border-color: #f3b9cf; background: #fff9fb; }
.drop.pink .drop-t { color: var(--rose-dark); }

/* Satu baris untuk semua ujian sekali gus */
.test-all {
  display: flex; gap: 11px; align-items: flex-start;
  background: #fff; padding: 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); cursor: pointer;
}
.test-all input { width: 19px; height: 19px; accent-color: var(--rose); flex: 0 0 auto; margin-top: 1px; }
.test-all b { font-size: 14px; }
.test-all small { font-size: 11.5px; color: var(--mauve); }

details > summary {
  cursor: pointer; font-size: 13px; font-weight: 700;
  color: var(--mauve); padding: 9px 0; list-style: none;
  display: flex; align-items: center; gap: 6px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; font-size: 15px; color: var(--rose); }
details[open] > summary::before { content: '\2212'; }
details > summary:hover { color: var(--rose); }
.panel.more { padding: 4px 15px; }
.panel.more > summary { padding: 11px 0; }

.check-grid { display: grid; gap: 7px; }
.check-grid label {
  display: flex; gap: 9px; align-items: center;
  font-size: 13.5px; background: #fff; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.check-grid input { width: 17px; height: 17px; accent-color: var(--rose); }

.btn {
  background: var(--rose); color: #fff; border: none;
  padding: 13px 20px; border-radius: 99px;
  font-family: var(--body); font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--rose-dark); }
.btn.ghost { background: #fff; color: var(--plum); border: 1px solid var(--line); }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.btn.danger { background: #fff; color: #c0392b; border: 1px solid #f0c9c4; }

.admin-list { display: grid; gap: 9px; }
.admin-row {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px; display: flex; gap: 11px; align-items: center;
}
.admin-row img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info b { font-size: 14px; display: block; }
.admin-row .info small { font-family: var(--data); font-size: 11px; color: var(--mauve); }
.admin-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.flash {
  background: #e3f5ed; color: var(--green); border: 1px solid #b8e3d1;
  padding: 11px 14px; border-radius: var(--r-sm);
  font-size: 13.5px; margin-bottom: 14px;
}
.flash.err { background: #fdecea; color: #c0392b; border-color: #f5c6c0; }

.photo-manage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 4px; }
.photo-manage .pm { position: relative; }
.photo-manage img { aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.photo-manage .rm {
  position: absolute; top: 3px; right: 3px;
  background: rgba(43,23,33,.82); color: #fff; border: none;
  width: 21px; height: 21px; border-radius: 50%;
  font-size: 13px; cursor: pointer; line-height: 1;
}

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .bottombar { display: none; }
  .topbar-links { display: flex; }
  .topbar .wrap { height: 66px; }
  .logo { font-size: 28px; }
  .hero { padding: 46px 0 50px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .card-model { font-size: 15px; }
  .unit-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; padding-top: 22px; }
  .gallery { border: 1px solid var(--line); border-radius: var(--r); position: sticky; top: 82px; }
  .gallery-main { border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
  .samples-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .photo-manage { grid-template-columns: repeat(8, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .card:hover { transform: none; }
}
