/* =====================================================
   LeninSelect — Design System
   Современный минимализм
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --card: #F2F2F2;
  --text: #2C2C2C;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --accent: #1F6AE1;
  --accent-hover: #1859C4;
  --accent-light: rgba(31, 106, 225, 0.1);
  --danger: #E53E3E;
  --success: #38A169;
  --warning: #D69E2E;
  --border: #E5E7EB;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.header.scrolled { background: rgba(255,255,255,0.95); border-color: var(--border); }
.header-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: var(--header-height);
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.nav { display: flex; gap: 28px; align-items: center; position: relative; }
.nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-light);
  position: relative; padding: 4px 0;
  transition: color 0.3s ease;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 100%; height: 2px; background: var(--accent); border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

/* ── Dot Navigation ── */
.dot-nav {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 12px;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  transition: var(--transition);
}
.dot.active, .dot:hover { background: var(--accent); transform: scale(1.3); }

/* ── Sections ── */
.section {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 32px;
  position: relative;
}
.section-inner { max-width: 1200px; width: 100%; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.section-subtitle { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.accent-text { color: var(--accent); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 50%, #f0f4ff 100%);
  text-align: center; padding-top: 120px;
}
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg-shapes .circle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(31,106,225,0.08) 0%, transparent 70%);
}
.hero-bg-shapes .circle:nth-child(1) { width: 600px; height: 600px; top: -100px; right: -100px; }
.hero-bg-shapes .circle:nth-child(2) { width: 400px; height: 400px; bottom: -50px; left: -50px; }
.hero-bg-shapes .circle:nth-child(3) { width: 300px; height: 300px; top: 50%; left: 60%; }

.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: var(--accent-light); color: var(--accent);
  padding: 8px 20px; border-radius: 100px; font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
}
.hero-content h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -2px; margin-bottom: 20px; }
.hero-content p { font-size: 1.15rem; color: var(--text-light); max-width: 550px; margin: 0 auto 36px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.stats-row {
  display: flex; justify-content: center; gap: 48px; margin-top: 64px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.9rem; border: 2px solid transparent; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,106,225,0.3); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary { background: var(--card); color: var(--text); }
.btn-secondary:hover { background: #e5e5e5; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-xs); }

/* ── About Grid ── */
.about-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

/* ── Advantages Carousel (edge-to-edge) ── */
.advantages-carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 20px 0;
}

#advantages .section-inner {
  padding-bottom: 0;
}

.advantages-carousel-track {
  display: flex;
  gap: 24px;
  animation: scrollCarousel 30s linear infinite;
  width: max-content;
  padding: 0 24px;
}
.advantages-carousel-track:hover {
  animation-play-state: paused;
}

@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.advantage-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  min-width: 300px;
  max-width: 340px;
  flex-shrink: 0;
}
.advantage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.advantage-icon { font-size: 2.2rem; margin-bottom: 16px; }
.advantage-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.advantage-card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }

/* ── Apartments Grid ── */
.advantages-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.apartments-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}

/* ── Apartment Card ── */
.apartment-card {
  background: var(--bg); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); cursor: pointer;
}
.apartment-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.apartment-card-image {
  position: relative; overflow: hidden; padding-top: 65%;
}
.apartment-card-image img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.5s ease;
}
.apartment-card:hover .apartment-card-image img { transform: scale(1.05); }
.apartment-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: #fff; padding: 4px 12px;
  border-radius: 100px; font-size: 0.75rem; font-weight: 600;
}
.apartment-card-body { padding: 20px; }
.apartment-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.apartment-card-params { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.apartment-card-param {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.85rem; color: var(--text-light);
}
.apartment-card-param svg { width: 16px; height: 16px; }
.apartment-card-price { font-size: 1.3rem; font-weight: 800; color: var(--accent); }

/* ── Gallery Section — Full Slideshow ── */
.gallery-section {
  padding: 0 !important;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #111;
}

.gallery-section .gallery-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  max-width: none;
  box-shadow: none;
  background: #111;
}

