/* Producten Popup Styling */
/* Download button styling */
.download-wrapper {
  text-align: center;
  margin: 25px auto;
  padding: 15px;
  background: white;
  border-radius: 10px;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border: 2px solid #e0e0e0;
}

.download-btn {
  background: #4a6fa5;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 17px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  min-width: 200px;
  justify-content: center;
}

.download-btn:hover {
  background: #3a5a80;
  transform: scale(1.03);
}

.download-btn:active {
  transform: scale(0.98);
}

.download-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.download-icon {
  font-size: 20px;
  display: inline-block;
}

.download-note {
  color: #666;
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.8;
}

/* Success message */
.download-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  z-index: 10000;
  animation: slideInRight 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* Verberg de gesp products container in de sidebar */
#gesp-products-container {
  display: none;
}

/* Stijl voor het accessoires bericht */
.accessories-message {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 5px;
  margin-top: 10px;
  line-height: 1.5;
}

.accessories-message strong {
  color: #007bff;
}

/* Desktop-only leer sectie popup trigger */
.leer-popup-trigger {
  display: none;
  text-align: center;
  padding: 25px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.leer-popup-trigger:hover {
  background: #e9ecef;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1);
}

.leer-popup-trigger-text {
  font-size: 1.2rem;
  color: #007bff;
  font-weight: bold;
  margin-bottom: 8px;
}

.leer-popup-trigger-subtext {
  color: #6c757d;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .leer-popup-trigger {
    display: block;
  }
}

/* Mobiel: toon normale product grid */
@media (max-width: 767px) {
  .leer-popup-trigger {
    display: none;
  }
}

.products-popup {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.products-popup h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.8rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.products-popup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 10px;
}

.products-popup-card {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.products-popup-card:hover {
  border-color: #007bff;
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
  transform: translateY(-5px);
}

.products-popup-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 2px solid #f8f9fa;
}

.products-popup-name {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1rem;
  color: #333;
  line-height: 1.3;
}

.products-popup-price {
  color: #007bff;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.products-popup-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  width: 100%;
  font-size: 0.9rem;
}

.products-popup-btn:hover {
  background: #0056b3;
}

/* Overlay voor popup */
.products-popup::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

/* Media queries voor popup */
@media (max-width: 768px) {
  .products-popup {
    padding: 20px;
    width: 95%;
  }
  
  .products-popup-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .products-popup-thumb {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .products-popup-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .products-popup-card {
    padding: 15px;
  }
  
  .products-popup-thumb {
    width: 80px;
    height: 80px;
  }
}

/* Reset en basisstijlen */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden; /* Voorkom horizontaal scrollen */
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  padding-top: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ========== HEADER - ALTIJD FIXED ========== */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0 15px;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  max-width: 140px;
  height: auto;
  margin-right: 10px;
}

.site-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

/* Navigatie - Desktop */
.global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.global-nav a {
  padding: 6px 10px;
  white-space: nowrap;
  transition: all 0.2s;
  border-radius: 4px;
}

.global-nav a:hover {
  background-color: #f5f5f5;
  text-decoration: none;
}

/* Hoofdinhoud layout - de rest blijft zoals het was */
.main-content {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
}

/* ========== PRODUCT DISPLAY CONTAINER - FIXED ALLEEN OP MOBIEL ========== */
.product-display-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 30px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 90;
  cursor: zoom-in;
}

.product-display-container.zoomed {
  cursor: zoom-out;
}

.display-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 4px;
}

.display-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-display-container.zoomed .display-image {
  transform: scale(1.8);
}

#case-image {
  z-index: 2;
}

#image2 {
  z-index: 1;
}

#lipje1-image, #lipje2-image {
  z-index: 3;
  display: none;
}

.zoom-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-display-container:hover .zoom-indicator {
  opacity: 1;
}

.product-display-container.zoomed .zoom-indicator {
  content: "Klik om uit te zoomen";
}

/* Product secties */
.product-section {
  margin-bottom: 30px;
}

.section-title {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
}

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

.product-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
}

.product-name {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.product-price {
  color: #007bff;
  font-weight: bold;
}

/* Winkelmandje */
.cart-sidebar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.cart-title {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

#cart-items {
  margin-bottom: 15px;
}

#cart-items li {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.total-price {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  width: 100%;
  text-align: center;
}

.btn:hover {
  background: #0056b3;
}

/* Scrollbare sectie voor accessoires */
.scroll-section {
  max-height: 800px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
}

