/* Mobile Menu Styles - Separate from Desktop */

/* Mobile Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 10px;
  z-index: 10001;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu-panel.open {
  right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 5px;
}

/* Mobile Menu Items */
.mobile-menu-items {
  padding: 0;
  margin: 0;
  list-style: none;
}

.mobile-menu-item {
  border-bottom: 1px solid #eee;
}

.mobile-menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}

.mobile-menu-link:hover {
  background: #f8f9fa;
}

/* Updated mobile submenu to display mega menu with product categories and images */
/* Mobile Mega Menu Submenu */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  background: #f8f9fa;
  transition: max-height 0.3s ease;
  padding: 0;
}

.mobile-submenu.expanded {
  max-height: 800px;
  padding: 15px;
}

.mobile-mega-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mobile-mega-category {
  display: flex;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.mobile-mega-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mobile-mega-category-image {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.mobile-mega-category-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-mega-category-title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.mobile-mega-category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 34px;
  padding: 0 14px;
  min-width: 116px;
  white-space: nowrap;

  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.mobile-submenu .mobile-mega-category .mobile-mega-category-btn,
.mobile-mega-categories .mobile-mega-category .mobile-mega-category-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: 36px !important;
  padding: 0 16px !important;
  min-width: 110px !important;

  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  white-space: nowrap !important;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.mobile-submenu .mobile-mega-category .mobile-mega-category-btn:active,
.mobile-mega-categories .mobile-mega-category .mobile-mega-category-btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.mobile-mega-category-btn:active {
  transform: translateY(0);
}

/* Optional arrow */
.mobile-mega-category-btn::after,
.mobile-mega-category a.shop-now::after,
.mobile-mega-category .shop-now::after,
.mobile-mega-category a.cta::after,
.mobile-mega-category .cta::after {
  content: "›";
  font-size: 16px;
  margin-left: 4px;
  line-height: 1;
}

/* Color variations for mobile categories */
.mobile-mega-category[data-color="brown"] .mobile-mega-category-btn {
  background: #8b4513;
  color: white;
}

.mobile-mega-category[data-color="red"] .mobile-mega-category-btn {
  background: #dc143c;
  color: white;
}

.mobile-mega-category[data-color="yellow"] .mobile-mega-category-btn {
  background: #ffd700;
  color: #333;
}

.mobile-mega-category[data-color="teal"] .mobile-mega-category-btn {
  background: #008080;
  color: white;
}

.mobile-mega-category[data-color="orange"] .mobile-mega-category-btn {
  background: #ff8c00;
  color: white;
}

.mobile-mega-category[data-color="darkred"] .mobile-mega-category-btn {
  background: #8b0000;
  color: white;
}

.mobile-mega-category[data-color="green"] .mobile-mega-category-btn {
  background: #228b22;
  color: white;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .mega-menu-items {
    display: none;
  }

  .mobile-menu-panel {
    width: 280px;
  }

  .mobile-mega-category-content {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .mobile-mega-category-title {
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mobile-mega-category-btn {
    height: 34px !important;
    min-width: 112px !important;
    padding: 0 14px !important;
    border-radius: 9999px !important;
  }
}

@media (max-width: 480px) {
  .mobile-menu-panel {
    width: 100%;
    right: -100%;
  }

  .mobile-menu-panel.open {
    right: 0;
  }

  .mobile-mega-categories {
    gap: 8px;
  }

  .mobile-mega-category {
    padding: 10px;
  }

  .mobile-mega-category-image {
    width: 48px;
    height: 48px;
  }

  .mobile-mega-category-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
}
