/* ============================================
   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-surface);
  border-bottom: 1px solid var(--nr-border);
  position: sticky;
  top: 0;
  z-index: 300;
}
.nr-header__top {
  display: flex;
  align-items: center;
  height: 52px;
  gap: 12px;
}
.nr-header__logo {
  flex-shrink: 0;
}
.nr-header__logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nr-header__logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.nr-header__logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--nr-text);
  letter-spacing: -0.3px;
}
.nr-header__city {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--nr-muted);
  margin-left: auto;
}
.nr-header__city svg { width: 14px; height: 14px; }
.nr-header__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nr-radius-sm);
  flex-shrink: 0;
}
.nr-header__burger:hover { background: var(--nr-bg); }
.nr-header__burger svg { width: 22px; height: 22px; }

/* --- Quick Nav --- */
.nr-nav__quick-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 0 8px;
}
.nr-nav__quick-wrap::-webkit-scrollbar { display: none; }
.nr-nav__quick {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.nr-nav__quick-link {
  display: inline-block;
  padding: 5px 12px;
  background: var(--nr-primary-light);
  color: var(--nr-text);
  border-radius: var(--nr-radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.nr-nav__quick-link:hover {
  background: var(--nr-primary);
  color: #fff;
}

/* --- Geo Bar --- */
.nr-nav__bar {
  border-top: 1px solid var(--nr-border);
  padding: 6px 0;
}
.nr-nav__bar .nr-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nr-nav__bar .nr-container::-webkit-scrollbar { display: none; }
.nr-nav__bar-item { position: relative; }
.nr-nav__bar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--nr-body);
  background: var(--nr-bg);
  border-radius: var(--nr-radius-sm);
  white-space: nowrap;
  transition: background 0.15s;
}
.nr-nav__bar-btn:hover { background: var(--nr-border); }
.nr-nav__bar-btn svg { width: 14px; height: 14px; }
.nr-nav__bar-btn--filter {
  background: var(--nr-primary);
  color: #fff;
}
.nr-nav__bar-btn--filter:hover {
  background: var(--nr-primary-hover);
}

/* --- Geo Dropdown --- */
.nr-nav__dropdown {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--nr-surface);
  border-radius: var(--nr-radius-lg) var(--nr-radius-lg) 0 0;
  box-shadow: var(--nr-shadow-md);
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
  animation: nrSlideUp 0.25s ease-out;
}
.nr-nav__dropdown.is-open { display: flex; }
.nr-nav__dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  flex-shrink: 0;
}
.nr-nav__dropdown-title { font-size: 16px; font-weight: 600; color: var(--nr-text); }
.nr-nav__dropdown-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nr-bg);
}
.nr-nav__dropdown-close svg { width: 18px; height: 18px; }
.nr-nav__dropdown-search {
  margin: 0 16px 8px;
  padding: 8px 12px;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.nr-nav__dropdown-search:focus { border-color: var(--nr-primary); }
.nr-nav__dropdown-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nr-nav__dropdown-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--nr-body);
  border-radius: var(--nr-radius-sm);
  transition: background 0.12s;
}
.nr-nav__dropdown-link:hover {
  background: var(--nr-primary-light);
  color: var(--nr-text);
}

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

/* --- Mobile Menu (Bottom Sheet) --- */
.nr-bottom-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}
.nr-bottom-sheet.is-open { display: block; }
.nr-bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  animation: nrFadeIn 0.2s ease-out;
}
.nr-bottom-sheet__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--nr-surface);
  border-radius: var(--nr-radius-lg) var(--nr-radius-lg) 0 0;
  overflow-y: auto;
  animation: nrSlideUp 0.25s ease-out;
  padding-bottom: 24px;
}
.nr-bottom-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--nr-border);
  border-radius: 2px;
  margin: 10px auto 4px;
}
.nr-bottom-sheet__title {
  padding: 8px 16px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--nr-text);
}
.nr-bottom-sheet__category-title {
  padding: 8px 16px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--nr-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nr-bottom-sheet__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nr-text);
}
.nr-bottom-sheet__group-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  color: var(--nr-muted);
}
.nr-bottom-sheet__group.is-expanded .nr-bottom-sheet__group-toggle svg {
  transform: rotate(180deg);
}
.nr-bottom-sheet__items {
  display: none;
  padding: 0 16px 8px;
  flex-wrap: wrap;
  gap: 4px;
}
.nr-bottom-sheet__group.is-expanded .nr-bottom-sheet__items {
  display: flex;
}
.nr-bottom-sheet__link {
  display: inline-block;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--nr-body);
  background: var(--nr-bg);
  border-radius: var(--nr-radius-sm);
}
.nr-bottom-sheet__link:hover {
  background: var(--nr-primary-light);
}
.nr-bottom-sheet__static {
  margin-top: 12px;
  padding: 12px 16px 0;
  border-top: 1px solid var(--nr-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.nr-bottom-sheet__static 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-nav__bar .nr-container { overflow: visible; }
  .nr-nav__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    bottom: auto;
    right: auto;
    margin-top: 6px;
    max-height: 400px;
    width: 420px;
    border-radius: var(--nr-radius-md);
    animation: nrFadeIn 0.15s ease-out;
  }
}

/* --- 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__logo-text { font-size: 20px; }
  .nr-header__burger { display: none; }
}

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