/* ENHANCED UI COMPONENTS - Modals, Toasts, Overlays */

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  padding: 1rem 1.5rem;
  min-width: 300px;
  z-index: 10000;
  transform: translateX(100%);
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.toast-success {
  border-left-color: var(--success);
}

.toast-notification.toast-error {
  border-left-color: var(--danger);
}

.toast-notification.toast-warning {
  border-left-color: var(--warning);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info .toast-icon {
  color: var(--accent);
}

.toast-message {
  font-weight: 500;
  color: var(--gray-800);
}

/* Quick View Modal */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.quick-view-modal.show {
  opacity: 1;
  visibility: visible;
}

.quick-view-content {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(50px);
  transition: var(--transition);
}

.quick-view-modal.show .quick-view-content {
  transform: scale(1) translateY(0);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1;
}

.close-modal:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
}

.loading-spinner i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Enhanced Product Overlays */
.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.product-overlay button {
  background: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.product-overlay button:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-wishlist.active {
  background: var(--danger) !important;
  color: var(--white) !important;
}

/* Enhanced Button States */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

.btn.error {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

/* Animation Classes */
.animate-in {
  animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Product Grid Animations */
.product-card {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.product-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for product cards */
.product-card:nth-child(1) { transition-delay: 0.1s; }
.product-card:nth-child(2) { transition-delay: 0.2s; }
.product-card:nth-child(3) { transition-delay: 0.3s; }
.product-card:nth-child(4) { transition-delay: 0.4s; }
.product-card:nth-child(5) { transition-delay: 0.5s; }
.product-card:nth-child(6) { transition-delay: 0.6s; }

/* Enhanced Filter Form Animations */
.filter-group {
  opacity: 0;
  transform: translateY(20px);
  animation: filterGroupIn 0.5s ease-out forwards;
}

.filter-group:nth-child(1) { animation-delay: 0.1s; }
.filter-group:nth-child(2) { animation-delay: 0.2s; }
.filter-group:nth-child(3) { animation-delay: 0.3s; }
.filter-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes filterGroupIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Products Section Header */
.products-header {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.products-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  position: relative;
}

.products-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  margin: 1rem auto;
  border-radius: 2px;
}

.products-subtitle {
  font-size: 1.2rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Enhanced Currency Display */
.product-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.currency-aed {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.currency-usd {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* UAE Symbol - SVG approach */
.uae-symbol {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.25rem;
  vertical-align: baseline;
  filter: brightness(0); /* Make it black */
  font-weight: 700;
}

/* UAE Symbol - Font approach alternative */
.uae-symbol-font {
  font-family: 'UAESymbol', Arial, sans-serif;
  font-weight: 700;
  margin-right: 0.25rem;
}

/* UAE Symbol - Text approach fallback */
.uae-symbol-text::before {
  content: "د.إ";
  margin-right: 0.25rem;
  font-weight: 700;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .toast-notification {
    right: 1rem;
    left: 1rem;
    min-width: auto;
  }
  
  .quick-view-content {
    width: 95%;
    margin: 1rem;
  }
  
  .product-overlay {
    opacity: 1;
    transform: translateY(0);
  }
  
  .products-header {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .toast-notification {
    top: 1rem;
    font-size: 0.9rem;
  }
  
  .product-overlay button {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* Quick View Product Details */
.quick-view-body {
  display: flex;
  gap: 2rem;
  padding: 2rem;
}

.product-image-section {
  flex: 1;
  min-width: 300px;
}

.quick-view-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  object-fit: cover;
}

.product-details-section {
  flex: 1;
  min-width: 300px;
}

.product-details-section .product-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.product-category,
.product-brand {
  margin: 0.5rem 0;
  color: var(--gray-600);
}

.product-details-section .product-price {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--border-radius);
}

.price-aed {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.price-usd {
  font-size: 1.2rem;
  color: var(--gray-600);
  font-weight: 500;
}

.product-description {
  margin: 1.5rem 0;
}

.product-description h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.product-description p {
  color: var(--gray-700);
  line-height: 1.6;
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.product-actions .btn {
  flex: 1;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
}

.error-message {
  text-align: center;
  padding: 3rem 2rem;
}

.error-message i {
  font-size: 3rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

.error-message h3 {
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.error-message p {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

/* Mobile responsive for quick view */
@media (max-width: 768px) {
  .quick-view-body {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .product-image-section,
  .product-details-section {
    min-width: auto;
  }
  
  .product-actions {
    flex-direction: column;
  }
}