.gallery-slider {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/10;
  background: #111;
}
.gallery-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.gallery-slide.active {
  opacity: 1;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none;
  width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  z-index: 2;
  color: #fff;
  backdrop-filter: blur(6px);
}
.gallery-nav:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 24px; }
.gallery-nav.next { right: 24px; }

.gallery-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; justify-content: center; gap: 8px;
  z-index: 3;
}
.gallery-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.4); border: none; cursor: pointer;
  transition: var(--transition);
}
.gallery-dot.active { background: #fff; transform: scale(1.3); }

/* ── Map ── */
.map-container {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); height: 450px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ── Footer ── */
.footer {
  background: var(--text); color: #fff; padding: 64px 32px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 12px; font-size: 0.9rem; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; color: rgba(255,255,255,0.4); font-size: 0.8rem;
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: #fff; padding: 14px 24px;
  border-radius: var(--radius-sm); font-size: 0.9rem;
  transform: translateX(120%); transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ── Catalog Page ── */
.catalog-layout {
  padding: calc(var(--header-height) + 32px) 32px 60px;
  max-width: 1280px;
  margin: 0 auto;
}

.catalog-layout .page-top {
  margin-bottom: 24px;
}

.catalog-layout .page-top h1 {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px;
}

.catalog-page { padding: calc(var(--header-height) + 40px) 32px 60px; max-width: 1280px; margin: 0 auto; }
.catalog-page h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }

.filter-bar {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: end;
}
.filter-bar .filter-group {
  flex: 1;
  min-width: 140px;
}

.filters-bar {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; margin: 24px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
  align-items: end;
}
.filter-group label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 6px; font-weight: 600; }
.filter-group input, .filter-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-family: inherit; font-size: 0.9rem;
  background: var(--bg); transition: var(--transition);
}
.filter-group input:focus, .filter-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.sort-bar .results-count {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.sort-controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.sort-btn {
  padding: 8px 18px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.8rem; cursor: pointer; font-family: inherit;
  font-weight: 500; transition: var(--transition); color: var(--text-light);
}
.sort-btn.active, .sort-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Apartment Detail ── */
.apt-detail-page { padding: calc(var(--header-height) + 40px) 32px 60px; max-width: 1200px; margin: 0 auto; }
.apt-gallery { margin-bottom: 32px; }
.apt-gallery-main {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); margin-bottom: 12px;
  background: #f5f5f5;
  cursor: pointer;
}
.apt-gallery-main img {
  width: 100%; max-height: 500px;
  object-fit: contain;
  display: block;
}
.apt-gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.apt-gallery-thumb {
  width: 80px; height: 60px; border-radius: var(--radius-xs);
  overflow: hidden; cursor: pointer; opacity: 0.6;
  transition: var(--transition); flex-shrink: 0;
  border: 2px solid transparent;
}
.apt-gallery-thumb.active, .apt-gallery-thumb:hover { opacity: 1; border-color: var(--accent); }
.apt-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.apt-info { display: grid; grid-template-columns: 1fr 380px; gap: 40px; }
.apt-main h1 { font-size: 2rem; font-weight: 800; margin-bottom: 20px; }
.apt-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.apt-spec {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.apt-spec-label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.apt-spec-value { font-size: 1.2rem; font-weight: 700; margin-top: 4px; }

.apt-form-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; position: sticky; top: calc(var(--header-height) + 24px);
}
.apt-form-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.price-display { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin-bottom: 20px; }

/* ── Auth Page ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f8f9ff, #eef2ff);
  padding: 24px;
}
.auth-card {
  background: var(--bg); border-radius: var(--radius); padding: 48px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
}
.auth-subtitle { color: var(--text-light); margin: 8px 0 32px; text-align: center; }
.auth-card .btn { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: var(--text-light); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-family: inherit; font-size: 0.9rem;
  transition: var(--transition); background: var(--bg);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Success Modal ── */
