/* ---------------------------------------------------------------------
   MLS سیرجان — design tokens
   Dark is the default surface; [data-theme="light"] overrides the tokens.
--------------------------------------------------------------------- */

@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Variable.woff2') format('woff2-variations'),
       url('fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #14161b;
  --bg-soft: #191c22;
  --surface: #1c1f26;
  --surface-2: #23272f;
  --border: #2b303a;
  --border-soft: #23262d;
  --text: #edeef1;
  --text-dim: #a2a8b3;
  --text-faint: #6d7381;
  --accent: #c68a3e;
  --accent-strong: #e0a75b;
  --accent-ink: #201603;
  --success-bg: #17251c;
  --success-text: #7fd9a0;
  --danger-bg: #2a1a1a;
  --danger-text: #e2897f;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.38);
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f1ec;
  --bg-soft: #ebe8e0;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --border: #e1dccf;
  --border-soft: #e9e5db;
  --text: #221d15;
  --text-dim: #6b6455;
  --text-faint: #8f8878;
  --accent: #a1631f;
  --accent-strong: #8a5117;
  --accent-ink: #ffffff;
  --success-bg: #e7f4ec;
  --success-text: #1e7a45;
  --danger-bg: #fbeaea;
  --danger-text: #b23434;
  --shadow: 0 16px 34px rgba(40, 28, 10, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .2s ease, color .2s ease;
}

a { text-decoration: none; color: inherit; }

.wrap { width: min(1180px, 92%); margin: auto; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------- header */
header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; }
.brand { font-size: 17.5px; font-weight: 800; letter-spacing: -.01em; }
.brand span { color: var(--accent); font-weight: 800; }
nav.links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; font-weight: 500; color: var(--text-dim); flex-wrap: wrap; }
nav.links a:hover { color: var(--text); }
nav.links a.current { color: var(--text); }

.theme-toggle {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; color: var(--accent-strong); flex-shrink: 0;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle svg {
  position: absolute; width: 20px; height: 20px;
  transition: transform .35s ease, opacity .25s ease;
}
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-70deg) scale(.4); }
.theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(70deg) scale(.4); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 56px 40px 40px;
  margin: 30px 0 20px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg) 70%);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ''; position: absolute; inset-inline-end: -120px; top: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-skyline { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: auto; opacity: .5; pointer-events: none; color: var(--accent); }
[data-theme="light"] .hero-skyline { opacity: .35; }
.hero-inner { position: relative; max-width: 640px; }
.eyebrow { color: var(--accent-strong); font-size: 13.5px; font-weight: 600; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.32; margin: 10px 0 14px; letter-spacing: -.01em; }
.hero p { color: var(--text-dim); max-width: 520px; margin: 0 0 28px; font-size: 15.5px; }

.search {
  position: relative;
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 12px;
  box-shadow: var(--shadow);
}
.search input, .search select { width: 100%; }
.hero-stats { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.hero-stats span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 7px 14px 7px 8px;
}
.hero-stats b { color: var(--text); font-weight: 800; }

/* ------------------------------------------------------ advanced search */
.adv-details { margin-top: 12px; }
.adv-details summary {
  cursor: pointer; list-style: none; color: var(--accent-strong);
  font-size: 13.5px; font-weight: 600; padding: 4px 2px; user-select: none;
}
.adv-details summary::-webkit-details-marker { display: none; }
.adv-details summary::before { content: '▾ '; }
.adv-details[open] summary::before { content: '▴ '; }
.adv-grid {
  margin-top: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-m); grid-template-columns: repeat(3, 1fr);
}
.adv-grid input, .adv-grid select { margin: 0; }
@media (max-width: 860px) { .adv-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 34px 0 6px; flex-wrap: wrap; }
.pagination a, .pagination .current, .pagination .dots {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-s); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13.5px; background: var(--surface);
}
.pagination a:hover { border-color: var(--accent); color: var(--text); }
.pagination .current { background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.pagination .dots { border: none; background: none; }
.pagination a.disabled { opacity: .35; pointer-events: none; }

/* -------------------------------------------------------------- cta box */
.cta-section { margin: 48px 0; }
.cta-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn {
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  box-shadow: none;
}
.tab-btn.active { background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); border-color: var(--accent); }
.tab-btn:hover { filter: none; border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.cta-contact {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-m); padding: 22px; height: 100%;
}
.cta-contact h3 { margin: 0 0 8px; font-size: 15.5px; }
.cta-contact .muted { margin: 0 0 14px; }
.cta-contact .contact-phone {
  display: inline-block; direction: ltr; font-size: 19px; font-weight: 800;
  color: var(--accent-strong); margin: 2px 0 12px;
}
.cta-contact .contact-address { color: var(--text-dim); font-size: 13.5px; line-height: 1.9; margin: 0; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- inputs */
input, select, textarea, button {
  font: inherit; color: var(--text);
}
input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 11px 13px;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }

