/* ============================================================
   HEADER — solid blue, matches live RomsMania look
   ============================================================ */
.rm-header {
  position: sticky;
  top: 0;
  z-index: var(--rm-z-header, 100);
  background: var(--rm-blue);
  border-bottom: 3px solid var(--rm-orange);
  box-shadow: 0 4px 12px rgba(13,15,26,0.10);
}
.rm-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  min-height: 76px;
}

/* Logo */
.rm-header__logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  transition: opacity var(--rm-transition), transform var(--rm-transition);
}
.rm-header__logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.rm-header__logo-text {
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}
.rm-header__logo-text span {
  color: var(--rm-orange);
}
.rm-header__logo img,
.rm-header__logo-image {
  display: block;
  max-height: 54px;
  width: auto;
}
.rm-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  transition: all var(--rm-transition);
  overflow: hidden;
}
.rm-search-form:focus-within {
  border-color: var(--rm-orange);
  box-shadow: 0 0 0 3px rgba(244,126,30,0.25);
}
.rm-search-form__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 0.95rem;
  color: var(--rm-text);
  outline: none;
}
.rm-search-form__input::placeholder {
  color: var(--rm-text-light);
}
.rm-search-form__btn {
  background: var(--rm-orange);
  color: #fff;
  border: none;
  width: 52px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--rm-transition);
  align-self: center;
  margin-right: 4px;
  border-radius: 4px;
}
.rm-search-form__btn:hover {
  background: var(--rm-orange-dark);
}
.rm-search-form__icon {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

/* Nav — pills like live site (NINTENDO ▾ SEGA ▾ SONY ▾ XBOX ▾ PC) */
.rm-header__nav {
  flex-shrink: 0;
  margin-left: auto;
}
.rm-nav__list {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rm-nav__list li {
  position: relative;
}
.rm-nav__list li a,
.rm-nav__list .menu-item a {
  display: block;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: all var(--rm-transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.rm-nav__list li a:hover,
.rm-nav__list .current-menu-item > a {
  border-color: rgba(244,126,30,0.55);
  color: #fff;
  background: rgba(0,0,0,0.18);
}

/* Dropdown submenus (for NINTENDO ▾ SEGA ▾ etc.) */
.rm-nav__list .sub-menu,
.rm-nav__list ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 2px solid var(--rm-blue);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(13,15,26,0.20);
  padding: 8px 0;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}
.rm-nav__list li:hover > .sub-menu,
.rm-nav__list li:hover > ul,
.rm-nav__list li:focus-within > .sub-menu,
.rm-nav__list li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.rm-nav__list .sub-menu li a,
.rm-nav__list ul li a {
  padding: 10px 18px;
  font-size: 0.82rem;
  color: var(--rm-text);
  border: none;
  border-radius: 0;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 700;
}
.rm-nav__list .sub-menu li a:hover,
.rm-nav__list ul li a:hover {
  background: var(--rm-bg-alt);
  color: var(--rm-blue);
}

/* Mobile toggle */
.rm-header__mobile-toggle {
  display: none;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  padding: 10px 12px;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.rm-header__mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--rm-transition);
}
.rm-header__mobile-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.rm-header__mobile-toggle.active span:nth-child(2) { opacity: 0; }
.rm-header__mobile-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   OFFER BANNER — sticky under header — GREEN, CENTERED
   ============================================================ */
.rm-offer-banner {
  background: var(--rm-green) !important;
  color: #fff !important;
  padding: 6px 0;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 2px solid var(--rm-green-dark);
  position: relative;
  z-index: 90;
}
.rm-offer-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  flex-wrap: nowrap;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}
.rm-offer-banner__icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.30));
}
.rm-offer-banner__text {
  color: #fff !important;
}
.rm-offer-banner__link {
  color: #fff !important;
  text-decoration: underline;
  font-weight: 800;
  transition: color var(--rm-transition);
}
.rm-offer-banner__link:hover {
  color: var(--rm-yellow) !important;
}
.rm-offer-banner__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.80);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 8px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: color var(--rm-transition);
}
.rm-offer-banner__close:hover {
  color: #fff;
}

