/* Category Dropdown Styles */
.category-dropdown {
  position: relative;
  display: inline-block;
}

.category-dropdown .dropdown-button {
  background: rgb(53, 53, 53);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 15px;
  cursor: pointer;
  text-transform: initial;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-dropdown .dropdown-button:hover,
.category-dropdown .dropdown-button:focus {
  background-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

.category-dropdown .dropdown-button::before {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url('https://cdn.jsdelivr.net/gh/khenjiem/Link-n-menu-icons@b95045ed3810160e93a77adf1b4e9ed08dda3e6d/link-n-icons/icn_squares.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Hide arrow on desktop */
.category-dropdown .dropdown-button::after {
  display: none;
}

.category-dropdown.open .dropdown-button::after {
  display: none;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000000;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.category-dropdown:hover .dropdown-content,
.category-dropdown.open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  color: #ffffff;
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: #f8f9fa;
  color: #2B2B2B;
  padding-left: 25px;
}

.dropdown-content a:first-child {
  border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
  border-radius: 0 0 8px 8px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  .category-dropdown {
    width: 100%;
  }
  
  .category-dropdown .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: space-between;
  }
  
  /* Show arrow on mobile */
  .category-dropdown .dropdown-button::after {
    content: '▼';
    display: block;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }
  
  .category-dropdown.open .dropdown-button::after {
    transform: rotate(180deg);
    display: block;
  }
  
  .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: #2a2a2a;    backdrop-filter: blur(10px);
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
  }
  
  .category-dropdown.open .dropdown-content {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .dropdown-content a {
    padding: 15px 25px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .dropdown-content a:hover {
    background-color: rgba(43, 43, 43, 0.1);
    padding-left: 30px;
  }
}

/* Tablet Styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .dropdown-content {
    min-width: 180px;
  }
  
  .dropdown-content a {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

/* Large Desktop Styles */
@media screen and (min-width: 1200px) {
  .dropdown-content {
    min-width: 220px;
  }
  
  .dropdown-content a {
    padding: 14px 22px;
    font-size: 1rem;
  }
}

/* Animation for smooth transitions */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-dropdown:hover .dropdown-content {
  animation: fadeInDown 0.3s ease forwards;
}

/* Focus accessibility */
.category-dropdown .dropdown-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dropdown-content a:focus {
  background-color: #e9ecef;
  outline: 2px solid #007bff;
  outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dropdown-content {
    border: 2px solid #000;
  }
  
  .dropdown-content a {
    border-bottom: 1px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .category-dropdown .dropdown-button,
  .dropdown-content,
  .dropdown-content a {
    transition: none;
  }
  
  .category-dropdown:hover .dropdown-content {
    animation: none;
  }
}