.button, button {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  border: 0; border-radius: var(--radius-s);
  padding: 11px 18px; font-weight: 600; font-size: 14.5px;
  cursor: pointer; transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent);
}
.button:hover, button:hover { filter: brightness(1.06); }
.button:active, button:active { transform: translateY(1px); box-shadow: none; }
.button.ghost, button.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
  box-shadow: none;
}
.button.ghost:hover, button.ghost:hover { border-color: var(--accent); background: transparent; }
.button.small, button.small { padding: 7px 12px; font-size: 12.5px; }
.button.danger, button.danger { background: transparent; color: var(--danger-text); border: 1px solid var(--danger-bg); box-shadow: none; }

/* ------------------------------------------------------------- filters */
.kind-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 30px; }
.kind-filters a {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-dim); background: var(--surface);
}
.kind-filters a.active { background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); border-color: var(--accent); }
.kind-filters a:hover:not(.active) { border-color: var(--accent); color: var(--text); }
.reset-link { align-self: center; font-size: 12.5px; color: var(--text-faint); padding: 8px 4px; border: none; background: none; }
.reset-link:hover { color: var(--danger-text); }

/* ------------------------------------------------------------ sections */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 40px 0 18px; }
.section-head h2 { font-size: 21px; margin: 0; font-weight: 700; }
.section-head .count { color: var(--text-faint); font-size: 13.5px; }

/* --------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-m); overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: block;
}
.card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow); }
.photo, .card img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover img { transform: scale(1.04); }
.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-faint);
}
.placeholder svg { width: 44px; height: 44px; opacity: .55; }
.card-body { padding: 16px; }
.badge {
  display: inline-block;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, var(--surface-2)), var(--surface-2));
  color: var(--accent-strong);
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
}
.card h3 { margin: 10px 0 4px; font-size: 16.5px; font-weight: 700; }
.card p, .muted, small { color: var(--text-dim); font-size: 13px; margin: 0; }
.card .price { display: block; margin-top: 8px; font-weight: 700; color: var(--text); font-size: 15px; }
.card small { display: block; margin-top: 12px; color: var(--text-faint); }
.empty {
  grid-column: 1/-1; text-align: center; padding: 50px 20px; color: var(--text-faint);
  border: 1px dashed var(--border); border-radius: var(--radius-m);
}

/* --------------------------------------------------- similar listings (small cards, like Divar) */
.grid-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.grid-sm .card-body { padding: 10px; }
.grid-sm .photo, .grid-sm .card img { height: 110px; }
.grid-sm .card h3 { font-size: 13px; margin: 8px 0 2px; }
.grid-sm .card p { font-size: 11.5px; }
.grid-sm .card .badge { font-size: 10.5px; padding: 2px 8px; }
.grid-sm .card .price { font-size: 12.5px; margin-top: 6px; }
.grid-sm .card small { font-size: 10.5px; margin-top: 8px; }


/* -------------------------------------------------------------- detail */
.detail { display: grid; grid-template-columns: 1.5fr .85fr; gap: 20px; margin: 30px 0; align-items: start; }
.detail-main, .detail aside { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-l); overflow: hidden; }
.detail-img { width: 100%; height: 380px; object-fit: cover; display: block; }
.detail-img.placeholder { height: 380px; }
.detail-img.placeholder svg { width: 72px; height: 72px; }
.detail-main .card-body { padding: 26px; }
.detail aside { padding: 24px; }
.detail aside form { display: grid; gap: 10px; margin-top: 4px; }
.detail h1 { font-size: 26px; margin: 8px 0 6px; }
.detail h2 { font-size: 22px; color: var(--accent-strong); margin: 14px 0; }
.meta { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); line-height: 2; color: var(--text-dim); font-size: 13.5px; }

/* -------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0 46px; }
.step { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-m); padding: 22px; }
.step .num { font-size: 13px; font-weight: 700; color: var(--accent-strong); }
.step h3 { margin: 10px 0 6px; font-size: 16px; }
.step p { color: var(--text-dim); font-size: 13.5px; margin: 0; }

/* -------------------------------------------------------------- panels */
.ad-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 28px 0; }
.ad-banner {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--radius-m); padding: 14px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s;
}
.ad-banner:hover { transform: translateY(-2px); border-color: var(--accent); }
.ad-banner img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-s); flex: none; }
.ad-banner-body h3 { margin: 0 0 4px; font-size: 15px; }
.ad-banner-body p { margin: 0; color: var(--text-dim); font-size: 13px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.admin-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-soft); color: var(--text-dim); text-decoration: none; font-size: 13.5px; }
.admin-tabs a.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-m); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.panel h2 { margin-top: 0; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.full { grid-column: 1/-1; min-height: 130px; }
button.full { min-height: unset; }

.price-row.full {
  min-height: unset;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}
.price-row input, .price-row select { margin: 0; }

.dashboard-search { display: flex; gap: 8px; align-items: center; }
.dashboard-search input { min-width: 260px; }

@media (max-width: 860px) {
  .price-row.full { grid-template-columns: 1fr; }
  .dashboard-search { flex-wrap: wrap; }
  .dashboard-search input { min-width: 0; width: 100%; }
}

.auth {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-l); padding: 30px;
  max-width: 400px; margin: 70px auto; display: grid; gap: 14px;
  box-shadow: var(--shadow);
}
.auth h1 { margin: 0; font-size: 20px; }
.auth form { display: grid; gap: 10px; }

