/* ==========================================================================
   Blumenladen Pforzheim - Custom Styles
   DSGVO-konform: Lokale Fonts (keine Google CDN)
   ========================================================================== */

/* ==========================================================================
   Font Faces - Lokal gehostet
   ========================================================================== */

/* Playfair Display - Headings */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display/PlayfairDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display/PlayfairDisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Inter - Body Text */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Dancing Script - Gedicht/Akzente */
@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/dancing-script/DancingScript-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/dancing-script/DancingScript-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  /* Primärfarben - Pastell */
  --color-primary: #FFB3D9;
  --color-secondary: #E6B8F5;
  --color-accent: #A8E6CF;
  --color-peach: #FFD4B8;

  /* Neutrale Farben */
  --color-white: #FFFFFF;
  --color-cream: #FFF9F5;
  --color-gray-light: #F5F5F5;
  --color-gray-mid: #E0E0E0;
  --color-gray-dark: #666666;
  --color-text: #333333;

  /* Typografie - Mit System-Font-Fallbacks */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-accent: 'Dancing Script', cursive, sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.font-accent {
  font-family: var(--font-accent);
  line-height: 1.8;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

nav a {
  position: relative;
  font-weight: 500;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Animation */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Buttons & CTA
   ========================================================================== */

button, .btn {
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

button:focus, .btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Pulse Animation for CTA */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.bg-primary:hover,
.bg-secondary:hover {
  animation: pulse 0.6s ease-in-out;
}

/* ==========================================================================
   Product Cards
   ========================================================================== */

.product-card {
  position: relative;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(255, 179, 217, 0.3);
}

.product-card img {
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Card Badge Animation */
.product-card .absolute {
  transition: all 0.3s ease;
}

.product-card:hover .absolute {
  transform: scale(1.1);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  animation: modalSlideIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Close Animation */
.modal.closing {
  animation: fadeOut 0.3s ease;
}

.modal.closing .modal-content {
  animation: modalSlideOut 0.3s ease;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 179, 217, 0.1);
}

/* Date Input - Mobile Fix */
input[type="date"] {
  box-sizing: border-box;
  max-width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

@media (max-width: 768px) {
  input[type="date"] {
    font-size: 16px; /* Verhindert Zoom auf iOS */
    min-width: 0; /* Überschreibt Browser-Mindestbreite */
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: -8px; /* Kompakter auf Mobile */
  }
}

input.error {
  border-color: #EF4444;
  background-color: #FEF2F2;
}

/* Checkbox Custom Style */
input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

input[type="checkbox"]:focus {
  ring-color: var(--color-primary);
}

/* ==========================================================================
   Loading Animation
   ========================================================================== */

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

#home {
  position: relative;
  min-height: 100vh;
}

#home img {
  animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

/* Hero Content Animation */
#home h1 {
  animation: fadeInUp 0.8s ease 0.2s both;
}

#home .font-accent {
  animation: fadeInUp 0.8s ease 0.4s both;
}

#home button {
  animation: fadeInUp 0.8s ease 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Sticky Banner
   ========================================================================== */

.sticky {
  animation: slideInFromTop 0.5s ease;
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ==========================================================================
   SEO Section
   ========================================================================== */

.prose {
  max-width: 65ch;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer a {
  transition: color 0.3s ease;
}

footer svg {
  transition: all 0.3s ease;
}

footer a:hover svg {
  transform: scale(1.2);
}

/* ==========================================================================
   Utility Animations
   ========================================================================== */

.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to Main Content Link */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Mobile First - Base styles above are for mobile */

/* Tablets and up */
@media (min-width: 768px) {
  .product-card:hover {
    transform: translateY(-12px);
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  /* Smoother animations on larger screens */
  * {
    transition-duration: 0.4s;
  }

  .product-card {
    cursor: pointer;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  header,
  footer,
  .modal,
  button,
  #mobile-menu-btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* GPU Acceleration for animations */
.product-card,
.modal-content,
button {
  will-change: transform;
}

/* ==========================================================================
   Custom Scrollbar (for modern browsers)
   ========================================================================== */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #FF8FC7;
}

/* ==========================================================================
   Variant Selector Styles
   ========================================================================== */

.variant-option {
  transition: all 0.2s ease;
}

.variant-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 179, 217, 0.2);
}

.variant-option input[type="radio"]:checked + div {
  color: var(--color-primary);
}

.variant-option input[type="radio"]:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
