* {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f3f4f6;
  --ink: #0a0a0a;
  --ink-2: #374151;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #ececef;
  --line-strong: #d1d5db;
  --accent: #0a0a0a;
  --accent-ink: #0a0a0a;
  --accent-soft: #f3f4f6;
  --accent-border: #e5e7eb;
  --brand-red: #cf1f2d;
  --sold: #4b5563;
  --sold-soft: #f3f4f6;
  --sold-border: #e5e7eb;
  --draft: #4b5563;
  --draft-soft: #f3f4f6;
  --draft-border: #e5e7eb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a,
button,
input,
select,
textarea,
label {
  touch-action: manipulation;
}

a {
  color: var(--accent-ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #f1f1f3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--brand-red);
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.topbar nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.topbar nav a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.topbar nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-soft);
  font-weight: 600;
}

/* ---------- Main Container ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 46px 40px 42px;
  border: 0;
  border-radius: 26px;
  margin: 4px 0 28px;
  overflow: hidden;
  background:
    radial-gradient(720px 320px at 88% -10%, rgba(59, 73, 255, 0.22), transparent 62%),
    radial-gradient(520px 260px at 6% 115%, rgba(207, 31, 45, 0.16), transparent 60%),
    var(--hero-bg, linear-gradient(135deg, #0a0a0f 0%, #111425 55%, #0b0b14 100%));
  color: #fff;
}

/* Latar hero terang: balik warna teks & kontrol agar tetap terbaca. */
.hero.hero-light { color: #14161a; }
.hero.hero-light h1 { color: #14161a; }
.hero.hero-light p { color: rgba(20, 22, 26, 0.74); }
.hero.hero-light .eyebrow {
  color: rgba(20, 22, 26, 0.78);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(20, 22, 26, 0.16);
}
.hero.hero-light .stat-pill {
  color: rgba(20, 22, 26, 0.72);
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(20, 22, 26, 0.14);
}
.hero.hero-light .stat-pill strong { color: #14161a; }
.hero.hero-light .hero-cta {
  background: #14161a;
  border-color: #14161a;
  color: #fff;
}
.hero.hero-light .hero-cta:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(255, 255, 255, 0.6), transparent 100%),
    radial-gradient(1.5px 1.5px at 72% 76%, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(2px 2px at 92% 18%, rgba(255, 255, 255, 0.5), transparent 100%);
  opacity: 0.8;
}

.hero-copy {
  max-width: 58ch;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(31px, 4.6vw, 48px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
  color: #fff;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  max-width: 46ch;
}

.hero .hero-cta {
  margin-top: 24px;
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hero .hero-cta:hover {
  background: #f3f4f6;
  border-color: #f3f4f6;
  color: #0a0a0a;
}

.hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.stat-pill strong {
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.available {
  background: #34d399;
}

.dot.sold {
  background: rgba(255, 255, 255, 0.35);
}

/* ---------- Catalog Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.search-box .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.search-box input {
  padding-left: 40px;
  padding-right: 36px;
  background: var(--bg-soft);
  border-color: transparent;
  border-radius: 999px;
  height: 46px;
  font-size: 14.5px;
  box-shadow: none;
}

.search-box input::placeholder {
  color: #9ca3af;
}

.search-box input:focus {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.search-clear:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-group {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0;
  gap: 6px;
}

.chip {
  border: 0;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chip:hover {
  color: var(--ink);
  background: #eceef1;
}

.chip.is-active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.sort-select {
  width: auto;
  height: 40px;
  padding: 0 32px 0 14px;
  border-radius: 999px;
  border-color: transparent;
  background: var(--bg-soft);
  font-size: 13.5px;
  box-shadow: none;
  cursor: pointer;
}

.result-count {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---------- Grid & Product Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 28px 20px;
}

.card {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover {
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  border-radius: 14px;
  overflow: hidden;
}

.card img,
.card .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-media img {
  transform: scale(1.035);
}

.card.is-sold .card-media img {
  filter: saturate(0.65) contrast(0.95);
}

.card-badge-float {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.sold-ribbon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(30, 24, 18, 0.28);
  pointer-events: none;
}

.sold-ribbon span {
  background: rgba(255, 255, 255, 0.94);
  color: var(--sold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-body {
  padding: 12px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card h3 a {
  text-decoration: none;
  color: var(--ink);
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card:hover h3 a {
  color: var(--accent-ink);
}

.card-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.price {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.card.is-sold .price {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.price.big {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em;
}

.meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

.cond-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

/* ---------- Placeholder ---------- */

.placeholder {
  background: linear-gradient(150deg, #f7f8fa 0%, #eceef2 100%);
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
}

.placeholder svg {
  opacity: 0.55;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink-2);
  border: 1px solid var(--accent-border);
  white-space: nowrap;
}

.card-badge-float {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.badge.terjual {
  background: var(--sold-soft);
  color: var(--sold);
  border-color: var(--sold-border);
}

.badge.draft {
  background: var(--draft-soft);
  color: var(--draft);
  border-color: var(--draft-border);
}

/* ---------- Detail Page ---------- */

.breadcrumb {
  margin-bottom: 20px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.back:hover {
  color: var(--ink);
  background: rgba(30, 27, 24, 0.05);
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.detail-media-wrap {
  position: sticky;
  top: 84px;
}

.detail-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.detail img.hero-img,
.detail .hero-img.placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: flex;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.detail-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.detail-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.detail-thumb.is-active {
  border-color: var(--ink);
}

.detail-thumb:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.zoom-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}

.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(24, 21, 18, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.detail-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: none;
}

.detail-panel h1 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 12px 0 8px;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.spec-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.spec-hint {
  font-size: 12px;
  color: var(--muted);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 8px;
}

.description {
  margin: 0 0 24px;
  color: var(--ink-2);
}

.description p {
  margin: 0 0 10px;
  white-space: normal;
}

.description p:last-child {
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sold-notice {
  background: var(--sold-soft);
  border: 1px solid var(--sold-border);
  color: var(--sold);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn.lg {
  padding: 12px 20px;
  font-size: 15px;
  flex: 1 1 210px;
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.ghost:hover {
  background: var(--bg-soft);
  border-color: var(--line-strong);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn.danger:hover {
  background: var(--danger-soft);
}

.btn.danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.danger-solid:hover {
  background: #962821;
  border-color: #962821;
}

.btn.small {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: 999px;
}

.btn.wa {
  background: #0a0a0a;
  border-color: #0a0a0a;
}

.btn.wa:hover {
  background: #1f2937;
  border-color: #1f2937;
}

/* ---------- Admin ---------- */

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-head h1 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em;
}

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-head-actions form {
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.stat-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  box-shadow: 0 0 0 1px var(--accent);
}

.stat-card .stat-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.stat-card .stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(249, 246, 241, 0.6);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .thumb img,
.admin-table .thumb .placeholder {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  display: flex;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 10px;
}

.admin-item-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.admin-table .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-table .actions form {
  margin: 0;
}

/* ---------- Forms & Auth ---------- */

.form-card,
.auth {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 680px;
  box-shadow: var(--shadow-sm);
}

.auth {
  max-width: 400px;
  margin: 36px auto;
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth h1 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 24px;
}

.auth-sub {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label,
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.field-hint {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
}

input,
select,
textarea {
  font-weight: 400;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="color"] {
  width: 72px;
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

.field-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 400;
}

.field-inline input[type="checkbox"],
.field-inline input[type="radio"] {
  width: auto;
  margin: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07);
}

textarea {
  resize: vertical;
  min-height: 128px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 44px;
}

.toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.toggle-pass:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Segmented radio pills */
.pill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-option {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  font-weight: 500;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-option span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-option span:hover {
  border-color: var(--accent);
}

.pill-option input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.pill-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 18px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  pointer-events: none;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  flex-shrink: 0;
}

.dropzone-text strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.dropzone-text span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

.photo-manage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.photo-manage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--muted);
}

.photo-manage-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.photo-manage-item span {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.photo-manage-item input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* ---------- Alerts ---------- */

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin: 0 0 18px;
}

.alert.ok {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
}

.alert.error {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.alert-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}

/* ---------- Empty & Error States ---------- */

.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.empty-state h1,
.empty-state h2 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--muted);
  margin: 0 0 20px;
}

/* ---------- Dialogs (Lightbox & Confirm Modal) ---------- */

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 960px);
  max-height: 90vh;
  overflow: visible;
}

dialog.lightbox::backdrop {
  background: rgba(18, 16, 14, 0.82);
  backdrop-filter: blur(4px);
}

.lightbox-inner {
  position: relative;
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #1e1b18;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
}

dialog.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: calc(100% - 32px);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

dialog.confirm-dialog::backdrop {
  background: rgba(18, 16, 14, 0.48);
  backdrop-filter: blur(3px);
}

dialog.confirm-dialog h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 20px;
}

dialog.confirm-dialog p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14.5px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid #f1f1f3;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Contact Us & Messages ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.info-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.info-card h2 {
  font-family: var(--font-display);
  margin: 0 0 2px;
  font-size: 18px;
}

.info-card p {
  margin: 0;
}

.contact-number {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px !important;
  font-variant-numeric: tabular-nums;
}

.contact-form {
  max-width: none;
}

.contact-form h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 22px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg);
}

.faq-list summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

.faq-list details p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.message-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.message-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.message-card-head .badge {
  margin-left: 8px;
}

.message-card-head form {
  margin: 0;
}

.message-card.is-unread {
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--ink), var(--shadow-sm);
}

