@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@300;400;500;600;700;900&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

:root {
  --bg: #f5f2ee;
  --bg2: #edeae4;
  --surface: #ffffff;
  --surface2: #faf8f5;
  --border: #ddd9d2;
  --text: #1a1714;
  --muted: #7a7570;
  --accent: #c8502a;
  --accent-h: #b34422;
  --accent2: #2a6e5a;
  --accent3: #4a5fa8;
  --shadow: 0 2px 16px rgba(26,23,20,.08);
  --shadow-lg: 0 8px 40px rgba(26,23,20,.13);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --nav-bg: rgba(245,242,238,.92);
  --hero-bg: #1a1714;
  --font: 'Geologica', sans-serif;
  --font-display: 'Playfair Display', serif;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #111009;
  --bg2: #1a1814;
  --surface: #1e1c17;
  --surface2: #252219;
  --border: #2e2b24;
  --text: #ede9e2;
  --muted: #7a7468;
  --accent: #d96040;
  --accent-h: #c8502a;
  --accent2: #3a9e7a;
  --accent3: #6070c0;
  --shadow: 0 2px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.55);
  --nav-bg: rgba(17,16,9,.93);
  --hero-bg: #0a0906;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px;
  gap: 24px;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent);
  margin-right: auto;
  letter-spacing: -.01em;
}
.navbar-links { display: flex; gap: 4px; align-items: center; }
.navbar-links a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: var(--transition);
}
.navbar-links a:hover, .navbar-links a.active {
  background: var(--bg2);
  color: var(--text);
}
.navbar-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: var(--transition);
  letter-spacing: .01em;
}
.navbar-btn:hover { background: var(--accent-h); }
.navbar-btn.outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.navbar-btn.outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem;
  transition: var(--transition); cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,80,42,.3); }
.btn-secondary { background: var(--bg2); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--accent); }
.btn-green { background: var(--accent2); color: #fff; }
.btn-green:hover { background: #1f5445; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }

/* ── FORM ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.95rem; color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,80,42,.1); }
.form-control::placeholder { color: var(--muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7570' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
[data-theme="dark"] select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ede9e2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: rgba(200,80,42,.25); }
.card-img { width: 100%; height: 200px; object-fit: cover; background: var(--bg2); }
.card-img-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--bg2), var(--border));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--muted);
}
.card-body { padding: 18px; }
.card-tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(200,80,42,.1); color: var(--accent); margin-bottom: 8px;
}
.card-tag.green { background: rgba(42,110,90,.1); color: var(--accent2); }
.card-tag.blue  { background: rgba(74,95,168,.1);  color: var(--accent3); }
.card-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; line-height: 1.3; }
.card-meta { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.card-price { font-weight: 700; color: var(--accent); font-size: 1rem; margin-top: 10px; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-red    { background: rgba(200,80,42,.12);  color: var(--accent); }
.badge-green  { background: rgba(42,110,90,.12);  color: var(--accent2); }
.badge-blue   { background: rgba(74,95,168,.12);  color: var(--accent3); }
.badge-gray   { background: var(--bg2); color: var(--muted); }
.verified-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 20px; font-size: .68rem; font-weight: 700;
  background: rgba(42,110,90,.13); color: var(--accent2);
  border: 1px solid rgba(42,110,90,.25); vertical-align: middle; margin-left: 4px;
}

/* ── SECTION ── */
.section { padding: 48px 32px; max-width: 1200px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  margin-bottom: 8px; line-height: 1.2;
}
.section-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 32px; }

/* ── GRID ── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .section { padding: 32px 16px; } .navbar { padding: 0 16px; } }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border); margin-bottom: 28px; }
.tab-btn {
  padding: 10px 20px; border-radius: 8px 8px 0 0;
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  border: none; background: none; cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -1.5px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── STARS ── */
.stars { display: flex; gap: 2px; color: #f0b429; font-size: 1rem; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--text); color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 500;
  transform: translateY(80px); opacity: 0;
  transition: .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { background: var(--accent); }
#toast.success { background: var(--accent2); }

/* ── LOADER ── */
.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--muted); font-size: 0.9rem; gap: 10px;
}
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY ── */
.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,23,20,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px; width: 100%; max-width: 460px;
  transform: scale(.95) translateY(10px); transition: .25s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; font-size: 1.3rem; color: var(--muted); cursor: pointer; }

/* page fade-in */
.page-enter { animation: pageIn .4s ease both; }
@keyframes pageIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ── FOOTER ── */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 64px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 32px 24px; }

