:root {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeSpeed;
  
  --z-map: 0;
  --z-cards: 1;
  --z-menu: 50;
  --z-modal: 100;
}

body {
  font-family: 'Montserrat', sans-serif;
  position: relative;
  width: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  /* Alleen horizontaal scrollen blokkeren */
  overflow-x: hidden; 
}

/* Dit zorgt dat de achtergrond stopt met scrollen als de cart open is */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

button, a {
    touch-action: manipulation;
    transform: translateZ(0); /* Hardware versnelling */
}

.font-playfair {
  font-family: 'Playfair Display', serif;
}

.text-shadow-sm { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); }
 .text-shadow-md { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
 .text-shadow-lg { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7); }
        
 .animate-wave {
    animation: wave 2s ease-in-out infinite;
}
        
        @keyframes wave {
            0% { transform: rotate(0deg); }
            10% { transform: rotate(14deg); }
            20% { transform: rotate(-8deg); }
            30% { transform: rotate(14deg); }
            40% { transform: rotate(-4deg); }
            50% { transform: rotate(10deg); }
            60% { transform: rotate(0deg); }
            100% { transform: rotate(0deg); }
        }
        
.hover-scale:hover { transform: scale(1.05); }
.transition-all { transition: all 0.3s ease; }

.hero-section {
  min-height: 70vh;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  z-index: -1;
}

.hero-section .bg-cover {
  background-position: center center;
  background-size: cover;
}

#schedule-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.text-shadow-lg { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); }
.text-shadow-md { text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); }
.text-shadow-sm { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); }

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

.co2-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  transform: translateZ(0);
}

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

.category-badge {
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.fish-icon {
  transition: transform 0.3s ease;
}

a:hover .fish-icon {
  transform: rotate(-15deg) scale(1.1);
}

.backdrop-blur-md {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#map { 
  position: relative;
  z-index: var(--z-map);
}

.gm-style .gm-style-iw-c {
  z-index: var(--z-modal) !important;
  max-width: 250px !important;
}

.gm-style .gm-style-iw-d { 
  overflow: auto !important; 
}

.gm-style .gm-style-iw-t::after { 
  background: white !important;
}

.gm-style iframe {
  background-color: transparent !important;
}

#locations .bg-gray-50 {
  position: relative;
  z-index: var(--z-cards);
  transition: all 0.3s ease;
}

#locations .bg-gray-50:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .hero-section .absolute.inset-0.bg-cover {
        background-position: center center;
        background-size: cover;
    }
}

@media (min-width: 769px) {
    .hero-section .absolute.inset-0.bg-cover {
        background-position: center center;
        background-size: cover;
        background-attachment: fixed; 
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    z-index: -1;
}

.fixed-container {
  left: 0;
  right: 0;
}

.special-offer {
    margin-bottom: 1rem;
}
.offer-badge {
    background-color: #fef2f2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.original-price {
    text-decoration: line-through;
    color: #6b7280;
}
.special-price {
    color: #dc2626;
    font-weight: 600;
}
.offer-label {
    font-size: 0.75rem;
    color: #b45309;
    margin-top: 0.25rem;
}
.offer-valid {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.product-card .absolute.top-2.left-2 {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.4rem !important;
    border-radius: 9999px !important;
    backdrop-filter: blur(4px) !important;
}

.product-card * {
    box-sizing: border-box !important;
}

button[onclick="toggleCart()"] {
    background-color: #f8fafc !important;
    color: #1e93b4 !important;
    border: 2px solid #1e93b4 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    position: relative !important;
}

button[onclick="toggleCart()"]:hover {
    background-color: #1e93b4 !important;
    color: white !important;
    border-color: #176e87 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(30, 147, 180, 0.3) !important;
}

#cart-count {
    font-size: 0.75rem !important;
    font-weight: bold !important;
    min-width: 1.5rem !important;
    height: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}			
			
#products-grid {
    display: grid !important;
    grid-auto-rows: 1fr !important;
    align-items: stretch !important;
}

.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    background-color: white !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
}

.product-card > * {
    flex-shrink: 0 !important;
}

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

