:root {
  --navy: #152238;
  --navy-dark: #0f1a2b;
  --navy-light: #1e3354;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --text-on-dark: #f5f5f7;
  --text-muted-dark: #a8b4c4;

  --blue-soft: #dceaf7;
  --blue-icon: #b8d4ee;
  --accent: #2b6cb0;
  --sale: #e85d04;

  --border: #e8eaed;
  --shadow: 0 4px 24px rgba(21, 34, 56, 0.08);
  --shadow-lg: 0 20px 50px rgba(21, 34, 56, 0.18);

  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 280ms var(--ease);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* Promo bar */
.promo-bar {
  background: var(--navy-dark);
  color: var(--text-muted-dark);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.promo-divider {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Header */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-on-dark);
  text-decoration: none;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}

.nav-main span {
  cursor: default;
  transition: color var(--t);
}

.nav-main span:hover {
  color: var(--text-on-dark);
}

/* Hero — cinematic, like nordicvisual.dk carousel */
.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: center;
  background: var(--navy-dark);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(15, 26, 43, 0.92) 0%, rgba(15, 26, 43, 0.55) 45%, rgba(15, 26, 43, 0.75) 100%),
    linear-gradient(160deg, #1a3050 0%, #0f1a2b 50%, #152238 100%);
}

.hero-projection {
  position: absolute;
  top: 15%;
  right: 8%;
  width: 55%;
  height: 55%;
  background: radial-gradient(
    ellipse at 30% 60%,
    rgba(120, 180, 255, 0.35) 0%,
    rgba(80, 140, 220, 0.12) 35%,
    transparent 65%
  );
  border-radius: 4px;
  animation: glowPulse 5s ease-in-out infinite;
}

@keyframes glowPulse {
  50% {
    opacity: 0.75;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-on-dark);
  line-height: 1.1;
}

.hero-tagline {
  margin: 0.75rem 0 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-on-dark);
  opacity: 0.95;
}

.hero-desc {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted-dark);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn-shop {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t);
}

.btn-shop:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t), border-color var(--t);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Trust strip — white, light blue icons */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background: var(--white);
}

.trust-item {
  text-align: center;
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.85rem;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.trust-icon::after {
  content: "";
  width: 22px;
  height: 22px;
  background: var(--navy);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
}

.trust-icon--ship::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4'/%3E%3C/svg%3E");
}

.trust-icon--box::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4'/%3E%3C/svg%3E");
}

.trust-icon--shield::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z'/%3E%3C/svg%3E");
}

.trust-icon--dk::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='%23c8102e' width='24' height='24'/%3E%3Crect fill='white' x='7' width='3' height='24'/%3E%3Crect fill='white' y='10' width='24' height='3'/%3E%3C/svg%3E");
  mask-size: 70%;
}

.trust-item h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-item p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Bestsellers */
.bestsellers {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  background: var(--off-white);
}

.bestsellers h2 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.product-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}

.product-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.bestsellers-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  background: var(--sale);
  border-radius: 4px;
}

.product-img {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #f0f2f5, #e4e8ec);
  position: relative;
}

.product-img--projector::after {
  content: "";
  position: absolute;
  inset: 25%;
  border-radius: 20%;
  background: linear-gradient(180deg, #e8eaed, #c5cad1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-img--drive::after {
  content: "";
  position: absolute;
  inset: 20% 15%;
  border-radius: 8px;
  background: linear-gradient(180deg, #2a2a2a, #111);
  border: 2px solid #444;
}

.product-img--gocam::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 12px;
  background: #1a1a1a;
}

.product-img--rgb::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff6b9d, #c44dff, #4dabf7);
  opacity: 0.85;
}

.product-card h3 {
  margin: 0;
  padding: 0.85rem 1rem 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.price {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
}

.price-sale {
  font-weight: 700;
  color: var(--text);
}

.price-was {
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.35rem;
}

/* RGB banner */
.rgb-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: var(--navy);
  color: var(--text-on-dark);
}

.rgb-copy h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.rgb-copy p {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted-dark);
}

.rgb-visual {
  position: relative;
  height: 180px;
}

.rgb-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: orbFloat 8s ease-in-out infinite;
}

.rgb-orb--1 {
  width: 120px;
  height: 120px;
  background: #ff6b9d;
  top: 10%;
  left: 10%;
}

.rgb-orb--2 {
  width: 100px;
  height: 100px;
  background: #4dabf7;
  top: 30%;
  right: 20%;
  animation-delay: -3s;
}

.rgb-orb--3 {
  width: 80px;
  height: 80px;
  background: #c44dff;
  bottom: 10%;
  left: 40%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  50% {
    transform: translate(8px, -8px);
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer .ok {
  color: #2f855a;
}

.site-footer .error {
  color: #c53030;
}

/* —— Chat widget —— */
.chat-widget {
  position: fixed;
  z-index: 1000;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  right: max(1.25rem, env(safe-area-inset-right));
}

.chat-launcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  border: none;
  border-radius: 999px;
  background: var(--navy);
  color: var(--text-on-dark);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t), background var(--t);
}

.chat-launcher:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}

.chat-widget.is-open .chat-launcher {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: min(390px, calc(100vw - 2rem));
  height: min(600px, calc(100dvh - 2rem));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}

.chat-widget.is-open .chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-panel[hidden] {
  display: flex !important;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--navy);
  color: var(--text-on-dark);
}

.chat-panel-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.65rem;
  font-weight: 700;
}

.chat-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.55rem;
}

.chat-panel-header h2 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.chat-panel-header p {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: var(--text-muted-dark);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #68d391;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-clear {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted-dark);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}

.chat-clear:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

.chat-clear:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--off-white);
}

.messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: fadeUp 0.3s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.message.user {
  margin-left: auto;
  background: var(--navy);
  color: var(--text-on-dark);
  border-bottom-right-radius: 4px;
}

.message.assistant {
  margin-right: auto;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.message.assistant.streaming p::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.message.error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.quick-actions {
  padding: 0 1rem 0.75rem;
}

.quick-actions.hidden {
  display: none;
}

.quick-label {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.quick-action {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}

.quick-action:hover:not(:disabled) {
  border-color: var(--blue-icon);
  background: var(--blue-soft);
}

.quick-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 0.5rem;
}

.typing-indicator.hidden {
  display: none;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat-input {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.chat-input input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.chat-input input:disabled {
  opacity: 0.55;
}

.chat-input button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
}

.chat-input button:disabled {
  opacity: 0.45;
}

@media (max-width: 900px) {
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rgb-banner {
    grid-template-columns: 1fr;
  }

  .nav-main {
    display: none;
  }
}

@media (max-width: 520px) {
  .trust {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    right: 0;
    left: 0;
    bottom: 0;
  }

  .chat-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }
}
