/* Base Styles */
:root {
  /* Brand palette */
  --primary: #0e141b; /* deep navy/charcoal for headers/bands */
  --primary-dark: #0a0f17;
  --secondary: #f5f7fa;

  /* Accent */
  --accent: #d20a1b; /* Anchorlift red */

  /* Text */
  --text: #111111;
  --text-light: #6b7280;
  --white: #ffffff;

  /* Greys */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Shared */
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Proxima Nova", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background-color: white;
}

.container {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
  font-family: "HelveticaNowDisplay", sans-serif;
  line-height: 1.2;
  color: #000000;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero h1 {
  color: white;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  font-family: "halyard-display", sans-serif;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  margin-top: 20px;
}
.btn-primary:hover {
  background-color: color-mix(in srgb, var(--primary) 90%, #000);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}
.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-text {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}
.btn-text:hover {
  color: color-mix(in srgb, var(--accent) 85%, #000);
  gap: 0.75rem;
  text-decoration: underline;
}

/* Hero Section */
.hero {
  position: relative;
  height: min(90svh, 1500px);
  max-height: 1500px;
  overflow: hidden;
}

.hero-slider {
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: var(--white);
  max-width: 600px;
  z-index: 1;
}

.slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Categories Section */
.category-section {
  text-align: center;
  padding: 30px 0;
  position: relative;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
}

.category-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 100%;
  margin: 0 auto;
}

/* Added spacing for Owl Carousel category items */
.category-carousel .category-item {
  padding: 10px;
}

.category-item {
  display: inline-block; /* full clickable tile */
  text-align: center;
  text-decoration: none; /* remove default link underline */
  color: inherit; /* keep text color consistent */
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  background: transparent;
  border-radius: 12px;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* nicer on mobile */
}

.category-image {
  width: clamp(140px, 24vw, 190px);
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  position: relative;
  display: block;
  transition: transform 0.2s ease-in-out;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.category-item:hover .category-image {
  transform: scale(1.05);
}

/* ensure link states look like cards, not default links */
.category-item:link,
.category-item:visited {
  color: inherit;
  text-decoration: none;
}

/* keyboard focus ring */
.category-item:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

/* subtle text feedback on hover */
.category-item:hover .category-name {
  text-decoration: underline;
}

/* press feedback */
.category-item:active .category-image {
  transform: scale(0.98);
}

/* match hover scale when focused via keyboard */
.category-item:focus-visible .category-image {
  transform: scale(1.05);
}

.category-name {
  margin-top: 15px;
  font-size: 1.25rem;
  color: black;
  font-weight: 500;
  font-family: "halyard-display", sans-serif;
}

.nav-button {
  font-size: 2rem;
  color: black;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  transition: color 0.2s, transform 0.2s;
  user-select: none;
  background-color: var(--gray-600);
  border-radius: 12px;
}

.nav-button:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.nav-button:disabled {
  color: var(--gray-400);
  cursor: not-allowed;
  opacity: 0.5;
}

.nav-button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Owl Carousel navigation for Shop By Category and our products */
.product-section .owl-prev,
.product-section .owl-next,
.category-section .owl-prev,
.category-section .owl-next {
  position: absolute;
  top: 50%;
  z-index: 10;
  font-size: 2rem;
  color: black;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  transform: translateY(-50%) scale(1);
}
.product-section .owl-prev,
.category-section .owl-prev {
  left: -30px;
}
.product-section .owl-next,
.category-section .owl-next {
  right: -30px;
}
.product-section .owl-prev:hover,
.product-section .owl-next:hover,
.category-section .owl-prev:hover,
.category-section .owl-next:hover {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .category-card.featured {
    grid-column: auto;
    grid-row: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ---------- Needs / Guidance section ---------- */
.needs-section {
  padding: clamp(40px, 5vw, 32px) 0;
  background: #f3f3f3;
}

.needs-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) 1.1fr; /* image | text */
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  min-height: 0; /* allow natural height; fixes clipping on tablets */
}

.needs-media {
  position: relative;
  height: 380px; /* fixed container height (desktop) */
  overflow: hidden;
  background: transparent; /* no white frame */
  border-radius: 12px; /* rounded corners clip children */
  display: flex;
  justify-content: center;
  align-items: center;
}

.needs-media img {
  max-height: 350px; /* cap image height */
  max-width: 100%;
  width: auto; /* preserve natural aspect */
  height: auto;
  object-fit: contain; /* never crop */
  display: block;
  border-radius: 12px; /* keeps rounded edges when image fills */
}

.needs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 400ms ease;
  display: flex; /* center image inside fixed-height area */
  align-items: center;
  justify-content: center;
}

.needs-slide.is-active {
  opacity: 1;
  position: relative;
  pointer-events: auto;
  z-index: 2;
}

/* If a slide image is square, optionally add class to cap its size a bit more */
.needs-slide.is-square img,
.needs-media img.is-square {
  max-height: 330px; /* per request for square images */
}

/* Small dot controls */
.needs-dots {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.needs-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0;
  cursor: pointer;
}
.needs-dots button.is-active {
  background: #ffffff;
}

/* ---- Image Hotspot (anchor pin) ---- */
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.hotspot__dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(245, 246, 247, 0.9); /* light grey */
  border: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  z-index: 2;
  pointer-events: none;
}

.hotspot:focus-visible .hotspot__dot {
  outline: 3px solid rgba(210, 10, 27, 0.5);
  outline-offset: 2px;
}

.hotspot__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: rgba(200, 205, 210, 0.9);
  animation: hotspot-pulse 1.8s ease-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes hotspot-pulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.7);
    opacity: 0;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.hotspot__tooltip {
  position: absolute;
  left: 5px;
  top: -12px;
  transform: translate(0, -100%) translateY(-6px);
  width: 200px;
  max-width: min(56vw, 320px);
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background: rgba(14, 20, 27, 0.92);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
  text-align: left;
}

