:root {
  --color-primary: #2E2440;
  --color-secondary: #453660;
  --color-accent: #A78BFA;
  --bg-light: #FAF5FF;
  --bg-alt: #F3E8FF;
}

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

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

/* Custom backgrounds */
.bg-light { background-color: var(--bg-light); }
.bg-alt { background-color: var(--bg-alt); }

/* Animations */
[data-animate] {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.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,
    transparent,
    transparent 10px,
    currentColor 10px,
    currentColor 11px
  );
}

.decor-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, transparent 50%, var(--color-primary) 100%);
  opacity: 0.05;
  pointer-events: none;
}

.decor-gradient-blur::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.3;
  pointer-events: none;
}

.decor-corner-tr::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(-135deg, var(--color-accent), transparent);
  opacity: 0.1;
  pointer-events: none;
}

.decor-corner-bl::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--color-accent), transparent);
  opacity: 0.1;
  pointer-events: none;
}

.decor-glow-element::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  filter: blur(60px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.decor-rings-svg {
  background-image: url("data:image/svg+xml,%3csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='none' fill-rule='evenodd'%3e%3cg fill='%23A78BFA' fill-opacity='0.1'%3e%3ccircle cx='30' cy='30' r='8'/%3e%3ccircle cx='30' cy='30' r='16'/%3e%3ccircle cx='30' cy='30' r='24'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
}

.decor-subtle { opacity: 0.05; }
.decor-moderate { opacity: 0.1; }
.decor-bold { opacity: 0.2; }

/* Product badge styles */
.product-badge {
  @apply inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium;
}

.product-badge.new {
  @apply bg-green-100 text-green-800;
}

.product-badge.bestseller {
  @apply bg-yellow-100 text-yellow-800;
}

.product-badge.popular {
  @apply bg-blue-100 text-blue-800;
}

/* Rating stars */
.rating-stars {
  @apply flex items-center gap-1;
}

.rating-star {
  @apply w-4 h-4 text-yellow-400 fill-current;
}

/* Order form styles */
.order-form {
  @apply bg-white rounded-2xl shadow-lg border p-6;
}

.form-group {
  @apply space-y-2;
}

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

.form-input {
  @apply w-full px-4 py-3 border border-gray-200 rounded-xl focus:ring-2 focus:ring-accent focus:border-accent;
}

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

/* Price display */
.price-display {
  @apply flex items-baseline gap-2;
}

.price-current {
  @apply text-3xl font-bold text-gray-900;
}

.price-old {
  @apply text-lg text-gray-500 line-through;
}

.price-save {
  @apply text-sm text-green-600 font-medium;
}

/* Security badges */
.security-badge {
  @apply inline-flex items-center gap-1 text-xs text-gray-500;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .mobile-stack {
    @apply flex-col space-y-4;
  }
}

/* Loading state */
.loading {
  @apply opacity-50 pointer-events-none;
}

.loading::after {
  content: '';
  @apply absolute inset-0 bg-white/50 flex items-center justify-center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='4' class='opacity-25'%3E%3C/circle%3E%3Cpath fill='currentColor' d='M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z' class='opacity-75'%3E%3C/path%3E%3C/svg%3E");
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  animation: spin 1s linear infinite;
}

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