/* =========================
   header.css — EmpireG.RU v2
   ========================= */

:root {
  --header-top-h: 60px;
}

body.no-scroll { overflow: hidden !important; }

:focus-visible {
  outline: 3px solid rgba(73, 181, 69, 0.75);
  outline-offset: 2px;
}

/* =========================
   Container
   ========================= */
.container-header {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* =========================
   Top Bar (fixed)
   ========================= */
.header_top {
  background: linear-gradient(135deg, #23242a 0%, #2a2b33 100%);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 0;
  isolation: isolate;
}

.header_top .container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 15px;
  position: relative;
  z-index: 20001;
}

/* =========================
   Burger button (mobile)
   ========================= */
.header_mobile_btns {
  display: none;
}

.header_mobile_btns button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 20002;
  pointer-events: auto;
}

.header_mobile_btns button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* =========================
   Desktop Nav
   ========================= */
.main_nav {
  flex: 1;
  min-width: 0;
  pointer-events: auto;
}

.main_nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  opacity: 0.92;
}

.nav-link:hover {
  background: rgba(73, 181, 69, 0.2);
  text-decoration: none;
  transform: translateY(-2px);
  opacity: 1;
}

.nav-link--highlight {
  background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
  opacity: 1;
}

.nav-link--highlight:hover {
  background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.4);
}

.nav-link--boosty:hover {
  background: rgba(241, 95, 44, 0.2);
}

/* =========================
   Right-side buttons
   ========================= */
.header_right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 20003;
  pointer-events: auto;
}

/* =========================
   Chat Toggle Button (matches theme-toggle & translate-btn)
   ========================= */
.eg-chat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  animation: chatPulse 2.5s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(73, 181, 69, 0);
    border-color: rgba(255, 255, 255, 0.2);
  }
  25% {
    box-shadow: 0 0 0 6px rgba(73, 181, 69, 0.3);
    border-color: rgba(73, 181, 69, 0.6);
  }
  50% {
    box-shadow: 0 0 0 0 rgba(73, 181, 69, 0);
    border-color: rgba(73, 181, 69, 0.3);
  }
  75% {
    box-shadow: 0 0 0 4px rgba(73, 181, 69, 0.2);
    border-color: rgba(73, 181, 69, 0.5);
  }
}

.eg-chat-toggle:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-chat-toggle--active {
  background: rgba(73, 181, 69, 0.25) !important;
  border-color: #49b545 !important;
  color: #49b545 !important;
  animation: none;
}

.eg-chat-toggle__icon {
  display: block;
  width: 18px;
  height: 18px;
}

.eg-chat-toggle__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* =========================
   Theme Toggle Button (base styles, dark states in dark-theme.css)
   ========================= */
.eg-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.eg-theme-toggle:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.eg-theme-toggle:active svg { transform: rotate(30deg); }
.eg-theme-toggle__sun { display: none; }
.eg-theme-toggle__moon { display: block; }

/* =========================
   Translate Button & Dropdown
   ========================= */
.eg-translate {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.eg-translate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.eg-translate__btn:hover {
  background: rgba(73, 181, 69, 0.3);
  border-color: rgba(73, 181, 69, 0.5);
  transform: translateY(-1px);
}

.eg-translate__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #1e1f24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 25000;
}

.eg-translate__dropdown.is-open {
  display: block;
}

.eg-translate__label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* Hide default Google Translate widget - loaded off-screen for API access */
.eg-translate__dropdown #google_translate_element {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.eg-translate__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

/* Russian reset link - full width at top */
.eg-translate__lang--reset {
  grid-column: 1 / -1;
  background: rgba(73, 181, 69, 0.15);
  border: 1px solid rgba(73, 181, 69, 0.25);
  font-weight: 700 !important;
  margin-bottom: 4px;
  justify-content: center;
}

.eg-translate__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #e5e7eb !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.eg-translate__lang:hover {
  background: rgba(73, 181, 69, 0.2);
  text-decoration: none !important;
}

/* Hide old gtranslate-wrap if still present */
.gtranslate-wrap:not(.eg-translate) { display: none; }

/* =========================
   Profile & Category buttons
   ========================= */
.nav_profile,
.nav_cats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 20004;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.nav_profile:hover,
.nav_cats:hover {
  background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.4);
  transform: translateY(-2px);
}