.rm-page-search-bar {
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(26,29,46,0.08);
}
.rm-page-search-bar .rm-container {
  padding-top: 16px;
  padding-bottom: 16px;
}
.rm-search-form--page {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(26,29,46,0.10);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(13,15,26,0.08);
}
.rm-search-form--page .rm-search-form__input {
  padding: 14px 18px;
  font-size: 0.98rem;
}
.rm-search-form--page .rm-search-form__btn {
  width: 52px;
  height: 44px;
  margin-right: 6px;
}

/* ============================================================
   PLATFORM BAR (secondary nav strip — quick access) — hidden on live style
   ============================================================ */
.rm-platform-bar {
  display: none;
  /* kept for fallback if nav menu is empty */
  background: var(--rm-bg-alt);
  border-bottom: 1px solid var(--rm-border);
  padding: 0;
  overflow: hidden;
}
.rm-platform-bar__inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rm-platform-bar__inner::-webkit-scrollbar { display: none; }
.rm-platform-bar__link {
  color: var(--rm-text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--rm-transition);
  border-bottom: 2px solid transparent;
  letter-spacing: 0.03em;
}
.rm-platform-bar__link:hover {
  color: var(--rm-blue);
  border-bottom-color: var(--rm-orange);
}
/* Show platform bar only if there's no primary nav menu */
body.rm-no-nav .rm-platform-bar { display: block; }

/* ============================================================
   MOBILE NAV
   ============================================================ */
.rm-mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(13,15,26,0.96);
  z-index: var(--rm-z-mobile-nav, 110);
  display: none;
  padding-top: 90px;
  overflow-y: auto;
}
.rm-mobile-nav.active { display: block; }
.rm-mobile-nav__inner {
  padding: 24px;
}
.rm-language-switcher--mobile {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.rm-language-switcher--mobile .rm-language-switcher__label {
  color: rgba(255,255,255,0.8);
}
.rm-mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rm-mobile-nav__list li a {
  display: block;
  padding: 16px 20px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 4px;
  border-left: 4px solid var(--rm-orange);
  text-decoration: none;
}
.rm-mobile-nav__list .sub-menu,
.rm-mobile-nav__list ul {
  list-style: none;
  padding: 8px 0 8px 20px;
  margin: 8px 0 0 0;
}
.rm-mobile-nav__list .sub-menu li a,
.rm-mobile-nav__list ul li a {
  padding: 10px 14px;
  font-size: 0.88rem;
  background: transparent;
  border-left-color: rgba(244,126,30,0.30);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .rm-header__nav { display: none; }
  .rm-language-switcher--desktop { display: none; }
  .rm-header__mobile-toggle { display: flex; }
}
@media (max-width: 768px) {
  .rm-header__inner { gap: 12px; padding: 12px 16px; min-height: 64px; }
  .rm-header__logo-text { font-size: 0.9rem; }
  .rm-search-form__input { font-size: 0.88rem; padding: 10px 14px; }
  .rm-search-form__btn { width: 44px; height: 40px; }
  .rm-language-switcher--mobile {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .rm-offer-banner { font-size: 0.82rem; }
  .rm-page-search-bar .rm-container { padding-top: 12px; padding-bottom: 12px; }
  .rm-search-form--page { border-radius: 12px; }
}
@media (max-width: 540px) {
  .rm-header__logo-text { font-size: 0.8rem; }
  .rm-header__logo img,
  .rm-header__logo-image { max-height: 42px; }
  .rm-search-form--page .rm-search-form__input { padding: 12px 14px; }
}

/* ============================================================
   SEARCH AUTOCOMPLETE DROPDOWN
   ============================================================ */
.rm-search-form { position: relative; }
.rm-ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid var(--rm-border, #e4e7ef);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(13,15,26,0.14);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 999;
  max-height: 380px;
  overflow-y: auto;
}
.rm-ac-item { margin: 0; }
.rm-ac-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--rm-text, #1a1d2e);
  transition: background 0.12s ease;
}
.rm-ac-link:hover,
.rm-ac-item.focused .rm-ac-link {
  background: var(--rm-bg-alt, #f7f8fa);
}
.rm-ac-cover {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--rm-border, #e4e7ef);
}
.rm-ac-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rm-ac-title {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-ac-platform {
  font-size: 0.75rem;
  color: var(--rm-text-muted, #6b7280);
  font-weight: 600;
}