.success-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
}
.success-modal.active { display: flex; }
.success-modal-content {
  background: var(--bg); border-radius: var(--radius); padding: 48px;
  text-align: center; max-width: 400px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.success-icon { font-size: 3rem; margin-bottom: 16px; }

/* ── Admin/Manager Panel ── */
.panel-page {
  padding: calc(var(--header-height) + 32px) 32px 60px;
  max-width: 1400px; margin: 0 auto;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.panel-header h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; }

.panel-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.panel-tab {
  padding: 10px 22px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.85rem; cursor: pointer; font-family: inherit;
  font-weight: 600; transition: var(--transition); color: var(--text-light);
}
.panel-tab.active, .panel-tab:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active-tab { display: block; }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
  text-align: left; padding: 14px 16px; background: var(--card);
  font-weight: 600; color: var(--text-light); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--accent-light); }

/* ── Status Badges ── */
.status-badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600;
}
.status-new { background: #DBEAFE; color: #1E40AF; }
.status-processing { background: #FEF3C7; color: #92400E; }
.status-executing { background: #D1FAE5; color: #065F46; }
.status-meeting { background: #E0E7FF; color: #3730A3; }
.status-refused { background: #FEE2E2; color: #991B1B; }
.status-available { background: #D1FAE5; color: #065F46; }
.status-reserved { background: #FEF3C7; color: #92400E; }
.status-sold { background: #FEE2E2; color: #991B1B; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg); border-radius: var(--radius);
  padding: 36px; width: 100%; max-width: 560px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-light); }

/* ── Loading Spinner ── */
.loading-spinner { display: flex; justify-content: center; padding: 60px; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Featured badge ── */
.featured-toggle {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--border); border: none; cursor: pointer;
  position: relative; transition: var(--transition);
}
.featured-toggle.active { background: var(--accent); }
.featured-toggle::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: var(--transition);
}
.featured-toggle.active::after { left: 21px; }

/* ── Logs Table ── */
.log-details {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.export-btn-group {
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ── Lightbox (fullscreen image viewer) ── */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.95);
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 1.5rem; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; z-index: 10001;
  transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 1.5rem; width: 52px; height: 52px;
  border-radius: 50%; cursor: pointer;
  transition: var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-counter {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem; margin-top: 16px;
}

/* ── Drag-and-Drop Sortable ── */
.sortable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sortable-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.sortable-item:active {
  cursor: grabbing;
}

.sortable-item.dragging {
  opacity: 0.5;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(31,106,225,0.2);
}

.sortable-item .drag-handle {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  color: var(--text-muted);
  cursor: grab;
  flex-shrink: 0;
}

.sortable-item .drag-handle span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.sortable-item .item-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sortable-item .item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.sortable-item .item-info {
  flex: 1;
  min-width: 0;
}

.sortable-item .item-info .item-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sortable-item .item-info .item-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sortable-item .item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sortable-item .item-thumb {
  width: 60px;
  height: 40px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
}

.sortable-item .item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drag-placeholder {
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  min-height: 48px;
}

/* ── Icon Picker ── */
.icon-picker-wrapper {
  position: relative;
}

.icon-picker-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  font-size: 1.5rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.icon-picker-btn:hover {
  border-color: var(--accent);
}

.icon-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 280px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  padding: 8px;
  flex-wrap: wrap;
  gap: 4px;
}

.icon-picker-dropdown.open {
  display: flex;
}

.icon-picker-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  transition: var(--transition);
}

.icon-picker-option:hover {
  background: var(--accent-light);
}

.icon-picker-option.selected {
  background: var(--accent);
  color: white;
  border-radius: var(--radius-xs);
}

/* ── Password Section ── */
.password-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
}

.password-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.5rem; }
  .apt-info { grid-template-columns: 1fr; }
  .apt-specs { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .advantages-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 20px; gap: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .dot-nav { display: none; }
  .section { padding: 80px 20px; min-height: auto; }
  .hero-content h1 { font-size: 2rem; }
  .stats-row { gap: 24px; }
  .advantages-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.8rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; }
  .panel-tabs { gap: 6px; }
  .panel-tab { padding: 8px 14px; font-size: 0.8rem; }
  .advantage-card { min-width: 260px; }
  .gallery-section { min-height: 60vh; }
  .catalog-layout { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.6rem; }
  .filters-bar { grid-template-columns: 1fr; }
  .apartments-grid { grid-template-columns: 1fr; }
  .apt-specs { grid-template-columns: 1fr 1fr; }
}