.nav_main {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-only {
  display: none;
}

/* =========================
   Banner / Logo — FULL WIDTH
   ========================= */
.header_banner {
  margin-top: var(--header-top-h);
  background: linear-gradient(135deg, #1e1f24 0%, #2a2b33 100%);
  padding: 0;
}

.header_banner .logo {
  display: block;
  width: 100%;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.header_banner .logo:hover {
  transform: scale(1.005);
}

.header_banner .logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* =========================
   Search — FULL WIDTH
   ========================= */
.header_search {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 25px 15px;
  border-bottom: 3px solid #49b545;
}

.header_search .container-header {
  display: flex;
  justify-content: center;
}

.search-form {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.search-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}

.search-input-group {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: #6c757d;
  font-size: 18px;
  pointer-events: none;
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 14px 50px 14px 62px;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #fff;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #49b545;
  box-shadow: 0 0 0 4px rgba(73, 181, 69, 0.1);
}

.search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
}

.search-buttons {
  display: flex;
  gap: 10px;
}

.btn-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
  box-shadow: 0 6px 20px rgba(73, 181, 69, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: #49b545;
  border: 2px solid #49b545;
}

.btn-secondary:hover {
  background: #49b545;
  color: #fff;
  transform: translateY(-2px);
}

.search-tips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 15px;
  background: rgba(73, 181, 69, 0.1);
  border-left: 3px solid #49b545;
  border-radius: 6px;
  font-size: 13px;
  color: #495057;
}

/* =========================
   Slider — FULL WIDTH
   ========================= */
.header_slider {
  background: #fff;
  padding: 30px 15px;
  border-bottom: 1px solid #e9ecef;
}

.slider-header {
  margin-bottom: 20px;
}

.slider-title {
  font-size: 24px;
  font-weight: 700;
  color: #23242a;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

/* =========================
   Nav Overlay
   ========================= */
.nav-overlay {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-top-h);
  height: calc(100vh - var(--header-top-h));
  background: rgba(0, 0, 0, 0.55);
  z-index: 15000;
}

.nav-overlay.active {
  display: block;
}

/* =========================
   Profile Modal
   ========================= */
.eg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 30000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.eg-modal-overlay.is-open {
  display: block;
}

.eg-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30001;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #1e1f24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.eg-modal.is-open {
  display: block;
}

.eg-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eg-modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.eg-modal__title i {
  color: #49b545;
}

.eg-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.eg-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.eg-modal__body {
  padding: 20px;
  color: #e5e7eb;
}

/* Style the login form inside modal */
.eg-modal__body #logform {
  width: 100%;
}

.eg-modal__body #logform ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eg-modal__body #logform .lfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eg-modal__body #logform label {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
}

.eg-modal__body #logform label a {
  color: #49b545;
}

.eg-modal__body #logform input[type="text"],
.eg-modal__body #logform input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.eg-modal__body #logform input[type="text"]:focus,
.eg-modal__body #logform input[type="password"]:focus {
  border-color: #49b545;
  box-shadow: 0 0 0 3px rgba(73, 181, 69, 0.15);
}

.eg-modal__body #logform input[type="checkbox"] {
  accent-color: #49b545;
}

.eg-modal__body #logform .lfchek {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.eg-modal__body #logform .lfchek label {
  color: #d1d5db;
  font-weight: 400;
}

.eg-modal__body .btn_bl {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.eg-modal__body .btn_bl li {
  flex: 1;
}

.eg-modal__body .btn_bl a.btn,
.eg-modal__body .btn_bl button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  text-transform: uppercase;
}

.eg-modal__body .btn_bl a.btn.color-6 {
  background: #49b545;
  color: #fff;
}

.eg-modal__body .btn_bl a.btn.color-6:hover {
  background: #5cc55f;
}

.eg-modal__body .btn_bl button.color-2 {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.eg-modal__body .btn_bl button.color-2:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Logged-in user panel in modal */
.eg-modal__body .ava_bl {
  text-align: center;
  margin-bottom: 16px;
}

.eg-modal__body .ava_bl img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #49b545;
  object-fit: cover;
}

.eg-modal__body .user_nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eg-modal__body .user_nav li {
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.eg-modal__body .user_nav li:hover {
  background: rgba(255, 255, 255, 0.06);
}

.eg-modal__body .user_nav a {
  color: #e5e7eb;
  font-weight: 500;
}

.eg-modal__body .user_nav a:hover {
  color: #49b545;
  text-decoration: none;
}

/* =========================
   Carousel
   ========================= */
.game-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  user-select: none;
}

.carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-item {
  flex: 0 0 auto;
  width: 180px;
  position: relative;
  cursor: pointer;
}