.hotspot__tooltip::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: -6px;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(14, 20, 27, 0.92) transparent transparent transparent;
}

/* Show tooltip on hover/focus or when opened by tap */
.hotspot:hover .hotspot__tooltip,
.hotspot:focus-visible .hotspot__tooltip,
.hotspot.open .hotspot__tooltip {
  opacity: 1;
  transform: translate(0, -100%) translateY(-12px);
}

/* Prefer larger click target on mobile */
@media (max-width: 768px) {
  .hotspot {
    width: 22px;
    height: 22px;
  }
  .hotspot__dot {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .needs-slide {
    transition: none !important;
  }
  .hotspot__pulse {
    animation: none !important;
  }
}

/* Right content */
.needs-title {
  font-size: clamp(24px, 3.6vw, 40px); /* nærmere h2-skala */
  line-height: 1.08;
  margin: 0 0 8px;
  color: #000;
  font-weight: 700;
}

.needs-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(8px, 1.2vw, 12px);
}

.badge-line {
  width: clamp(40px, 8vw, 96px);
  height: 20px;
  flex: 0 0 auto;
  opacity: 0.85; /* subtil */
}

/* dempet accent i stedet for grønn */
.badge-pill {
  background-color: #0e141b;
  color: #ffffff;
  border-radius: 15px;
  padding: 8px 14px;
  font-weight: 400;
  white-space: nowrap;
  letter-spacing: 0.2px;
  font-family: "halyard-display", sans-serif;
}

