:root {
  --color-primary: #2E2440;
  --color-secondary: #453660;
  --color-accent: #A78BFA;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
}

/* Button fixes */
button, .btn, [class*="btn-"], a[href="#order_form"] {
  white-space: nowrap;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

form button[type="submit"] {
  white-space: normal;
  width: 100%;
}

/* Form styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.form-input.error {
  border-color: #ef4444;
}

.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rotate-180 {
  transform: rotate(180deg);
}

/* Decorative elements */
.decor-grid-dots {
  background-image: radial-gradient(circle, rgba(167, 139, 250, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

.decor-grid-lines {
  background-image: 
    linear-gradient(rgba(167, 139, 250, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.decor-subtle {
  opacity: 0.05;
}

.decor-moderate {
  opacity: 0.1;
}

.decor-bold {
  opacity: 0.2;
}

/* Product card */
.product-card {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 2px solid rgba(167, 139, 250, 0.2);
}

/* Rating stars */
.rating-stars {
  color: #fbbf24;
}

/* Order form */
.order-form {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 2px solid rgba(167, 139, 250, 0.2);
}

/* Testimonial styling */
.testimonial-quote::before,
.testimonial-quote::after {
  content: '"';
  font-size: 3rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.3;
}

/* Accordion FAQ */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: between;
  font-weight: 600;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer.open {
  max-height: 1000px;
  padding-bottom: 1.5rem;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .form-input {
    padding: 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .product-card {
    padding: 1.5rem 1rem;
  }
  
  .order-form {
    padding: 1.5rem 1rem;
  }
}

/* Success/Error messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Smooth transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}