.carousel-item .item-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.carousel-item .item-link:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(73, 181, 69, 0.3);
}

.carousel-item .item-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border: none !important;
  transition: transform 0.3s ease;
}

.carousel-item .item-link:hover .item-img {
  transform: scale(1.05);
}

.carousel-control {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #49b545 0%, #2bb42b 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.3);
  flex-shrink: 0;
}

.carousel-control:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.game-carousel.is-dragging a,
.game-carousel.is-dragging .item-link {
  pointer-events: none;
}

/* =========================
   Last Comments Widget
   ========================= */
.eg-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eg-comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}

.eg-comment-item:last-child {
  border-bottom: none;
}

.eg-comment-item:hover {
  background: rgba(73, 181, 69, 0.04);
}

.eg-comment-item__avatar {
  flex-shrink: 0;
}

.eg-comment-item__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  display: block;
}

.eg-comment-item__body {
  flex: 1;
  min-width: 0;
}

.eg-comment-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.eg-comment-item__user {
  font-weight: 700;
  font-size: 13px;
  color: #1f2937;
  text-decoration: none;
}

.eg-comment-item__user:hover {
  color: #49b545;
  text-decoration: none;
}

.eg-comment-item__date {
  font-size: 11px;
  color: #9ca3af;
}

.eg-comment-item__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #49b545;
  text-decoration: none;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.eg-comment-item__title:hover {
  text-decoration: underline;
}

.eg-comment-item__text {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* =========================
   MOBILE RESPONSIVE
   ========================= */
@media (max-width: 1024px) {
  .nav-link span { display: none; }
  .nav-link { padding: 10px 12px; }
}

@media (max-width: 768px) {
  :root {
    --header-top-h: 55px;
  }

  /* Show burger */
  .header_mobile_btns { display: block; }
  .nav_main { display: inline-flex; }

  /* Top bar always on top */
  .header_top {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 2147483647 !important;
  }

  /* Hide label text on buttons */
  .nav_profile span { display: none; }
  .mobile-only { display: inline-flex; }

  /* Banner - account for fixed header */
  .header_banner {
    padding: 0;
    margin-top: var(--header-top-h);
  }
  .header_banner .logo img { border-radius: 0; }

  /* Offcanvas: Main Nav (burger) */
  .main_nav {
    position: fixed !important;
    top: var(--header-top-h) !important;
    left: -340px !important;
    width: 300px !important;
    height: calc(100vh - var(--header-top-h)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 12px !important;
    background: #23242a !important;
    z-index: 16000 !important;
    transition: left 0.25s ease !important;
    pointer-events: none !important;
    box-sizing: border-box;
  }
  .main_nav.is-open {
    left: 0 !important;
    pointer-events: auto !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }
  .main_nav ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
  }
  .main_nav .nav-link {
    width: 100%;
    padding: 14px 18px;
  }
  .main_nav .nav-link span { display: inline; }

  /* Offcanvas: Aside Left (categories) */
  .aside_l {
    position: fixed !important;
    top: var(--header-top-h) !important;
    left: -340px !important;
    width: 300px !important;
    height: calc(100vh - var(--header-top-h)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    background: #fff !important;
    z-index: 16500 !important;
    transition: left 0.25s ease !important;
    pointer-events: none !important;
    box-sizing: border-box;
    padding-bottom: 80px !important;
  }
  .aside_l.open_panel {
    left: 0 !important;
    pointer-events: auto !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  /* Search responsive */
  .search-wrapper { flex-direction: column; }
  .search-input-group { min-width: 100% !important; }
  .search-buttons { width: 100%; }
  .btn-search { flex: 1; justify-content: center; }

  /* Slider */
  .slider-title { font-size: 20px; }

  /* Touch targets */
  .nav_main, .nav_cats, .nav_profile {
    touch-action: manipulation;
  }

  /* Translate dropdown - full width on mobile */
  .eg-translate__dropdown {
    position: fixed;
    top: var(--header-top-h);
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0 0 12px 12px;
  }
  .eg-translate__links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .header_top .container-header { padding: 10px 12px; }
  .search-input { padding: 12px 45px 12px 58px; font-size: 14px; }
  .header_search { padding: 20px 10px; }
  .header_slider { padding: 20px 10px; }
  .slider-title { font-size: 18px; }

  .eg-translate__links {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop: hide site-overlay */
@media (min-width: 1025px) {
  .site-overlay { display: none; }
}
