/* Navy Fix v2 - Nuclear overrides loaded last */

/* == Mega menu == */
.mega-dropdown__cat { padding: 5px 14px !important; }
.mega-dropdown__cat:hover,
.mega-dropdown__cat.active,
a.mega-dropdown__cat:hover { background: #e8f0f8 !important; color: #003d73 !important; }
.mega-dropdown__cat--find,
.mega-dropdown__cat--find span,
a.mega-dropdown__cat--find { color: #003d73 !important; }
.mega-dropdown__cat--all,
.mega-dropdown__cat--all span,
a.mega-dropdown__cat--all { color: #003d73 !important; }

/* == Flyout cart == */
a.flyout-cart__shop-btn,
.flyout-cart .flyout-cart__shop-btn,
.flyout-cart__footer > a { background: #003d73 !important; color: #fff !important; }
a.flyout-cart__shop-btn:hover { background: #00294d !important; }

/* == Checkout: Privat/Foretag toggle == */
[class*="checkout-type"] [class*="active"],
[class*="checkout"] button[class*="active"],
[class*="type-toggle"] [class*="active"],
[class*="toggle"] button[class*="active"],
.checkout-type-toggle .active,
.checkout-type-toggle button.active,
div[class*="toggle"] button[style*="background"] { background: #003d73 !important; color: #fff !important; border-color: #003d73 !important; }

/* == Checkout step numbers == */
[class*="step"] [class*="number"],
[class*="step-num"],
.checkout-step__number,
span[class*="step"][class*="num"] { background: #b0bec5 !important; color: #fff !important; }
[class*="step"][class*="active"] [class*="number"],
.checkout-step.active .checkout-step__number { background: #003d73 !important; }

/* == Checkout buttons == */
.woocommerce-checkout .button,
.woocommerce #place_order,
#place_order { background: #003d73 !important; color: #fff !important; }
.woocommerce-checkout .button:hover,
#place_order:hover { background: #00294d !important; }

/* == Checkout total price == */
.order-total .woocommerce-Price-amount,
.order-total .amount,
[class*="order-total"] [class*="amount"],
[class*="total"] [class*="price"] { color: #003d73 !important; }

/* == Cart notification == */
.woocommerce-message .button,
.woocommerce-message a.button,
a.button.wc-forward { background: #003d73 !important; color: #fff !important; }
.woocommerce-message .button:hover,
a.button.wc-forward:hover { background: #00294d !important; }

/* == Add to cart hover == */
.add-to-cart-btn:hover,
button.add-to-cart-btn:hover { background: #00294d !important; }

/* == Stock text == */
.product-info__stock--instock { color: #003d73 !important; }
.flyout-cart .in-stock { color: #003d73 !important; }

/* == USP checkmarks == */
.product-usps svg { color: #003d73 !important; stroke: #003d73 !important; }

/* == Price color == */
.product-info__price .woocommerce-Price-amount { color: #003d73 !important; }

/* == Link hover == */
/* a:hover global rule — scoped to content area only */
a:hover { color: #00294d; }
/* NT-MENYHOVER (22 nov 2026): bara den mörka menyraden (.mega-nav__inner). Förut ".mega-nav a:hover", som också
   träffade den ljusa rullgardinen och gav vit text på ljus botten. */
.mega-nav__inner a:hover,
.mega-nav__link:hover,
.primary-nav .nav-menu > li > a:hover { color: #fff !important; }

.product-info__price,
.product-info__price .woocommerce-Price-amount,
.product-info__price bdi {
  font-weight: 700 !important;
}

/* Cross-sell items in sidebar */
.cross-sell-card { margin-top: 1rem; }
.cross-sell-list { display: flex; flex-direction: column; gap: 0; }
.cross-sell-item {
  display: flex; align-items: center; gap: 0;
  padding: 0; border-bottom: 1px solid #eef1f5;
  transition: background 0.15s;
}
.cross-sell-item:last-child { border-bottom: none; }
.cross-sell-item:hover { background: #f6f8fb; }
.cross-sell-item__link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.5rem; flex: 1; min-width: 0;
  text-decoration: none; color: inherit;
}
.cross-sell-item__img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #f8f8f8; flex-shrink: 0; border: 1px solid #eee; }
.cross-sell-item__info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cross-sell-item__name { font-size: 0.78rem; font-weight: 500; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.cross-sell-item__price { font-size: 0.82rem; font-weight: 700; color: #003d73; }
.cross-sell-item__btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; margin-right: 0.5rem;
  background: #003d73; color: #fff; border: none; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.cross-sell-item__btn:hover { background: #00508f; transform: scale(1.03); }
.cross-sell-item__btn.added { background: #2e7d32; }
.cross-sell-item__btn svg { flex-shrink: 0; }
.cross-sell-item__oos { font-size: 0.7rem; color: #999; padding: 6px 10px; margin-right: 0.5rem; flex-shrink: 0; font-style: italic; }
.cs-spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: cs-spin 0.6s linear infinite; display: inline-block; }
@keyframes cs-spin { to { transform: rotate(360deg); } }

/* Description card headings - smaller + better spacing */
.detail-card__body h2 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin: 1.5rem 0 0.5rem 0 !important;
  padding-bottom: 0.4rem !important;
  border-bottom: 1px solid #e8ecf0;
}
.detail-card__body h3 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 1.25rem 0 0.4rem 0 !important;
}
.detail-card__body h4 {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  margin: 1rem 0 0.35rem 0 !important;
}
.detail-card__body h2:first-child,
.detail-card__body h3:first-child,
.detail-card__body h4:first-child {
  margin-top: 0 !important;
}

/* Thumbnail carousel with arrows */
.product-gallery__thumbs-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.5rem;
  position: relative;
}
.product-gallery__thumbs {
  overflow: hidden !important;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
}
.thumb-arrow {
  width: 32px;
  height: 70px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  color: #333;
  font-size: 1.4rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 0;
}
.thumb-arrow:hover {
  background: #e8f0f8;
  border-color: #003d73;
  color: #003d73;
}

/* Mega menu subcategories: ultra compact */
.mega-dropdown__subcat {
  padding: 2px 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
}
.mega-dropdown__subcats {
  gap: 0 !important;
  row-gap: 0 !important;
}
.mega-dropdown__panel-title {
  font-size: 0.85rem !important;
  margin-bottom: 0.3rem !important;
  padding-bottom: 0.25rem !important;
}
.mega-dropdown__cat {
  padding: 4px 12px !important;
  font-size: 0.82rem !important;
  line-height: 1.3 !important;
}

/* Force thumbs container to not grow beyond gallery */
.product-gallery__thumbs-wrap {
  max-width: 100% !important;
  overflow: hidden !important;
}
.product-gallery__thumbs {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}
.product-gallery {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Search loading overlay */
.search-loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.search-loading-overlay.is-visible { opacity: 1; }
.search-loading-content {
  text-align: center;
  padding: 2rem;
}
.search-loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid #e8ecf0;
  border-top-color: #003d73;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.search-loading-text {
  font-size: 1.15rem;
  color: #1a1a2e;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.search-loading-sub {
  font-size: 0.85rem;
  color: #666;
}

/* ============================================
   CONFIGURATOR SEARCH - More prominent
   ============================================ */
.configurator__search-wrapper {
  border: 2px solid #b0c4d8 !important;
  box-shadow: 0 4px 24px rgba(0,61,115,0.10), 0 0 0 4px rgba(0,61,115,0.04) !important;
  padding: 6px 6px 6px 20px !important;
  background: #fff !important;
  border-radius: 16px !important;
}
.configurator__search-wrapper:focus-within {
  border-color: #003d73 !important;
  box-shadow: 0 4px 24px rgba(0,61,115,0.16), 0 0 0 4px rgba(0,61,115,0.08) !important;
}
.configurator__search-input {
  font-size: 1.05rem !important;
}
.configurator__search-btn {
  background: #0093ff !important; background-image: none !important;
  padding: 14px 28px !important;
  font-size: 0.95rem !important;
  border-radius: 12px !important;
}


/* ============================================
   MOBIL-POLISH: sökrutorna (21 aug 2026)
   Basreglerna ovan har !important UTAN mobilvarianter och trampade
   därför över style.css hela mobilblock → 1.05rem-text, dubbelring
   och 20px-padding på små skärmar ("märklig ram", Peters ord).
   Mobilen får: tunn kant, EN mjuk skugga, exakt 16px inputtext
   (mindre än förut men aldrig iOS-fokuszoom), slimmad knapp.
   ============================================ */
@media (max-width: 768px) {
  .configurator__search-wrapper {
    border: 1px solid #d9e2ee !important;
    box-shadow: 0 8px 24px rgba(10, 40, 80, 0.10) !important;
    border-radius: 16px !important;
    padding: 8px !important;
  }
  .configurator__search-wrapper:focus-within {
    border-color: #0093ff !important;
    box-shadow: 0 8px 24px rgba(0, 110, 200, 0.14) !important;
  }
  .configurator__search-icon {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 10px;
  }
  .configurator__search-input {
    font-size: 16px !important;
    padding: 10px 4px 10px 0 !important;
  }
  .configurator__search-input::placeholder {
    color: #a8b3c2;
  }
  .configurator__search-btn {
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: 11px !important;
    box-shadow: 0 3px 10px rgba(0, 147, 255, 0.28);
  }
  /* Header-söket: lugn 1px-ram i stället för tung 2px-låda */
  .header-search input[type="search"] {
    border-width: 1px;
    border-color: #e2e8f0;
    border-radius: 12px;
    background: #f6f8fb;
    font-size: 16px;
    padding: 9px 44px 9px 14px;
  }
  .header-search form {
    height: 44px;
  }
}
