/* ===========================================================
   HramMarket — Дизайн-система
   Ярмарка Православных Изделий
   hram.prosvetim.ru + market.prosvetim.ru
   
   Светлая тема (умолчание) · Тёмная тема (опционально)
   Mobile-first · Accessibility · WCAG AA
   =========================================================== */

/* ───── 1. CSS Custom Properties ───── */

:root {
  /* Светлая тема (умолчание) — уютная, тёплая */
  --bg-body: #faf7f2;
  --bg-card: #ffffff;
  --bg-card-hover: #fefcf8;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255,255,255,0.85);
  --bg-input: #ffffff;
  --bg-overlay: rgba(0,0,0,0.4);
  --bg-accent-soft: rgba(184,134,11,0.08);
  --bg-accent-medium: rgba(184,134,11,0.15);
  --bg-success-soft: rgba(34,139,34,0.08);
  --bg-danger-soft: rgba(178,34,34,0.08);

  --text-primary: #1a1a1a;
  --text-secondary: #5c4f3e;
  --text-tertiary: #8a7a66;
  --text-on-accent: #ffffff;
  --text-link: #b8860b;
  --text-link-hover: #d4a017;
  --text-heading: #1a1a1a;

  --accent: #b8860b;
  --accent-hover: #d4a017;
  --accent-light: #c9a84c;
  --accent-gradient: linear-gradient(135deg, #c9a84c 0%, #d4a017 50%, #b8860b 100%);
  --accent-glow: 0 0 20px rgba(184,134,11,0.15);
  --accent-border: rgba(184,134,11,0.2);
  --accent-border-strong: rgba(184,134,11,0.4);
  --accent-text: #b8860b;

  --border-color: rgba(184,134,11,0.12);
  --border-color-strong: rgba(184,134,11,0.25);
  --shadow-sm: 0 1px 3px rgba(44,36,24,0.06);
  --shadow-md: 0 4px 12px rgba(44,36,24,0.08);
  --shadow-lg: 0 8px 30px rgba(44,36,24,0.12);
  --shadow-xl: 0 16px 48px rgba(44,36,24,0.16);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;

  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  --z-base: 1;
  --z-dropdown: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-luchik: 500;
  --z-luchik-card: 510;

  --header-h: 60px;
  --max-w: 1280px;
  --max-w-narrow: 800px;

  --nav-blur: blur(12px);
}

/* ───── Тёмная тема ───── */
[data-theme="dark"] {
  --bg-body: #0a0a12;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-elevated: #14141e;
  --bg-glass: rgba(10,10,18,0.9);
  --bg-input: rgba(255,255,255,0.06);
  --bg-overlay: rgba(0,0,0,0.7);
  --bg-accent-soft: rgba(255,215,0,0.08);
  --bg-accent-medium: rgba(255,215,0,0.15);
  --bg-success-soft: rgba(0,255,100,0.08);
  --bg-danger-soft: rgba(255,50,50,0.08);

  --text-primary: #e0ddd5;
  --text-secondary: #a09a8e;
  --text-tertiary: #706a60;
  --text-on-accent: #0a0a12;
  --text-link: #FFD700;
  --text-link-hover: #ffed4a;
  --text-heading: #ffffff;

  --accent: #FFD700;
  --accent-hover: #ffed4a;
  --accent-light: #ffed4a;
  --accent-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 40%, #FFD700 70%, #b8860b 100%);
  --accent-glow: 0 0 20px rgba(255,215,0,0.12);
  --accent-border: rgba(255,215,0,0.15);
  --accent-border-strong: rgba(255,215,0,0.35);
  --accent-text: #FFD700;

  --border-color: rgba(255,255,255,0.06);
  --border-color-strong: rgba(255,215,0,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
}

/* ───── 2. Reset & Base ───── */
*,*::before,*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-body);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-base), color var(--transition-base);
  min-height: 100dvh;
  overflow-x: hidden;
}
img,video,canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--text-link-hover); }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input,textarea,select { font-family: inherit; font-size: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 600; color: var(--text-heading); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.3rem); }
p { margin-bottom: 1rem; color: var(--text-secondary); }
small { font-size: 0.875rem; color: var(--text-tertiary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-border-strong); }

