:root {
  --color-primary: #4A4035;
  --color-secondary: #6A5A4A;
  --color-accent: #F5E6D3;
}

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

body {
  font-family: 'Manrope', 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: 24px 24px;
}

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

.decor-diagonal {
  background-image: linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%);
  background-size: 20px 20px;
}

.decor-mesh {
  background: linear-gradient(45deg, currentColor 0%, transparent 50%, currentColor 100%);
  background-size: 40px 40px;
}

.decor-subtle {
  opacity: 0.05;
}

.decor-moderate {
  opacity: 0.1;
}

.decor-bold {
  opacity: 0.2;
}

.decor-gradient-blur::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  z-index: -1;
}

.decor-gradient-blur::after {
  content: '';
  position: absolute;
  bottom: 20%;
  right: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.2;
  z-index: -1;
}

.decor-corner-tr::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(-45deg, var(--color-accent) 0%, transparent 50%);
  opacity: 0.3;
}

.decor-corner-bl::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, var(--color-accent) 0%, transparent 50%);
  opacity: 0.3;
}

.decor-glow-element::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  transform: translate(-50%, -50%);
  z-index: -1;
}

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

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

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

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Rating stars */
.rating-stars {
  display: inline-flex;
  gap: 2px;
}

.rating-star {
  color: #fbbf24;
}

/* Product badge */
.product-badge {
  @apply inline-flex items-center gap-1 px-3 py-1 bg-accent text-primary text-sm font-medium rounded-full;
}

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

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

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

/* Responsive utilities */
@media (max-width: 640px) {
  .mobile-stack > * {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .mobile-stack > *:last-child {
    margin-bottom: 0;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.focus-ring {
  @apply focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary;
}