/* ================================================================
   FIFOZONE — PREMIUM MOBILE MENU (Supertails-Inspired)
   Mobile-only. All classes prefixed .fifo-m-
   ================================================================ */

/* ── Backdrop ── */
.fifo-m-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 320ms ease;
}
.fifo-m-backdrop.active {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* ── Drawer Shell ── */
.fifo-m-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(340px, 88vw);
  height: 100dvh;
  z-index: 99999;
  background: #ffffff;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
  transform: translateX(-105%);
  transition: transform 350ms cubic-bezier(0.22, 0.9, 0.28, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}
.fifo-m-drawer.open {
  transform: translateX(0);
}

/* ── Profile Banner ── */
.fifo-m-profile {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #db2777 100%);
  padding: 28px 22px 22px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.fifo-m-profile::before {
  content: '🐾';
  position: absolute;
  font-size: 120px;
  opacity: 0.06;
  bottom: -20px;
  right: -10px;
  transform: rotate(-15deg);
  pointer-events: none;
}
.fifo-m-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fifo-m-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.fifo-m-avatar svg {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.7);
}
.fifo-m-profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.fifo-m-greeting {
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
}
.fifo-m-user-detail {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fifo-m-profile-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 4px;
  opacity: 0.85;
  transition: opacity 200ms;
}
.fifo-m-profile-link:hover {
  opacity: 1;
}

/* ── Close Button ── */
.fifo-m-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms;
  z-index: 2;
}
.fifo-m-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.fifo-m-close svg {
  width: 18px;
  height: 18px;
}

/* ── Scrollable Body ── */
.fifo-m-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* ── Panel System (for slide transitions) ── */
.fifo-m-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  background: #ffffff;
  transition: transform 300ms cubic-bezier(0.22, 0.9, 0.28, 1),
              opacity 250ms ease;
}
.fifo-m-panel-main {
  transform: translateX(0);
  opacity: 1;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}
.fifo-m-panel-main.slide-out {
  transform: translateX(-30%);
  opacity: 0.3;
  pointer-events: none;
}
.fifo-m-panel-sub {
  transform: translateX(105%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.fifo-m-panel-sub.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Section Dividers ── */
.fifo-m-divider {
  height: 8px;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.fifo-m-divider-thin {
  height: 1px;
  background: #f3f4f6;
  margin: 0 20px;
}

/* ── Section Title ── */
.fifo-m-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 16px 22px 8px;
}

/* ── Menu Item Row ── */
.fifo-m-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 14px 22px !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: #111827 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background 150ms !important;
  border: none !important;
  background: transparent !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  position: relative !important;
  flex-direction: row !important;
  height: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.fifo-m-item:active {
  background: #f5f3ff;
}
.fifo-m-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f5f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.fifo-m-item-label {
  flex: 1 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
  color: #111827 !important;
  display: block !important;
}
.fifo-m-item-chevron {
  width: 20px;
  height: 20px;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color 200ms;
}
.fifo-m-item:hover .fifo-m-item-chevron {
  color: #7c3aed;
}

/* ── Account Items with SVG icons ── */
.fifo-m-item .fifo-m-item-svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f5f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fifo-m-item .fifo-m-item-svg svg {
  width: 18px;
  height: 18px;
  color: #7c3aed;
}

/* ── Logout ── */
.fifo-m-logout {
  color: #ef4444;
  font-weight: 600;
}
.fifo-m-logout .fifo-m-item-svg {
  background: #fef2f2;
}
.fifo-m-logout .fifo-m-item-svg svg {
  color: #ef4444;
}

/* ── Back Button (subcategory panel) ── */
.fifo-m-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  background: #f9fafb;
  width: 100%;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 3;
}
.fifo-m-back svg {
  width: 20px;
  height: 20px;
  color: #7c3aed;
  flex-shrink: 0;
}

/* ── Subcategory Item ── */
.fifo-m-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  text-decoration: none;
  color: #374151;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
  transition: background 150ms;
}
.fifo-m-sub-item:active {
  background: #f5f3ff;
}
.fifo-m-sub-item-chevron {
  width: 18px;
  height: 18px;
  color: #d1d5db;
  flex-shrink: 0;
}

/* ── Browse All link inside subcategory ── */
.fifo-m-browse-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  text-decoration: none;
  color: #7c3aed;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid #e5e7eb;
  background: #faf5ff;
}
.fifo-m-browse-all svg {
  width: 16px;
  height: 16px;
}

/* ── Footer ── */
.fifo-m-footer {
  flex-shrink: 0;
  padding: 16px 22px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  text-align: center;
}
.fifo-m-footer-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #9ca3af;
}
.fifo-m-footer-brand {
  color: #7c3aed;
  font-weight: 700;
}

/* ── Hide on desktop ── */
@media (min-width: 769px) {
  .fifo-m-drawer,
  .fifo-m-backdrop {
    display: none !important;
  }
}