/* ───── 3. Accessibility — Font Size Zoom ───── */
[data-fs="0"] { zoom: 0.75; }
[data-fs="1"] { zoom: 0.875; }
[data-fs="2"] { zoom: 1; }
[data-fs="3"] { zoom: 1.15; }
[data-fs="4"] { zoom: 1.3; }
[data-fs="5"] { zoom: 1.5; }
[data-fs="6"] { zoom: 1.75; }
[data-fs="7"] { zoom: 2; }
[data-fs="8"] { zoom: 2.3; }
[data-fs="9"] { zoom: 2.7; }

/* Focus visible */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ───── 4. Layout ───── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); }
.section { padding: 52px 0; }
.section-sm { padding: 28px 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

/* ───── 5. Navigation / Header ───── */
.top-bar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: var(--z-dropdown);
  background: var(--bg-glass); backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-h); transition: background var(--transition-base);
}
.top-bar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 16px;
}
.logo {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  color: var(--text-heading); white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }
.logo.market-logo {
  flex-direction: column; line-height: 1; gap: 0;
  white-space: normal; text-align: left;
}
.logo.market-logo small {
  font-family: var(--font-body);
  font-size: 0.5rem; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.logo img, .logo svg { height: 32px; width: auto; }

/* Desktop nav */
.top-nav {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
}
.top-nav a {
  padding: 8px 14px; border-radius: var(--radius-md); font-size: 0.875rem;
  color: var(--text-secondary); transition: all var(--transition-fast);
  position: relative; white-space: nowrap;
}
.top-nav a:hover { color: var(--accent); background: var(--bg-accent-soft); }
.top-nav a.active { color: var(--accent); font-weight: 500; }
.top-nav a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px; background: var(--accent-gradient); border-radius: 1px;
}

/* Theme toggle, fs-controls, user menu */
.header-actions {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition-fast);
  position: relative;
}
.icon-btn:hover { background: var(--bg-accent-soft); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--accent); color: var(--text-on-accent);
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-gradient); color: var(--text-on-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem; transition: transform var(--transition-fast);
}
.avatar-btn:hover { transform: scale(1.05); }

