/* Search conversion layer: overlay suggestions + product-first results. */
.nordic-live-search-form {
  position: relative;
}

.nordic-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 10020;
  display: none;
  max-height: none;
  overflow: visible;
  border: 1px solid #e8e0d6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(35, 28, 22, 0.16);
}

.nordic-search-dropdown.is-visible {
  display: block;
}

.search-overlay[aria-hidden="false"] {
  overflow-y: auto;
}

.nordic-search-loading,
.nordic-search-empty,
.nordic-search-error {
  margin: 0;
  padding: 14px 16px;
  color: #5f5750;
  font-size: 0.92rem;
}

.nordic-search-popular {
  padding: 14px;
}

.nordic-search-popular__label {
  margin: 0 0 10px;
  color: #766b60;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nordic-search-popular__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nordic-search-popular__links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2d8cc;
  border-radius: 999px;
  background: #fbfaf8;
  color: #2c2c2c;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.nordic-search-popular__links a:hover,
.nordic-search-popular__links a:focus {
  border-color: #111;
  background: #111;
  color: #fff;
}

.nordic-search-skeleton {
  display: grid;
}

.nordic-search-skeleton__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0ebe5;
}

.nordic-search-skeleton__image,
.nordic-search-skeleton__copy span {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2ede6 0%, #fbfaf8 48%, #f2ede6 100%);
  background-size: 220% 100%;
  animation: nordic-search-pulse 1.05s ease-in-out infinite;
}

.nordic-search-skeleton__image {
  width: 64px;
  height: 64px;
}

.nordic-search-skeleton__copy {
  display: grid;
  gap: 8px;
}

.nordic-search-skeleton__copy span:first-child {
  width: 86%;
  height: 14px;
}

.nordic-search-skeleton__copy span:last-child {
  width: 52%;
  height: 12px;
}

@keyframes nordic-search-pulse {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.nordic-search-suggestions {
  display: grid;
}

.nordic-search-suggestion {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  color: #2c2c2c;
  text-decoration: none;
  border-bottom: 1px solid #f0ebe5;
}

.nordic-search-suggestion:hover,
.nordic-search-suggestion:focus {
  background: #fbfaf8;
  color: #111;
  outline: none;
}

.nordic-search-suggestion__media {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 8px;
  background: #f6f2ed;
}

.nordic-search-suggestion__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nordic-search-suggestion__body,
.nordic-search-suggestion__title,
.nordic-search-suggestion__meta {
  display: block;
  min-width: 0;
}

.nordic-search-suggestion__title {
  margin-bottom: 4px;
  font-weight: 700;
  line-height: 1.25;
}

.nordic-search-suggestion__meta {
  color: #6d6258;
  font-size: 0.84rem;
  line-height: 1.35;
}

.nordic-search-suggestion__meta span + span::before {
  content: " | ";
  color: #b7aa9b;
}

.nordic-search-view-all,
.nordic-search-see-all {
  display: flex;
  justify-content: center;
  position: static;
  padding: 14px 16px;
  background: #111;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 -10px 24px rgba(255, 255, 255, 0.92);
}

.nordic-search-view-all:hover,
.nordic-search-view-all:focus,
.nordic-search-see-all:hover,
.nordic-search-see-all:focus {
  background: #333;
  color: #fff !important;
}

.nordic-search-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 18px 64px;
}

.nordic-search-hero {
  margin-bottom: 30px;
}

.nordic-search-eyebrow {
  margin: 0 0 8px;
  color: #8f7a64;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nordic-search-hero h1 {
  margin: 0 0 10px;
  color: #2c2c2c;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
}

.nordic-search-hero p:last-child {
  max-width: 680px;
  margin: 0;
  color: #655c54;
}

.nordic-search-section {
  margin-top: 34px;
}

.nordic-search-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.nordic-search-section h2,
.nordic-search-empty-state h2 {
  margin: 0 0 12px;
  color: #2c2c2c;
  font-size: 1.55rem;
  line-height: 1.2;
}

