/* ==================== MODERN STYLES ==================== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scroll offset for sticky header */
section[id],
footer[id] {
  scroll-margin-top: 80px;
}

/* ---- Header Glass Effect ---- */
.header-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-glass.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* ---- Hero Background Effects ---- */
.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ---- Feature Cards ---- */
.feature-card {
  position: relative;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::after {
  opacity: 1;
}

/* ---- Filter Buttons ---- */
.filter-btn {
  cursor: pointer;
  border: 1.5px solid transparent;
}

.filter-btn:not(.active) {
  background-color: white;
  color: #374151;
  border-color: #e5e7eb;
}

.filter-btn:not(.active):hover {
  border-color: #16a34a;
  color: #16a34a;
  background-color: #f0fdf4;
}

/* ---- Product Cards ---- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f3f4f6;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

.product-image-placeholder {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Cart Sidebar ---- */
#cart-sidebar.open {
  transform: translateX(0);
}

/* Badge animation */
@keyframes badge-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.badge-animate {
  animation: badge-pop 0.3s ease-in-out;
}

/* ---- Verfügbarkeit Badges ---- */
.badge-verfuegbar {
  background-color: #dcfce7;
  color: #166534;
}

.badge-saisonal {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-ausverkauft {
  background-color: #f3f4f6;
  color: #9ca3af;
}

/* ---- Termin Cards ---- */
.termin-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #f3f4f6;
}

.termin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.08);
}

/* ---- Mobile Chatbot Fullscreen ---- */
@media (max-width: 639px) {
  #chatbot-window {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    z-index: 60;
  }
}

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
  z-index: 100;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---- Fade-in Animation ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* ---- Selection Color ---- */
::selection {
  background-color: rgba(22, 163, 74, 0.15);
  color: inherit;
}

/* ---- Fehlende Pflichtfelder ---- */
/* Wird von cart.js gesetzt, wenn die Bestellung ohne Pflichtangaben
   abgeschickt wird, und beim ersten Tastendruck wieder entfernt. */
.feld-fehler {
  border-color: #dc2626 !important;
  background-color: #fef2f2;
}

.feld-fehler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

/* Die AGB-Checkbox hat keinen Rahmen, den man einfaerben koennte. */
input[type="checkbox"].feld-fehler {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  background-color: transparent;
}