/* Hamburger */
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-md);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all var(--transition-base);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ───── 6. Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-md); font-size: 0.9rem;
  font-weight: 500; transition: all var(--transition-fast);
  min-height: 44px; min-width: 44px; white-space: nowrap;
  text-decoration: none; border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent-gradient); color: var(--text-on-accent);
  border-color: transparent;
}
.btn-primary:hover { box-shadow: var(--accent-glow); color: var(--text-on-accent); }
.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover { border-color: var(--accent-border); color: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--text-secondary); border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-accent-soft); color: var(--accent); }
.btn-outline {
  background: transparent; color: var(--accent);
  border-color: var(--accent-border-strong);
}
.btn-outline:hover { background: var(--bg-accent-soft); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { width: 44px; height: 44px; padding: 0; }
.btn-block { width: 100%; }
.btn-danger { background: #b22222; color: white; }
.btn-danger:hover { background: #8b0000; }
.btn-success { background: #228b22; color: white; }
.btn-success:hover { background: #1a6b1a; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ───── 7. Cards ───── */
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all var(--transition-base);
}
.card:hover { border-color: var(--accent-border); }
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}
.card-glass {
  background: var(--bg-glass); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 24px;
}
.card-accent-top {
  border-top: 3px solid transparent;
  border-image: var(--accent-gradient) 1;
}

/* ───── 8. Product Card ───── */
.product-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition-base);
}
.product-card:hover {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--bg-accent-soft);
}
.product-card-body { padding: 16px 20px; }
.product-card-title {
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-meta { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 8px; }
.product-card-price {
  font-weight: 600; font-size: 1.15rem; color: var(--accent);
}
.product-card-footer {
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px 16px;
}

/* ───── 9. Church Card ───── */
.church-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition-base);
}
.church-card:hover {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.church-card-cover {
  width: 100%; height: 160px; object-fit: cover;
  background: var(--accent-gradient); opacity: 0.8;
}
.church-card-body { padding: 20px; }
.church-card-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--text-heading); margin-bottom: 6px;
}
.church-card-type {
  font-size: 0.8rem; color: var(--accent); font-weight: 500; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.church-card-address { font-size: 0.875rem; color: var(--text-tertiary); }
.church-card-stats { display: flex; gap: 20px; padding: 14px 20px; border-top: 1px solid var(--border-color);
  font-size: 0.85rem; color: var(--text-tertiary); }
.church-card-stats span { display: flex; align-items: center; gap: 4px; }

/* ───── 10. Forms ───── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 0.875rem; font-weight: 500;
  color: var(--text-primary); margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--bg-input); border: 1px solid var(--border-color);
  color: var(--text-primary); font-size: 0.9rem; min-height: 44px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--bg-accent-soft);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-error { font-size: 0.8rem; color: #b22222; margin-top: 4px; }
.form-hint { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 4px; }

/* Search bar */
.search-bar {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: var(--radius-full); overflow: hidden;
  transition: all var(--transition-fast);
}
.search-bar:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--bg-accent-soft);
}
.search-bar input {
  flex: 1; border: none; background: transparent; padding: 10px 16px;
  font-size: 0.9rem; color: var(--text-primary); min-height: 44px; outline: none;
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar button {
  padding: 10px 18px; background: var(--accent-gradient);
  color: var(--text-on-accent); border: none; min-height: 44px;
  font-weight: 500; cursor: pointer; transition: opacity var(--transition-fast);
}
.search-bar button:hover { opacity: 0.9; }

/* ───── 11. Tags / Chips ───── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 500;
  background: var(--bg-accent-soft); color: var(--accent-text);
}
.tag-success { background: var(--bg-success-soft); color: #228b22; }
.tag-danger { background: var(--bg-danger-soft); color: #b22222; }

/* ───── 12. Badge / Counter ───── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--accent-gradient); color: var(--text-on-accent);
  font-size: 0.7rem; font-weight: 600; padding: 0 6px;
}

/* ───── 13. Modal / Overlay ───── */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-overlay); z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-elevated); border-radius: var(--radius-xl);
  max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 24px; box-shadow: var(--shadow-xl);
  transform: translateY(20px); transition: transform var(--transition-base);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-family: var(--font-display); font-size: 1.3rem; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; color: var(--text-secondary); }
.modal-close:hover { background: var(--bg-accent-soft); color: var(--accent); }

/* ───── 14. Toast / Notification ───── */
.toast-container {
  position: fixed; top: calc(var(--header-h) + 12px); right: 16px;
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px;
  max-width: 360px; width: calc(100% - 32px);
}
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 12px 16px;
  box-shadow: var(--shadow-lg); display: flex; align-items: flex-start; gap: 12px;
  animation: slideInRight var(--transition-base) ease;
}
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.toast-text { font-size: 0.85rem; color: var(--text-secondary); }
.toast-close { flex-shrink: 0; color: var(--text-tertiary); }
.toast-success { border-left: 3px solid #228b22; }
.toast-error { border-left: 3px solid #b22222; }
.toast-info { border-left: 3px solid var(--accent); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ───── 15. Pagination ───── */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 24px 0;
}
.page-btn {
  min-width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.page-btn:hover { background: var(--bg-accent-soft); color: var(--accent); }
.page-btn.active { background: var(--accent-gradient); color: var(--text-on-accent); }
.page-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ───── 16. Tabs ───── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.tab {
  padding: 10px 20px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  transition: all var(--transition-fast); white-space: nowrap;
  background: transparent; cursor: pointer;
}
.tab:hover { color: var(--accent); background: var(--bg-accent-soft); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ───── 17. Skeleton / Loading ───── */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-accent-soft) 50%, var(--border-color) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-image { aspect-ratio: 4/3; width: 100%; margin-bottom: 12px; }

/* ───── 18. Star Rating ───── */
.stars { display: flex; gap: 2px; }
.star { width: 16px; height: 16px; color: var(--accent); fill: var(--accent); }
.star-empty { color: var(--border-color); }

/* ───── 19. Interactive Map ───── */
.map-container {
  width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-color); min-height: 300px;
  margin: 16px 0;
}
.map-container .leaflet-container { width: 100%; min-height: 300px; border-radius: var(--radius-lg); }
/* Hide Leaflet branding */
.map-container .leaflet-control-attribution { display: none !important; }
.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom { border: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important; }
.leaflet-control-zoom a { background: var(--bg-card) !important; color: var(--text-primary) !important; border-color: var(--border-color) !important; }

/* ───── 20. Filters Panel ───── */
.filters-panel {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 24px;
}
.filter-group { margin-bottom: 16px; }
.filter-group-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-tertiary); margin-bottom: 8px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.filter-option input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.filter-option label { font-size: 0.875rem; color: var(--text-secondary); cursor: pointer; }

/* ───── 21. Breadcrumbs ───── */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
  color: var(--text-tertiary); padding: 0 0 16px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-tertiary); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--text-secondary); }