.footer-sub { margin-bottom: 40px; }
.footer-sub-title { font-weight: 600; font-size: 1rem; margin-bottom: 14px; }
.footer-sub-form { display: flex; gap: 0; max-width: 480px; }
.footer-sub-input {
  flex: 1; padding: 12px 18px; border: 1.5px solid var(--border);
  border-right: none; border-radius: 10px 0 0 10px;
  background: var(--bg); color: var(--text); font-size: .9rem;
  outline: none; transition: var(--transition);
}
.footer-sub-input:focus { border-color: var(--accent); }
.footer-sub-btn {
  padding: 12px 24px; background: var(--text); color: var(--bg);
  border: none; border-radius: 0 10px 10px 0; font-weight: 700;
  font-size: .9rem; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.footer-sub-btn:hover { background: var(--accent); color: #fff; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
@media (max-width: 700px) { .footer-links { grid-template-columns: 1fr; gap: 24px; } }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title { font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-col a { font-size: .88rem; color: var(--muted); transition: var(--transition); }
.footer-col a:hover { color: var(--text); }

.footer-pay-methods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.footer-pay-badge {
  padding: 3px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700;
  background: var(--bg2); color: var(--muted); border: 1px solid var(--border);
  letter-spacing: .03em;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--muted);
}
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { color: var(--muted); font-size: .82rem; font-weight: 600; transition: var(--transition); }
.footer-socials a:hover { color: var(--text); }

/* ── PAYMENT MODAL ── */
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.pay-method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.pay-method:hover { border-color: var(--accent); background: rgba(200,80,42,.04); }
.pay-method.selected { border-color: var(--accent); background: rgba(200,80,42,.06); }
.pay-method-icon { font-size: 1.6rem; min-width: 40px; width: auto; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.pay-method-info { flex: 1; }
.pay-method-name { font-weight: 700; font-size: .95rem; }
.pay-method-desc { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.pay-method-badge { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: rgba(42,110,90,.12); color: var(--accent2); }

/* ── OAUTH BUTTONS ── */
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 18px; border-radius: 10px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); color: #fff;
  font-family: var(--font);
}
.btn-gosuslugi { background: #0065B3; }
.btn-gosuslugi:hover { background: #0052a0; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,101,179,.35); }
.btn-max { background: #0077FF; }
.btn-max:hover { background: #0062e0; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,119,255,.35); }
.btn-oauth-icon {
  width: 22px; height: 22px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); font-size: .8rem; font-weight: 900; flex-shrink: 0;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── SELECTION ── */
::selection { background: rgba(200,80,42,.18); }

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

/* ── TEXTAREA ── */
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.6; }

/* ── BUTTON STATES ── */
.btn:active:not(:disabled) { transform: scale(.97) translateY(0) !important; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── REVIEW ITEMS (global) ── */
.review-item {
  border-left: 3px solid var(--accent2) !important;
  transition: border-color var(--transition) !important;
}
.review-item:hover { border-left-color: var(--accent) !important; }

.review-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; overflow: hidden;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-top { display: flex; gap: 10px; align-items: flex-start; }
.review-top-body { flex: 1; min-width: 0; }

/* ── FILTER INPUTS ── */
.filter-input {
  border: 1.5px solid var(--border); outline: none;
  background: var(--surface); border-radius: 20px;
  padding: 6px 14px; font-size: .82rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: var(--transition);
  font-family: var(--font);
}
.filter-input:hover { border-color: rgba(200,80,42,.4); color: var(--text); }
.filter-input:focus { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px rgba(200,80,42,.08); }
label.filter-input { display: flex; align-items: center; gap: 6px; }
label.filter-input input[type="checkbox"] { accent-color: var(--accent); }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.pag-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .88rem; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: var(--transition);
}
.pag-btn:hover { border-color: var(--accent); color: var(--accent); }
.pag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pag-btn:disabled { opacity: .38; cursor: not-allowed; pointer-events: none; }

/* ── EMPTY STATE ── */
.empty {
  text-align: center; padding: 64px 24px; color: var(--muted);
  background: var(--surface); border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* ── TOAST ── */
#toast { box-shadow: 0 8px 30px rgba(0,0,0,.25); border-radius: 12px; max-width: 340px; }

/* ── LINK UNDERLINE UTILITY ── */
.link { color: var(--accent); font-weight: 600; transition: var(--transition); }
.link:hover { color: var(--accent-h); text-decoration: underline; }

/* ── RATING STARS ── */
.rating-star.active { color: #f0b429; }
.rating-star { transition: transform .15s, color .15s !important; }
.rating-star:hover { transform: scale(1.2); }

/* ── SIDEBAR TOP ACCENT ── */
.sidebar-card { border-top: 3px solid var(--accent) !important; }
