/* Fatbike Limburg - Custom CSS */
/* Only applies to pages with .fatbike-page class on body */

:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F9FAFB;
  --color-bg-accent: #FFF7ED;
  --color-primary: #EA580C;
  --color-primary-hover: #C2410C;
  --color-primary-light: #FFEDD5;
  --color-secondary: #18181B;
  --color-text: #3F3F46;
  --color-text-muted: #71717A;
  --color-border: #E4E4E7;
  --color-success: #16A34A;
  --color-warning: #CA8A04;
  --color-error: #DC2626;
}

/* Reset Frappe defaults - ONLY on fatbike pages */
.fatbike-page .page-container,
.fatbike-page .web-container,
.fatbike-page [data-page-container] {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hide Frappe navbar/footer - ONLY on fatbike pages */
.fatbike-page .navbar,
.fatbike-page .web-footer,
.fatbike-page .footer-subscribe {
  display: none !important;
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-secondary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Buttons */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
}

/* Product Cards */
.product-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

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

.product-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-sale { background: var(--color-error); color: white; }
.badge-new { background: var(--color-primary); color: white; }
.badge-stock { background: var(--color-success); color: white; }
.badge-low-stock { background: var(--color-warning); color: white; }
.badge-out-of-stock { background: var(--color-text-muted); color: white; }
.badge-verified { background: #DEF7EC; color: #03543F; }

/* Price Styling */
.price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--color-secondary);
}

.price-old {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
}

.price-sale {
  color: var(--color-error);
}

/* Rating Stars */
.stars {
  color: var(--color-primary);
  letter-spacing: 2px;
}

/* Forms */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-secondary);
}

/* Header */
.header {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Footer */
.footer {
  background: var(--color-secondary);
  color: white;
}

.footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--color-primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, var(--color-secondary), #27272A);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-accent {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--color-primary);
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(100px);
}

/* Section Headings */
.section-heading {
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  margin-top: 12px;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Cart Sticky */
@media (max-width: 768px) {
  .cart-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: white;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 40;
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-secondary);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   DESIGN ENHANCEMENTS - Inspired by fatbikeskopen.nl
   ======================================== */

/* Trust Bar / USP Strip */
.trust-bar {
  background: var(--color-primary);
  color: white;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
}

.trust-bar .usp-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-bar svg {
  width: 16px;
  height: 16px;
}

/* Hero Section Enhancements */
.hero-modern {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #27272A 50%, #3F3F46 100%);
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  right: -200px;
  top: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  opacity: 0.15;
}

.hero-modern::after {
  content: '';
  position: absolute;
  left: -100px;
  bottom: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  opacity: 0.1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Enhanced Product Cards */
.product-card-modern {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid transparent;
}

.product-card-modern:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  transform: translateY(-8px);
  border-color: var(--color-primary-light);
}

.product-card-modern .image-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.product-card-modern .image-wrapper img {
  transition: transform 0.4s ease;
}

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

.product-card-modern .quick-view {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--color-secondary);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  opacity: 0;
}

.product-card-modern:hover .quick-view {
  bottom: 16px;
  opacity: 1;
}

/* Sale Badge Animation */
.badge-sale-animated {
  background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Trust Badges Section */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

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

.trust-badge-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-badge-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

/* Category Cards */
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.category-card .content {
  position: relative;
  z-index: 1;
  padding: 24px;
  color: white;
  width: 100%;
}

/* Testimonials / Reviews */
.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 24px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: var(--color-primary-light);
  line-height: 1;
}

/* Newsletter Section */
.newsletter-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  border-radius: 24px;
  padding: 48px;
  color: white;
}

.newsletter-section input {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  width: 100%;
}

.newsletter-section input::placeholder {
  color: rgba(255,255,255,0.7);
}

/* Sale Banner */
.sale-banner {
  background: linear-gradient(90deg, #DC2626 0%, #EF4444 50%, #DC2626 100%);
  background-size: 200% auto;
  animation: gradient-flow 3s linear infinite;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Countdown Timer */
.countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.countdown-item {
  text-align: center;
  background: rgba(0,0,0,0.2);
  padding: 12px 16px;
  border-radius: 8px;
  min-width: 60px;
}

.countdown-number {
  font-size: 28px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 4px;
}

/* Prose Enhancements */
.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-border);
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose img {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Line Clamp Utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sticky Header Enhancement */
.header-scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Mobile Navigation */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Filter Sidebar (Mobile) */
@media (max-width: 1023px) {
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: white;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }
  
  .filter-sidebar.open {
    transform: translateX(0);
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 30;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--color-primary);
  transform: translateY(-4px);
}

/* Alpine.js Cloak */
[x-cloak] { display: none !important; }

/* Alpine Collapse Animation */
[x-collapse] {
  overflow: hidden;
}

/* Smooth Height Transitions */
.accordion-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Enhanced Focus States */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Button States */
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Input Group */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group input {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.input-group button {
  border-radius: 0 8px 8px 0;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--color-secondary);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  border-radius: 4px;
}

.skeleton-image {
  aspect-ratio: 4/3;
  border-radius: 12px;
}

/* Badge Enhancements */
.badge-discount {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Floating Labels */
.floating-label {
  position: relative;
}

.floating-label input {
  padding-top: 24px;
  padding-bottom: 8px;
}

.floating-label label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.2s ease;
  pointer-events: none;
  color: var(--color-text-muted);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
  top: 12px;
  font-size: 12px;
  color: var(--color-primary);
}

/* Card Hover Effects */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pulse Animation for Stock Indicators */
.pulse-green {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Radio & Checkbox Custom Styles */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--color-primary);
}

/* Select Dropdown Enhancement */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
}

/* Tag/Chip Styles */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-bg-alt);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.tag-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tag-close {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.tag-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--color-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
}

/* Print Styles */
@media print {
  .header, .footer, .scroll-to-top, .cart-sticky {
    display: none !important;
  }
  
  .product-card, .trust-badge {
    break-inside: avoid;
  }
}