/* Dialog (winkelmandje formulier) */
dialog {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

dialog::backdrop {
  background: rgba(0,0,0,0.5);
}

.close-button {
  float: right;
  background: none;
  color: #333;
  font-size: 1.5em;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  padding: 20px 0;
  margin-top: 30px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-links a {
  color: #fff;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ========== MEDIA QUERIES VOOR RESPONSIVE DESIGN ========== */

/* Desktop (≥768px) - ALLES BLIJFT ZOALS HET WAS */
@media (min-width: 768px) {
  .main-content {
    flex-direction: row;
  }
  
  .content-main {
    flex: 3;
    padding-right: 20px;
  }
  
  .content-sidebar {
    flex: 1;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  
  .product-thumb {
    height: 120px;
  }
  
  /* Product display blijft sticky op desktop (niet fixed) */
  .product-display-container {
    position: sticky;
    top: 100px;
  }
  
  .display-wrapper {
    height: 500px;
  }
  
  /* Verberg normale product grid op desktop wanneer popup beschikbaar is */
  .leer-popup-trigger + .products-grid {
    display: none;
  }
  
  /* Header op desktop - vast maar met padding in body */
  body {
    padding-top: 80px; /* Ruimte voor fixed header op ALLE schermen */
  }
  
  header {
    padding: 15px 0;
  }
  
  .logo {
    max-width: 150px;
  }
  
  .site-name {
    font-size: 1.5rem;
  }
  
  .global-nav {
    gap: 15px;
    font-size: 0.95rem;
  }
}

/* Grote desktop (≥992px) */
@media (min-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .product-thumb {
    height: 140px;
  }
  
  .global-nav {
    gap: 18px;
    font-size: 1rem;
  }
}

/* ========== MOBIEL SPECIFIEK (<768px) ========== */
@media (max-width: 767px) {
  /* Body padding voor fixed header op mobiel */
  body {
    padding-top: 70px; /* Ruimte voor fixed header */
  }
  
  /* HEADER AANPASSINGEN VOOR MOBIEL */
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    height: 70px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .header-container {
    flex-direction: column;
    text-align: center;
    padding: 0 10px;
    align-items: stretch;
    height: 100%;
  }
  
  .logo-container {
    margin-bottom: 8px;
    justify-content: center;
    width: 100%;
  }
  
  .logo {
    max-width: 120px;
    margin-right: 8px;
  }
  
  .site-name {
    font-size: 1.1rem;
    white-space: normal;
  }
  
  .global-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 0.8rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
  }
  
  .global-nav a {
    padding: 4px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* ========== PRODUCT DISPLAY CONTAINER - FIXED OP MOBIEL ========== */
  .product-display-container {
    position: fixed;
    top: 70px; /* Direct onder de header */
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    z-index: 999;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  /* Extra padding aan body voor BOTH fixed elements */
  body {
    padding-top: 370px; /* Header (70px) + product display (300px) */
  }
  
  /* Main content moet lager beginnen */
  .main-content {
    margin-top: 0; /* Reset, want body padding doet het werk */
  }
  
  .display-wrapper {
    height: 300px;
  }
  
  /* Toon normale product grid op mobiel */
  .leer-popup-trigger + .products-grid {
    display: grid;
  }
  
  /* De rest van de layout blijft zoals het was */
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  .logo-container {
    margin-bottom: 10px;
  }
  
  .global-nav {
    justify-content: center;
  }
  
  /* Voeg extra ruimte toe onderaan voor veilige schermgebieden */
  .container {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
}

/* Zeer kleine schermen (<480px) */
@media (max-width: 480px) {
  body {
    padding-top: 335px; /* Header (65px) + product display (270px) */
  }
  
  header {
    padding: 6px 0;
    height: 65px;
  }
  
  .product-display-container {
    top: 65px;
    padding: 12px;
  }
  
  .display-wrapper {
    height: 250px;
  }
  
  .logo {
    max-width: 100px;
  }
  
  .site-name {
    font-size: 1rem;
  }
  
  .global-nav {
    gap: 4px;
    font-size: 0.7rem;
  }
  
  .global-nav a {
    padding: 3px 6px;
  }
  
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .product-card {
    padding: 8px;
  }
  
  .product-thumb {
    height: 80px;
  }
}

/* ========== MOBIEL DOUBLE-TAP PREVENTIE ========== */
/* Viewport instellingen (via meta tag) */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation; /* Voorkomt dubbeltik-zoom */
}

/* Touch manipulatie */
* {
    touch-action: pan-y pinch-zoom;
}

/* Voor iOS specifiek */
@supports (-webkit-touch-callout: none) {
    html, body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix voor iOS fixed header */
    header {
        position: fixed;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* iOS safe area support */
    body {
        padding-top: calc(80px + constant(safe-area-inset-top));
        padding-top: calc(80px + env(safe-area-inset-top));
    }
    
    header {
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top);
    }
    
    @media (max-width: 767px) {
        body {
            padding-top: calc(370px + constant(safe-area-inset-top));
            padding-top: calc(370px + env(safe-area-inset-top));
        }
        
        header {
            height: calc(70px + constant(safe-area-inset-top));
            height: calc(70px + env(safe-area-inset-top));
        }
        
        .product-display-container {
            top: calc(70px + constant(safe-area-inset-top));
            top: calc(70px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 480px) {
        body {
            padding-top: calc(335px + constant(safe-area-inset-top));
            padding-top: calc(335px + env(safe-area-inset-top));
        }
        
        header {
            height: calc(65px + constant(safe-area-inset-top));
            height: calc(65px + env(safe-area-inset-top));
        }
        
        .product-display-container {
            top: calc(65px + constant(safe-area-inset-top));
            top: calc(65px + env(safe-area-inset-top));
        }
    }
}

/* Voorkom ongewenste zoom gedrag */
@media (pointer: coarse) {
    body {
        touch-action: pan-y;
    }
    
    /* Grotere touch targets voor mobiel */
    button, 
    .btn-primary, 
    .btn-success, 
    .btn-info,
    .btn,
    a.btn-outline {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    /* Voorkom tekst selectie bij tap */
    .product-card,
    .products-grid > *,
    .global-nav a {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}

/* Voorkom context menu op lange tap */
html {
    -webkit-touch-callout: none;
}

/* Maar behoud selectie voor input velden */
input, textarea, [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
}

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