.nordic-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.nordic-search-card {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(45, 35, 25, 0.07);
}

.nordic-search-card__media {
  position: relative;
  overflow: hidden;
  background: #f6f2ed;
}

.nordic-search-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.nordic-search-card__body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.nordic-search-card__title {
  min-height: 42px;
  color: #2c2c2c;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.nordic-search-card__price {
  color: #2c2c2c;
  font-weight: 800;
}

.nordic-search-card__stock {
  color: #6d6258;
  font-size: 0.85rem;
}

.nordic-search-card__stock.is-in-stock {
  color: #2f7d4f;
}

.nordic-search-card__stock.is-out-of-stock {
  color: #9a4a3f;
}

.nordic-search-card__button,
.nordic-search-card__button.button,
.nordic-search-card__button.add_to_cart_button,
.nordic-search-card__button.ajax_add_to_cart,
.nordic-search-card .button.nordic-search-card__button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #111 !important;
  border-radius: 10px;
  background: #111 !important;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  box-shadow: none !important;
  text-transform: none;
}

.nordic-search-card__button:hover,
.nordic-search-card__button:focus,
.nordic-search-card__button.button:hover,
.nordic-search-card__button.button:focus,
.nordic-search-card__button.add_to_cart_button:hover,
.nordic-search-card__button.add_to_cart_button:focus {
  border-color: #333 !important;
  background: #333 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.nordic-search-pagination {
  margin-top: 24px;
}

.nordic-search-empty-state {
  padding: 28px;
  border: 1px solid #e8e0d6;
  border-radius: 14px;
  background: #fbfaf8;
}

.nordic-search-empty-state p {
  max-width: 680px;
  margin: 0 0 16px;
  color: #655c54;
}

.nordic-search-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nordic-search-category-links a {
  display: inline-flex;
  padding: 10px 14px;
  border: 1px solid #e1d7ca;
  border-radius: 999px;
  background: #fff;
  color: #2c2c2c;
  font-weight: 700;
  text-decoration: none;
}

.nordic-search-guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nordic-search-guide {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #eee6dc;
  border-radius: 12px;
  background: #fff;
  color: #2c2c2c;
  text-decoration: none;
}

.nordic-search-guide span {
  color: #655c54;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .nordic-search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nordic-search-guide-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nordic-search-page {
    padding: 28px 14px 52px;
  }

  .nordic-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .nordic-search-card__body {
    padding: 12px;
  }

  .nordic-search-card__title {
    min-height: 38px;
    font-size: 0.92rem;
  }

  .nordic-search-dropdown {
    max-height: 66vh;
    overflow-y: auto;
  }
}

/* Compact WooCommerce notices used by search/cart flows. */
.woocommerce-notices-wrapper {
  margin: 0 0 18px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.nordic-cart-message {
  width: 100%;
  margin: 0 0 14px !important;
  padding: 14px 16px !important;
  border: 1px solid #e4d8ca !important;
  border-left: 4px solid #111 !important;
  border-radius: 12px !important;
  background: #fffaf4 !important;
  color: #2c2c2c !important;
  box-shadow: 0 10px 24px rgba(45, 35, 25, 0.07) !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none !important;
}

.woocommerce-error {
  border-left-color: #9a4a3f !important;
  background: #fff7f5 !important;
}

.woocommerce-info {
  border-left-color: #8f7a64 !important;
}

.nordic-cart-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nordic-cart-message strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.nordic-cart-message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nordic-cart-message__link,
.nordic-cart-message__button,
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px !important;
  padding: 9px 14px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: none !important;
}

.nordic-cart-message__button,
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
  border: 1px solid #111 !important;
  background: #111 !important;
  color: #fff !important;
}

.nordic-cart-message__link {
  border: 1px solid #d9cdbf !important;
  background: #fff !important;
  color: #111 !important;
}

@media (max-width: 640px) {
  .nordic-cart-message {
    align-items: stretch;
    flex-direction: column;
  }

  .nordic-cart-message__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }
}
