/* ============================================
   NIROVA — Common CSS
   Warm marketplace, Manrope font, amber accent
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: 'Manrope', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5; color: #444; background: #F5F5F5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* --- Font Face --- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- CSS Variables --- */
:root {
  --nr-primary: #F5A623;
  --nr-primary-hover: #E09410;
  --nr-primary-light: #FFF3DD;
  --nr-text: #222;
  --nr-body: #444;
  --nr-muted: #888;
  --nr-bg: #F5F5F5;
  --nr-surface: #FFF;
  --nr-border: #E8E8E8;
  --nr-border-hover: #D0D0D0;
  --nr-footer-bg: #2A2A2A;
  --nr-footer-text: #AAA;
  --nr-radius-sm: 6px;
  --nr-radius-md: 10px;
  --nr-radius-lg: 16px;
  --nr-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --nr-shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --nr-shadow-primary: 0 2px 8px rgba(245,166,35,0.25);
}

/* --- Utilities --- */
.nr-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Buttons --- */
.nr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--nr-radius-md);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.nr-btn--primary {
  background: var(--nr-primary);
  color: #fff;
  box-shadow: var(--nr-shadow-primary);
}
.nr-btn--primary:hover {
  background: var(--nr-primary-hover);
  transform: translateY(-1px);
}
.nr-btn--block { width: 100%; }
.nr-btn--lg { padding: 14px 24px; font-size: 16px; }
.nr-btn__icon { display: flex; }
.nr-btn__icon svg { width: 20px; height: 20px; }

/* --- Header --- */
.nr-header {
  background: var(--nr-primary);
  position: sticky;
  top: 0;
  z-index: 300;
}
.nr-header__top {
  display: flex;
  align-items: center;
  height: 52px;
  gap: 10px;
}
.nr-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--nr-radius-sm);
  flex-shrink: 0;
  color: #fff;
}
.nr-header__menu-btn:hover { background: rgba(255,255,255,0.15); }
.nr-header__menu-btn svg { width: 20px; height: 20px; }
.nr-header__logo { flex-shrink: 0; }
.nr-header__logo-link {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nr-header__logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.nr-header__logo-text {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
}
.nr-header__search {
  flex: 1;
  min-width: 0;
  position: relative;
}
.nr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  background: #fff;
  border: none;
  border-radius: 20px;
  transition: box-shadow 0.15s;
}
.nr-search:focus-within {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}
.nr-search__icon { display: flex; flex-shrink: 0; color: var(--nr-muted); }
.nr-search__icon svg { width: 16px; height: 16px; }
.nr-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--nr-text);
}
.nr-search__input::placeholder { color: var(--nr-muted); }
.nr-search__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 400px;
  overflow-y: auto;
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-md);
  box-shadow: var(--nr-shadow-md);
  z-index: 310;
  padding: 8px;
}
.nr-search__dropdown.is-open { display: block; }
.nr-search__group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--nr-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 8px 4px;
}
.nr-search__items { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px 8px; }
.nr-search__link {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--nr-body);
  border-radius: var(--nr-radius-sm);
  transition: background 0.12s;
}
.nr-search__link:hover { background: var(--nr-primary-light); color: var(--nr-text); }
.nr-search__link[hidden] { display: none; }
.nr-header__city {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
  white-space: nowrap;
}
.nr-header__city svg { width: 14px; height: 14px; }

/* --- Backdrop --- */
.nr-nav__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 290;
  animation: nrFadeIn 0.2s ease-out;
}
.nr-nav__backdrop.is-visible { display: block; }

/* --- Sidebar Menu (left slide) --- */
.nr-sidebar-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
}
.nr-sidebar-menu.is-open { display: block; }
.nr-sidebar-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  animation: nrFadeIn 0.2s ease-out;
}
@keyframes nrSlideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.nr-sidebar-menu__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 85vw;
  max-width: 320px;
  background: var(--nr-surface);
  overflow-y: auto;
  animation: nrSlideRight 0.25s ease-out;
  display: flex;
  flex-direction: column;
}
.nr-sidebar-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nr-border);
  flex-shrink: 0;
}
.nr-sidebar-menu__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--nr-text);
}
.nr-sidebar-menu__logo img { width: 32px; height: 32px; border-radius: 8px; }
.nr-sidebar-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nr-bg);
}
.nr-sidebar-menu__close svg { width: 18px; height: 18px; }
.nr-sidebar-menu__section { flex: 1; }
.nr-sidebar-menu__section-title {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--nr-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nr-sidebar-menu__group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nr-text);
}
.nr-sidebar-menu__group-toggle span { flex: 1; text-align: left; }
.nr-sidebar-menu__group-toggle svg { width: 16px; height: 16px; color: var(--nr-muted); }
.nr-sidebar-menu__group-toggle svg:first-child { color: var(--nr-primary); }
.nr-sidebar-menu__group-toggle svg:last-child { transition: transform 0.2s; }
.nr-sidebar-menu__group.is-expanded .nr-sidebar-menu__group-toggle svg:last-child {
  transform: rotate(180deg);
}
.nr-sidebar-menu__items {
  display: none;
  padding: 0 16px 8px 40px;
  flex-wrap: wrap;
  gap: 4px;
}
.nr-sidebar-menu__group.is-expanded .nr-sidebar-menu__items { display: flex; }
.nr-sidebar-menu__link {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--nr-body);
  background: var(--nr-bg);
  border-radius: var(--nr-radius-sm);
}
.nr-sidebar-menu__link:hover { background: var(--nr-primary-light); }
.nr-sidebar-menu__footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--nr-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.nr-sidebar-menu__footer a { font-size: 13px; color: var(--nr-muted); }

/* --- Trust Bar --- */
.nr-trust-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin: 12px 0;
  background: var(--nr-primary-light);
  border-radius: var(--nr-radius-md);
}
.nr-trust-bar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--nr-body);
}
.nr-trust-bar__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--nr-primary);
}
.nr-trust-bar__icon svg { width: 18px; height: 18px; }

/* --- Vote Buttons --- */
.nr-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--nr-muted);
  border-radius: var(--nr-radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nr-vote:hover { background: var(--nr-bg); }
.nr-vote svg { width: 16px; height: 16px; }
.nr-vote.is-active { color: var(--nr-primary); }
.nr-vote--fav.is-active { color: #E53935; }

/* --- Footer --- */
.nr-footer {
  background: var(--nr-footer-bg);
  padding: 32px 0 20px;
  margin-top: 32px;
}
.nr-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nr-footer__brand {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.nr-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.nr-footer__link {
  font-size: 14px;
  color: var(--nr-footer-text);
  transition: color 0.15s;
}
.nr-footer__link:hover { color: #fff; }
.nr-footer__bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.nr-footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* --- Main --- */
.nr-main {
  min-height: calc(100vh - 160px);
  padding: 12px 0;
}

/* --- Animations --- */
@keyframes nrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes nrSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes nrSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* --- Desktop (580px) --- */
@media (min-width: 580px) {
  .nr-header__city { display: flex; }
}

/* --- Desktop (640px) --- */
@media (min-width: 640px) {
  .nr-trust-bar {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --- Desktop (768px) --- */
@media (min-width: 768px) {
  .nr-container { padding: 0 24px; }
  .nr-header__top { height: 56px; }
  .nr-header__menu-btn { display: none; }
  .nr-header__logo-text { font-size: 18px; }
}

/* --- Desktop (1200px) --- */
@media (min-width: 1200px) {
  .nr-container { padding: 0 40px; }
}
