/* Jakobsen Lifestyle Goods Ltd - Scandinavian Light Theme Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-warm: #faf9f6;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-amber: #d97706;
  --accent-gold: #f59e0b;
  --accent-blue: #0284c7;
  --accent-emerald: #059669;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

/* Light Surface & Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.glass-panel-subtle {
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.card-white {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
}

/* Gradients */
.gradient-text-gold {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-navy {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subtle Card Glows & Hovers */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(217, 119, 6, 0.25);
}

/* Ambient Background Blobs (Soft pastels) */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

/* Light Pattern Background */
.bg-light-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

/* Trade Route Map Pulse and Line animations */
@keyframes pulse-node-light {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  }
  70% {
    transform: scale(1.2);
    box-shadow: 0 0 0 10px rgba(217, 119, 6, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
}

.route-node-pulse {
  animation: pulse-node-light 2.5s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes dash {
  to {
    stroke-dashoffset: -100;
  }
}

.animated-trade-line {
  stroke-dasharray: 6, 6;
  animation: dash 6s linear infinite;
}

/* Range slider styling */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d97706;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Badge tags */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Card hover zoom */
.product-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.08), 0 0 15px -3px rgba(217, 119, 6, 0.15);
}

.product-image-container {
  overflow: hidden;
}
.product-image-container img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-image-container img {
  transform: scale(1.06);
}

/* Tab active state */
.filter-tab.active {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Modals */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Cookie Banner Transitions */
#cookieConsentBanner {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
#cookieConsentBanner.hidden-banner {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

/* Custom Toggle Switch for Cookie Settings */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input:checked + .toggle-slider {
  background-color: #d97706;
}
input:checked + .toggle-slider:before {
  transform: translateX(20px);
}
input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Active Nav Link Pill */
.nav-link.active {
  color: #0f172a;
  font-weight: 700;
  border-bottom: 2px solid #d97706;
}

/* Phone Mockup Frame for 9:16 TikTok / Meta Ad Visualizer */
.phone-frame {
  width: 290px;
  height: 560px;
  background: #0f172a;
  border-radius: 40px;
  padding: 10px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 4px #e2e8f0;
  position: relative;
  margin: 0 auto;
}
.phone-notch {
  width: 100px;
  height: 18px;
  background: #0f172a;
  border-radius: 0 0 12px 12px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: #1e293b;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

/* Campaign Showcase Tabs */
.campaign-tab.active {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

/* Drag & Drop Upload Zone */
.dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  transition: all 0.2s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #d97706;
  background: #fffbeb;
}

/* Printable PDF Dossier Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #printableDossier, #printableDossier * {
    visibility: visible;
  }
  #printableDossier {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20mm;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: none !important;
  }
  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE & TOUCH-FRIENDLY OPTIMIZATIONS
   ========================================================================== */

/* Prevent accidental horizontal page overflow on small screens */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 640px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Responsive Touch Target Sizing (Min 44px recommended for mobile touch) */
@media (max-width: 768px) {
  button, 
  .nav-link,
  .filter-tab,
  .campaign-tab,
  .hub-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Touch-friendly range slider */
  input[type=range] {
    touch-action: pan-y;
    height: 10px;
  }
  input[type=range]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  
  /* Mobile modal adjustments */
  .modal-backdrop {
    padding: 0.75rem;
  }
  .modal-content {
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
    width: 100% !important;
  }
  
  /* Mobile table scroll containers */
  .table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Hero typography fluid scaling */
  h1 {
    font-size: clamp(2rem, 7vw, 3.5rem) !important;
    line-height: 1.2 !important;
  }
  h2 {
    font-size: clamp(1.5rem, 5vw, 2.25rem) !important;
    line-height: 1.25 !important;
  }

  /* Safe padding for fixed bottom banner on mobile */
  #cookieConsentBanner {
    bottom: 1rem !important;
    left: 1rem !important;
    right: 1rem !important;
    padding: 1.25rem !important;
  }
}

/* Word break helper for long emails/codes */
.break-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}