/* -------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; border-bottom: 1px solid var(--border-soft); padding: 11px 8px; font-size: 13.5px; }
th { color: var(--text-faint); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; background: var(--surface-2); }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--surface-2); }
.inline { display: inline-flex; gap: 6px; align-items: center; }
.link { color: var(--accent-strong); font-weight: 600; }

/* --------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0; }
.stats div {
  position: relative; background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-m); padding: 20px 20px 20px 64px;
  transition: border-color .15s ease, transform .15s ease;
}
.stats div:hover { border-color: var(--border); transform: translateY(-2px); }
.stats b { display: block; font-size: 26px; font-weight: 800; }
.stats span { color: var(--text-faint); font-size: 13px; }
.stats .stat-ico {
  position: absolute; top: 18px; left: 18px;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong);
}
.stats .stat-ico svg { width: 18px; height: 18px; }

.stat-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong); flex-shrink: 0;
}
.stat-ico svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- flash */
.flash { padding: 12px 16px; margin-top: 18px; border-radius: var(--radius-s); font-size: 13.5px; }
.flash.success { background: var(--success-bg); color: var(--success-text); }
.flash.error { background: var(--danger-bg); color: var(--danger-text); }

/* ---------------------------------------------------------------- misc */
.section-title-block { max-width: 560px; margin: 0 auto 30px; text-align: center; }
.section-title-block h2 { font-size: 24px; margin: 0 0 8px; }
.section-title-block p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-size: 64px; font-weight: 800; color: var(--accent); }
.error-page p { color: var(--text-dim); margin: 10px 0 24px; }

footer { margin-top: 60px; border-top: 1px solid var(--border-soft); padding: 28px 0; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-faint); font-size: 12.5px; }
footer a { color: var(--text-dim); }
footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .search, .grid, .detail, .stats, .form-grid, .steps { grid-template-columns: 1fr; }
  .hero { padding: 40px 22px 30px; }
  nav.links { gap: 12px; font-size: 13px; }
  .detail-img, .detail-img.placeholder { height: 240px; }
  table { display: block; overflow: auto; white-space: nowrap; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ============================================================ gallery */
.media-section-title { font-size: 16px; margin: 26px 0 12px; color: var(--text); display: flex; align-items: center; gap: 6px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 0 0 26px;
}
.gallery-thumb {
  position: relative;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  cursor: zoom-in;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gallery-thumb:hover img { transform: scale(1.06); }
.gallery-thumb:hover, .gallery-thumb:active { background: var(--surface-2); transform: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 10, 12, 0.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: var(--radius-s); box-shadow: var(--shadow); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 50%;
  width: 44px; height: 44px; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.18); }
.lightbox-close { top: 16px; left: 16px; }
.lightbox-nav.prev { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { left: 16px; top: 50%; transform: translateY(-50%); }

/* ==================================================== 360 tour viewer */
.tour-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tour-tab {
  padding: 7px 14px; font-size: 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border-soft);
}
.tour-tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tour-tab:hover { border-color: var(--accent); }

.panorama-viewer {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #05060a;
  margin-bottom: 26px;
  touch-action: none;
}
.panorama-viewer canvas { display: block; width: 100% !important; height: 100% !important; }
.panorama-loading, .panorama-error {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #cfd3da; font-size: 13.5px; background: rgba(5,6,10,0.55); z-index: 2;
}
.panorama-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 12.5px;
  padding: 6px 14px; border-radius: 999px; transition: opacity .3s; z-index: 2;
  pointer-events: none; white-space: nowrap;
}

@media (max-width: 860px) {
  .panorama-viewer { height: 300px; }
}

/* ================================================= listing form media */
.media-uploader { border: 1px dashed var(--border); border-radius: var(--radius-m); padding: 16px; margin: 6px 0 18px; }
.media-uploader > p.hint { margin: 0 0 12px; font-size: 12.5px; color: var(--text-dim); }
.existing-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.existing-media-item { position: relative; border: 1px solid var(--border-soft); border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); }
.existing-media-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.existing-media-item .media-label { display: block; font-size: 11.5px; text-align: center; padding: 4px; color: var(--text-dim); background: var(--surface); }
.existing-media-item form { position: absolute; top: 4px; left: 4px; margin: 0; }
.existing-media-item button.danger.small { padding: 3px 8px; font-size: 11px; background: rgba(20,10,10,0.75); }

.panorama-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.panorama-row select, .panorama-row input[type=file] { margin: 0; }
.panorama-row .remove-row { padding: 7px 10px; font-size: 12px; }
@media (max-width: 860px) { .panorama-row { grid-template-columns: 1fr; } }

.add-row-btn { margin-top: 4px; }
