/* Custom CSS for enhanced styling */

/* Grid pattern background */
.bg-grid-white\/\[0\.05\] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(255 255 255 / 0.05)'%3e%3cpath d='m0 .5h32m-32 32v-32'/%3e%3c/svg%3e");
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header backdrop blur effect */
.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Gradient text */
.bg-gradient-to-r {
  background: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.text-transparent {
  color: transparent;
}

/* Enhanced hover effects */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.group:hover .group-hover\:translate-x-1 {
  transform: translateX(0.25rem);
}

/* Loading spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form enhancements */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Success/Error states */
.success-state {
  background: linear-gradient(135deg, #10b981, #059669);
}

.error-state {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .mobile-hidden {
    display: none;
  }

  /* Newsletter mobile fixes */
  .newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }

  .newsletter-input {
    border-radius: 0.5rem !important;
  }

  .newsletter-button {
    border-radius: 0.5rem !important;
    width: 100%;
    justify-content: center;
  }
}

/* Accessibility improvements */
.focus\:ring-2:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #3b82f6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* RTL Support for Arabic */
.rtl {
  direction: rtl;
}

[dir='rtl'] {
  text-align: right;
}

[lang='ar'] {
  font-family: 'Tajawal', sans-serif;
}

/* RTL specific adjustments */
[dir='rtl'] .flex {
  flex-direction: row-reverse;
}

.rtl .group:hover .group-hover\:-translate-x-1 {
  --tw-translate-x: -0.25rem !important;
}

.rtl .group:hover .group-hover\:translate-x-1 {
  transform: translateX(var(--tw-translate-x)) !important;
}

.rtl .space-x-2 > * + * {
  margin-left: 0;
  margin-right: 0.5rem;
}

.rtl .space-x-4 > * + * {
  margin-left: 0;
  margin-right: 1rem;
}

.rtl .ml-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

.rtl .mr-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

.rtl .ml-4 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

.rtl .mr-4 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

/* Language picker styling */
#language-dropdown {
  min-width: 200px;
}

.language-option:hover {
  background-color: #f9fafb;
}

.language-option.active {
  background-color: #eff6ff;
  color: #2563eb;
}

.product-image {
  height: 14rem; /* You can adjust this value */
  object-fit: contain; /* This will make sure the whole image is visible */
  width: 100%;
}

/* Hide currency symbol */
.currency-symbol {
  display: none;
}
