:root {
  --color-primary: #1B4332;
  --color-secondary: #2D6A4F;
  --color-accent: #40C057;
}

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

body {
  font-family: 'Inter', 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);
}

/* Custom animations based on context */
.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.transition-opacity {
  transition-property: opacity;
  transition-duration: 500ms;
  transition-timing-function: ease-out;
}

/* Decorative elements */
.decor-grid-dots {
  background-image: radial-gradient(circle, rgba(64, 192, 87, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.decor-grid-lines {
  background-image: linear-gradient(rgba(64, 192, 87, 0.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(64, 192, 87, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.decor-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(64, 192, 87, 0.05) 8px,
    rgba(64, 192, 87, 0.05) 16px
  );
}

.decor-mesh::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(64, 192, 87, 0.1) 0%, rgba(27, 67, 50, 0.05) 100%);
  pointer-events: none;
}

.decor-gradient-blur::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(64, 192, 87, 0.1) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.decor-corner-tr::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(225deg, rgba(64, 192, 87, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.decor-corner-bl::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, rgba(64, 192, 87, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

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

.decor-rings-svg {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2340C057' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='%2340C057' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='16' fill='none' stroke='%2340C057' stroke-width='1'/%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;
}

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

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

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

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

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

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

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
  @apply bg-gray-300 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-400;
}

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

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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