.breadcrumbs .sep { color: var(--text-tertiary); }

/* ───── 22. Hero Section ───── */
.hero {
  padding: 88px 24px 56px; text-align: center;
  position: relative; overflow: hidden;
}
.hero h1 { margin-bottom: 16px; }
.hero p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ───── 23. Empty State ───── */
.empty-state {
  text-align: center; padding: 48px 16px;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state-title { font-family: var(--font-display); font-size: 1.2rem;
  color: var(--text-primary); margin-bottom: 8px; }
.empty-state-text { color: var(--text-tertiary); margin-bottom: 20px; }

/* ───── 24. Divider ───── */
.divider {
  height: 1px; background: var(--border-color); margin: 24px 0;
}
.divider-gold {
  height: 2px; background: var(--accent-gradient); border: none;
  margin: 32px 0; opacity: 0.5;
}

/* ───── 25. Animations ───── */
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.6s 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; }

.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.pulse { animation: pulse 2s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ───── 26. Responsive ───── */

/* Tablet ≤1024px */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet ≤768px */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 36px 0; }
  .hero { padding: 64px 20px 36px; }
  .container { padding: 0 20px; }
  .top-bar-inner { padding: 0 20px; }

  .top-nav {
    position: fixed; top: var(--header-h); left: 0; width: 100%;
    background: var(--bg-glass); backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px; flex-direction: column; gap: 2px;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: var(--z-dropdown);
  }
  .top-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .top-nav a { width: 100%; padding: 12px 16px; border-radius: var(--radius-md); }
  .nav-toggle { display: flex; }

  .header-actions .icon-btn-label { display: none; }
  .hide-mobile { display: none !important; }

  .filters-panel {
    position: fixed; top: var(--header-h); left: 0; width: 100%; height: calc(100dvh - var(--header-h));
    z-index: var(--z-dropdown); border-radius: 0; overflow-y: auto;
    transform: translateX(-100%); transition: transform var(--transition-base);
  }
  .filters-panel.open { transform: translateX(0); }
}

/* Mobile ≤480px */
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .card { padding: 18px; }
  .modal { padding: 16px; margin: 8px; }
  .product-card-body { padding: 14px 16px; }
  .product-card-footer { padding: 0 16px 14px; }
  .church-card-body { padding: 16px; }
  .church-card-stats { padding: 12px 16px; }
  .hero { padding: 48px 16px 32px; }
  .breadcrumbs { padding: 10px 0; font-size: 0.75rem; }
}

/* ───── 27. Print ───── */
@media print {
  .top-bar, .nav-toggle, .header-actions, .luchik-widget,
  .breadcrumbs, .pagination, .filters-panel, .toast-container { display: none !important; }
  body { background: white; color: black; }
  .card, .product-card, .church-card { break-inside: avoid; box-shadow: none; }
}

/* ───── 28. Utility classes ───── */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 600; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mr-8 { margin-right: 8px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.rounded-lg { border-radius: var(--radius-lg); }
