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

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

body {
  font-family: 'Source Sans 3', 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%;
}

/* 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, currentColor 1px, transparent 1px);
  background-size: 20px 20px;
}

.decor-grid-lines {
  background-image: linear-gradient(currentColor 1px, transparent 1px),
                    linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size: 20px 20px;
}

.decor-diagonal {
  background-image: repeating-linear-gradient(45deg,
    currentColor 0px,
    currentColor 1px,
    transparent 1px,
    transparent 20px);
}

.decor-mesh {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
              linear-gradient(45deg, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
}

.decor-gradient-blur::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.decor-corner-tr::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(225deg, currentColor, transparent);
  border-radius: 0 0 0 100%;
}

.decor-corner-bl::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, currentColor, transparent);
  border-radius: 0 100% 0 0;
}

.decor-glow-element {
  position: relative;
}

.decor-glow-element::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 60%);
  z-index: -1;
  filter: blur(20px);
}

.decor-rings-svg {
  background-image: url("data:image/svg+xml,%3csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3cpattern id='rings' x='0' y='0' width='100' height='100' patternUnits='userSpaceOnUse'%3e%3ccircle cx='50' cy='50' r='20' fill='none' stroke='%23A78BFA' stroke-width='1' opacity='0.1'/%3e%3ccircle cx='50' cy='50' r='35' fill='none' stroke='%23A78BFA' stroke-width='1' opacity='0.05'/%3e%3c/pattern%3e%3c/defs%3e%3crect width='100%25' height='100%25' fill='url(%23rings)'/%3e%3c/svg%3e");
}

.decor-subtle {
  opacity: 0.05;
}

.decor-moderate {
  opacity: 0.1;
}

.decor-bold {
  opacity: 0.2;
}

/* Form styling */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent transition-colors;
}

.form-select {
  @apply w-full px-4 py-3 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent transition-colors appearance-none bg-white;
}

.form-checkbox {
  @apply w-4 h-4 text-accent border-gray-300 rounded focus:ring-accent/20 focus:ring-2;
}

/* Order form specific */
.order-form {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%);
}

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

/* Product cards */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial cards */
.testimonial-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

/* Star ratings */
.stars {
  color: #FCD34D;
}

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

.loading button {
  position: relative;
  color: transparent;
}

.loading button::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive utilities */
@media (max-width: 640px) {
  .mobile-stack > * {
    width: 100% !important;
    margin-bottom: 1rem;
  }
  
  .mobile-center {
    text-align: center;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .decor-subtle,
  .decor-moderate,
  .decor-bold {
    display: none;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}