@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.mobile-header { display: none; font-family: "Poppins", sans-serif; }

.mobile-topbar {
  position: fixed; inset: 0 0 auto; z-index: 1200;
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center;
  height: 68px; padding: 0 12px; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle, .mobile-icon-link, .mobile-close-menu {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 0 !important; padding: 0 !important;
  box-sizing: border-box; border: 0; border-radius: 8px; background: transparent;
  color: #242424; line-height: 0; text-decoration: none; box-shadow: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, color 160ms ease, transform 100ms ease;
}

.mobile-menu-toggle { justify-self: start; }
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus-visible,
.mobile-icon-link:hover, .mobile-icon-link:focus-visible,
.mobile-close-menu:hover, .mobile-close-menu:focus-visible {
  background: #f2f2f2; color: #9c0d14; outline: none;
}
.mobile-menu-toggle:focus-visible, .mobile-icon-link:focus-visible,
.mobile-close-menu:focus-visible, .mobile-navbar-links a:focus-visible {
  box-shadow: 0 0 0 3px rgba(156, 13, 20, 0.16);
}
.mobile-menu-toggle:active, .mobile-icon-link:active, .mobile-close-menu:active { transform: scale(0.96); }
.mobile-menu-toggle svg, .mobile-icon-link svg, .mobile-close-menu svg {
  display: block; width: 24px; height: 24px; flex: 0 0 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.mobile-brand { display: flex; align-items: center; justify-content: center; min-width: 0; justify-self: center; }
.mobile-brand img { display: block; width: min(142px, 39vw); max-height: 52px; object-fit: contain; }
.mobile-primary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.mobile-icon-link { position: relative; }
.mobile-cartAmount {
  position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px;
  box-sizing: border-box; border: 2px solid #fff; border-radius: 999px; background: #a20d14;
  color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; opacity: 0;
}

.mobile-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1300; display: flex; flex-direction: column;
  width: min(88vw, 360px); height: 100vh; height: 100dvh; box-sizing: border-box; overflow: hidden;
  visibility: hidden; background: #fff; border-right: 1px solid #e4e4e4;
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.14); transform: translateX(-101%);
  transition: transform 240ms ease, visibility 0s linear 240ms;
}
.mobile-sidebar.active { visibility: visible; transform: translateX(0); transition-delay: 0s; }

.mobile-sidebar-header {
  flex: 0 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px 18px; border-bottom: 1px solid #ededed;
}
.mobile-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.mobile-sidebar-title { color: #181818; font-size: 20px; font-weight: 700; line-height: 1.2; }
.mobile-close-menu { flex: 0 0 42px; background: #f5f5f5; }

.mobile-balance-card {
  display: flex; align-items: center; gap: 11px; min-height: 58px; margin-top: 16px; padding: 10px 12px;
  box-sizing: border-box; border-radius: 8px; background: #f5f5f5;
}
.mobile-balance-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 8px; background: #fff; color: #991017; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.mobile-balance-icon svg, .mobile-nav-icon svg {
  display: block; width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
#mobile-balance {
  display: flex; flex-direction: column; min-width: 0; color: #6b6b6b; font-size: 11px;
  font-weight: 500; line-height: 1.2; text-transform: uppercase;
}
#mobile-balanceNumber {
  margin-top: 3px; overflow: hidden; color: #1d1d1d; font-size: 16px; font-weight: 700;
  line-height: 1.25; text-overflow: ellipsis; text-transform: none; white-space: nowrap;
}

.mobile-sidebar-body {
  flex: 1 1 auto; padding: 14px 12px calc(18px + env(safe-area-inset-bottom)); overflow-x: hidden;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.mobile-nav-label { margin: 4px 10px 8px; color: #8a8a8a; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.mobile-navbar-links { margin: 0; padding: 0; list-style: none; }
.mobile-navbar-links + .mobile-navbar-links { margin-top: 14px; padding-top: 14px; border-top: 1px solid #ededed; }
.mobile-navbar-links li { margin: 2px 0; }
.mobile-navbar-links a {
  display: flex; align-items: center; gap: 13px; min-height: 50px; padding: 0 12px; box-sizing: border-box;
  border-radius: 8px; color: #303030; font-size: 15px; font-weight: 500; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background-color 160ms ease, color 160ms ease;
}
.mobile-nav-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  flex: 0 0 24px; color: #707070;
}
.mobile-navbar-links a:hover, .mobile-navbar-links a:focus-visible { background: #f4f4f4; color: #151515; outline: none; }
.mobile-navbar-links a.active, .mobile-navbar-links a[aria-current="page"] {
  background: #f9eeee; color: #980f16; font-weight: 600;
}
.mobile-navbar-links a.active .mobile-nav-icon, .mobile-navbar-links a[aria-current="page"] .mobile-nav-icon { color: #980f16; }

.mobile-overlay {
  position: fixed; inset: 0; z-index: 1250; visibility: hidden; background: rgba(15, 15, 15, 0.56);
  opacity: 0; pointer-events: none; transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.mobile-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
body.mobile-menu-open { overflow: hidden; touch-action: none; }

@media (max-width: 800px) {
  html, body { overflow-x: hidden; }
  body { padding-top: 68px; }
  .header { display: none !important; }
  .mobile-header { display: block; }
}

@media (max-width: 360px) {
  .mobile-topbar { grid-template-columns: 88px minmax(0, 1fr) 88px; padding-inline: 8px; }
  .mobile-menu-toggle, .mobile-icon-link { width: 40px; height: 40px; }
  .mobile-primary-actions { gap: 2px; }
  .mobile-brand img { width: min(128px, 37vw); }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-sidebar, .mobile-overlay, .mobile-menu-toggle, .mobile-icon-link,
  .mobile-close-menu, .mobile-navbar-links a { transition: none; }
}