.badge.new {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.message-body p {
  margin: 0 0 8px;
  color: var(--ink-2);
}

.message-body p:last-child {
  margin-bottom: 0;
}

.contact-extra-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.contact-meta-row a {
  text-decoration: none;
}

.contact-meta-row a:hover {
  text-decoration: underline;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 6px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.faq-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.faq-editor-header .form-section-title {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.faq-editor-row {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}

[hidden] {
  display: none !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .topbar-inner {
    padding: 12px 16px;
  }

  main {
    padding: 20px 16px 56px;
  }

  .hero {
    padding: 34px 22px 32px;
    margin: 0 0 20px;
    border-radius: 20px;
  }

  .detail {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .detail-media-wrap {
    position: static;
  }

  .detail-panel {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row {
    grid-template-columns: 1fr;
  }

  .form-card,
  .auth {
    padding: 20px;
  }

  /* Responsive admin cards on mobile */
  .table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 8px 12px;
    align-items: center;
    box-shadow: var(--shadow-sm);
  }

  .admin-table td {
    padding: 0;
    border: 0;
  }

  .admin-table td.thumb {
    grid-row: 1 / 3;
    align-self: start;
  }

  .admin-table td.col-price,
  .admin-table td.col-status {
    grid-column: 2;
  }

  .admin-table td.actions {
    grid-column: 1 / -1;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--line);
    justify-content: flex-end;
  }

  .search-box {
    max-width: none;
    flex: 1 1 100%;
  }

  .toolbar-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .brand {
    font-size: 17px;
    gap: 6px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .topbar nav {
    gap: 0;
  }

  .topbar nav a {
    padding: 6px 8px;
    font-size: 13px;
  }

  main {
    padding: 16px 14px 48px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 10px 2px 0;
    gap: 4px;
  }

  .card h3 {
    font-size: 14px;
  }

  .card .price {
    font-size: 14.5px;
  }

  .card-badge-float {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 2px 8px;
  }

  .detail-specs {
    grid-template-columns: 1fr;
  }

  .toolbar-controls {
    gap: 8px;
  }

  .chip-group {
    flex: 1 1 auto;
    overflow-x: auto;
    max-width: 100%;
  }

  .chip {
    padding: 5px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .sort-select {
    flex: 0 0 auto;
    width: auto;
    max-width: 190px;
  }

  .admin-head-actions {
    width: 100%;
  }

  .admin-head-actions .btn,
  .admin-head-actions form {
    flex: 1 1 auto;
  }

  .admin-head-actions form .btn {
    width: 100%;
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-row .btn {
    width: 100%;
  }
}

@media (max-width: 350px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