.product-image-container {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    background: linear-gradient(110deg, #f5f5f5 8%, #f0f0f0 18%, #f5f5f5 33%) !important;
    background-size: 200% 100% !important;
    animation: 1.5s shine linear infinite !important;
}

.product-image-container img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.product-card:hover .product-image-container img {
    transform: scale(1.08) !important;
}

.product-image-container img.loaded {
    background: none !important;
    animation: none !important;
}

.aspect-thumb {
    aspect-ratio: 4/3 !important;
    object-fit: cover !important;
    width: 100% !important;
    background-color: #f5f5f5 !important;
}

@supports not (aspect-ratio: 4/3) {
    .aspect-thumb {
        position: relative !important;
        padding-bottom: 75% !important;
        height: 0 !important;
    }
    
    .aspect-thumb img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

.image-grid-small {
    height: 160px !important;
    aspect-ratio: 350/260 !important;
}

.image-grid-medium {
    height: 200px !important;
    aspect-ratio: 4/3 !important;
}

.image-detail {
    max-height: 600px !important;
    aspect-ratio: 4/3 !important;
}

.image-suggestion {
    height: 80px !important;
    width: 80px !important;
    aspect-ratio: 4/3 !important;
}

.line-clamp-1 {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 1 !important;
    max-height: 1.5em !important;
}

.line-clamp-2 {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    max-height: 3em !important;
}

.line-clamp-3 {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    max-height: 4.5em !important;
}

.line-clamp-4 {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
    max-height: 6em !important;
}

.truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.special-price-container {
    max-height: 4rem !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.special-price-line {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.cart-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    width: 100% !important;
    max-width: 400px !important;
    background: white !important;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.2) !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 1000 !important;
    overflow-y: auto !important;
}

.cart-sidebar.open {
    transform: translateX(0) !important;
}

.cart-sidebar .flex-col {
    min-height: 100% !important;
}

.cart-sidebar .border-t {
    margin-top: auto !important;
}

.cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease-in-out !important;
}

.cart-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.category-btn {
    padding: 12px 24px !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
}

.category-btn.active {
    background-color: #1e93b4 !important;
    color: white !important;
    border-color: #1e93b4 !important;
}

.category-btn:not(.active) {
    background-color: white !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.category-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.quantity-btn {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.quantity-btn:hover {
    background-color: #e5e7eb !important;
    border-color: #9ca3af !important;
}

.ordering-disabled-notice {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 0.875rem !important;
    border-left: 3px solid #6c757d !important;
    margin-top: 8px !important;
}

.ordering-disabled-notice i {
    margin-right: 6px !important;
    color: #6c757d !important;
}

#mobile-menu {
    transition: all 0.3s ease-in-out !important;
}

#mobile-menu.hidden {
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

#mobile-menu:not(.hidden) {
    opacity: 1 !important;
    max-height: 500px !important;
}

.global-success-message {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #10b981 !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    min-width: 250px !important;
    text-align: center !important;
    animation: fadeInOut 2.5s ease-in-out forwards !important;
}

@keyframes shine {
    to {
        background-position-x: -200% !important;
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

@keyframes pulse-green {
    0%, 100% { 
        background: linear-gradient(135deg, #1e93b4 0%, #176e87 100%) !important;
    }
    50% { 
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    }
}

.added-to-cart {
    animation: pulse-green 0.5s ease-in-out !important;
}

.cart-badge {
    animation: bounce 0.5s ease-in-out !important;
}

@media (max-width: 640px) {
    .cart-sidebar {
        max-width: 100% !important;
    }
    
    .truncate {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    .image-grid-small {
        height: 140px !important;
    }
    
    .image-grid-medium {
        height: 180px !important;
    }
    
    .global-success-message {
        width: 90% !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
}

@media (max-width: 400px) {
    .h-16.w-16 {
        height: 3rem !important;
        width: 3rem !important;
    }
    
    .image-grid-small {
        height: 120px !important;
    }
    
    .product-card {
        height: auto !important;
        min-height: 300px !important;
    }
}

.product-card .min-h-0 {
    min-height: 0 !important;
}

.product-card img {
    backface-visibility: hidden !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

.product-card .flex-1 {
    flex: 1 1 0% !important;
}

.product-card .mt-auto {
    margin-top: auto !important;
}
       
.offline #offline-indicator {
    display: block;
}
        
body{
  min-height: 100dvh;
  box-sizing: border-box;
}

        
@supports (padding: max(0px)) {
  body{
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-top: 0;
    padding-bottom: 0;
  }
}

        main {
            flex: 1 0 auto;
        }
        
        footer {
            flex-shrink: 0;
        }
        
        @media (display-mode: standalone) {
            body {
                overscroll-behavior-y: none;
            }
        }
		
#cart-sidebar{
  height: 100dvh;
  padding-top: 0;
  padding-bottom: 0;
}

#cart-sidebar .flex-1{
  padding-bottom: 110px;
}

#cart-sidebar .border-t{
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* Cart sidebar header fix */
#cart-sidebar .flex.items-center.justify-between.p-4.border-b {
  min-height: 60px; /* Of 70px, wat goed voelt */
  padding-top: 12px; /* Minder padding-top */
  padding-bottom: 12px;
  align-items: center; /* Zorg dat alles gecentreerd is */
}

/* Specifiek de sluitknop */
#cart-sidebar button[onclick="toggleCart()"] {
  padding: 8px; /* Gelijk padding rondom */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
}

/* Fix voor winkelmand in PWA-modus - Eenmalig in text-styles.css */
.standalone header {
    padding-top: env(safe-area-inset-top);
}

.standalone #cart-sidebar {
    padding-top: env(safe-area-inset-top, 10px) !important;
}

.standalone #cart-sidebar .flex.items-center.justify-between.p-4.border-b {
    padding-top: env(safe-area-inset-top, 1rem) !important;
    height: auto !important;
}

.standalone #cart-sidebar .p-4.border-t {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 10px)) !important;
}

/* Voorkom dat de achtergrond scrolt als de cart open is */
body.cart-open {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100%;
    position: fixed; /* Cruciaal voor mobiele refreshes */
}

#cart-sidebar {
    height: 100dvh;
    overflow-y: auto; /* Zorg dat alleen de cart scrolt */
    overscroll-behavior: contain; /* Voorkomt 'scroll chain' naar de achtergrond */
}