/* Custom CSS - Only styles that can't be done with Tailwind CSS */

/* Hide elements with x-cloak until Alpine.js loads */
[x-cloak] {
  display: none !important;
}

/* Cart Sidebar Animations */
.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.cart-sidebar.active {
  right: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.cart-overlay.active {
  display: block;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Search Popup */
.search-popup {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: top 0.3s ease;
  z-index: 1001;
}

.search-popup.active {
  top: 0;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.search-overlay.active {
  display: block;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  left: -100%;
  top: 0;
  width: 300px;
  height: 100vh;
  background: white;
  transition: left 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
}

.mobile-menu.active {
  left: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.mobile-overlay.active {
  display: block;
}

/* Category Mega Menu */
.category-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 100;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.category-item:hover {
  background: linear-gradient(90deg, #f0fdfa 0%, #ffffff 100%);
  color: #14b8a6;
  padding-left: 20px;
}

.category-item svg {
  margin-right: 10px;
  flex-shrink: 0;
}

/* Floating Cart */
.floating-cart {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  cursor: pointer;
}

/* Dropdown Menu Scrollbar */
.dropdown-menu::-webkit-scrollbar,
.category-mega-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track,
.category-mega-menu::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb,
.category-mega-menu::-webkit-scrollbar-thumb {
  background: #14b8a6;
  border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover,
.category-mega-menu::-webkit-scrollbar-thumb:hover {
  background: #0f766e;
}

/* Line Clamp Utilities (for older browsers) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
