/* FIXED OVERFLOW MENU - RIGHT SIDE SLIDE */
.overflow-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overflow-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

.overflow-menu-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.overflow-menu-panel.show {
  right: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .overflow-menu-panel {
    width: 100%;
    right: -100%;
  }
  
  .overflow-menu-panel.show {
    right: 0;
  }
}

.overflow-menu-trigger {
  background: var(--light-color);
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary-color);
  font-size: 16px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  outline: none;
}

.overflow-menu-trigger:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* USER PROFILE SECTION */
.user-profile-section {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  color: white;
  padding: 30px 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-phone {
  font-size: 14px;
  opacity: 0.9;
}

.edit-profile-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.edit-profile-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

/* MENU SECTIONS */
.menu-section {
  padding: 0;
}

.menu-options {
  padding: 20px 0;
}

.menu-group {
  margin-bottom: 30px;
}

.menu-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 20px 15px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 15px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f8f8f8;
}

.menu-item:hover {
  background: var(--light-color);
  transform: translateX(5px);
}

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

.menu-icon {
  width: 45px;
  height: 45px;
  background: var(--light-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 18px;
  margin-right: 15px;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-icon {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.menu-text {
  flex: 1;
}

.menu-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.menu-desc {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.3;
}

.menu-arrow {
  color: var(--text-gray);
  font-size: 14px;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-arrow {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* LOGOUT SECTION */
.logout-section {
  border-top: 1px solid #f0f0f0;
  margin-top: 20px;
}

.logout-item {
  color: #e74c3c;
  border-bottom: none;
}

.logout-item .menu-icon {
  background: #ffebee;
  color: #e74c3c;
}

.logout-item:hover {
  background: #ffebee;
}

.logout-item:hover .menu-icon {
  background: #e74c3c;
  color: white;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
  .overflow-menu-panel {
    width: 100%;
    max-width: none;
  }
  
  .profile-header {
    padding: 20px 0;
  }
  
  .profile-avatar {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .profile-name {
    font-size: 18px;
  }
  
  .menu-item {
    padding: 18px 20px;
  }
  
  .menu-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* SMOOTH ANIMATIONS */
.overflow-menu-panel * {
  transition: all 0.3s ease;
}

.menu-item:active {
  transform: scale(0.98);
  background: var(--primary-color);
  color: white;
}

.menu-item:active .menu-icon {
  background: white;
  color: var(--primary-color);
}

.menu-item:active .menu-title,
.menu-item:active .menu-desc {
  color: white;
}

/* HEADER LAYOUT - HORIZONTAL */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  flex: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* MAIN CONTENT GRID */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .main-content {
    padding: 15px;
  }
}