/* Three columns */
.needs-columns {
  margin-top: clamp(14px, 2vw, 24px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.need h3 {
  font-size: clamp(16px, 1.4vw, 18px);
  margin: 0 0 6px;
  font-weight: 700;
}
.need p {
  color: var(--text-light, #6b7280);
  font-size: clamp(14px, 1.2vw, 16px);
}

/* CTAs */
.needs-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(16px, 2.2vw, 24px);
}
.btn-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.btn-link:hover {
  text-decoration: underline;
}

/* match resten: subtil accent-tint + samme skygger/radius */

.btn-mint {
  background-color: #0e141b;
  color: #ffffff;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.btn-mint:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Tablet (<=1024px): keep two columns but tighten spacing */
@media (max-width: 1024px) {
  .needs-grid {
    grid-template-columns: minmax(280px, 0.95fr) 1.05fr;
    gap: clamp(16px, 3vw, 32px);
  }
  .needs-media {
    height: 340px;
  }
  .needs-media img {
    max-height: 320px;
  }
}

/* Mobile (<=768px): stack and center */
@media (max-width: 768px) {
  .needs-grid {
    grid-template-columns: 1fr;
  }
  .needs-content {
    text-align: center;
  }
  .needs-columns {
    grid-template-columns: 1fr;
  }
  .badge-line {
    display: none; /* save space on phones */
  }
  .needs-title {
    font-size: clamp(22px, 6vw, 34px);
  }
  .needs-media {
    height: 260px;
  }
  .needs-media img {
    max-height: 240px;
  }
}
/* Product Carousel Section */
.product-section {
  padding: 50px 0 0px;
  background-color: var(--white);
}

/* --- Product card (samme som shop) --- */
.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* klikkbar lenke rundt bilde + tittel */
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.product-link:hover {
  transform: translateY(-4px);
}

/* bildecontainer for bedre kontroll over hvite rammer */
.product-image-container {
  height: clamp(180px, 22vw, 240px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0; /* fjerner hvite marginer/rammer */
  border-radius: var(--radius-md);
  overflow: hidden;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* bildebruk: fast høyde, ikke hvit bakgrunn */
.product-card img {
  width: 100%;
  height: clamp(180px, 22vw, 240px);
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  display: block;
}

/* tittel + “liten card line” under */
.product-card h3,
.product-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 12px 0 4px;
  line-height: 1.35;
  text-align: center;
  min-height: 2.7em; /* holder høyden lik mellom kort */
}
.product-card .product-card-line {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #67748e;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em; /* lik teksthøyde */
}

/* knapperaden under kortet */
.product-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: auto; /* skyv knappene til bunn av kortet */
}
.product-actions .addcart {
  appearance: none;
  border: 0;
  cursor: pointer;
  height: 44px; /* identisk høyde på alle knapper */
  padding: 0 14px; /* kun horisontal padding */
  border-radius: 10px;
  width: 100%;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #262626;
  color: #fff;
  transition: filter 0.2s ease, transform 0.1s ease;
  margin-top: 12px;
}
.product-actions .addcart:hover {
  filter: brightness(1.5);
}

/* keep carousel rules */
.product-carousel {
  border-bottom: none !important;
}
.product-section .owl-carousel .item {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* USP bar under produktseksjon */
.usp-bar {
  background: #0e141b;
  padding: 14px;
  color: #fff;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}
.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px 0;
  justify-items: center;
  align-items: center;
}
.usp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  justify-content: center;
  text-align: center;
}
.usp-item i {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .usp-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== Responsive tweaks for Owl on iPad & Mobile ====== */
@media (max-width: 1024px) {
  .product-section .owl-prev,
  .category-section .owl-prev {
    left: 6px;
  }
  .product-section .owl-next,
  .category-section .owl-next {
    right: 6px;
  }
  .product-section .owl-prev,
  .product-section .owl-next,
  .category-section .owl-prev,
  .category-section .owl-next {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .product-section .owl-prev,
  .product-section .owl-next,
  .category-section .owl-prev,
  .category-section .owl-next {
    top: 48%;
    font-size: 1.4rem;
  }

  /* Slightly smaller category tiles on mobile */
  .category-image {
    width: clamp(120px, 34vw, 160px);
  }
}
