/* mahik.ua KSAD-style live search dropdown */
#sc_livesearch.expanded {
  display: block !important;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 8px;
  max-height: 70vh;
  overflow-y: auto;
}

.ms-empty { padding: 20px; text-align: center; color: #666; }
.ms-dym-row { padding: 8px 12px; background: #fff8e1; border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.ms-dym { color: #c2185b; font-weight: 700; text-decoration: underline; }
.ms-section { margin-bottom: 12px; }
.ms-section-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; color: #888; padding: 4px 8px;
}
.ms-cat {
  display: inline-block; padding: 6px 12px; margin: 2px;
  background: #f5f5f5; border-radius: 16px; color: #333;
  font-size: 13px; text-decoration: none;
}
.ms-cat:hover { background: #ffe0ef; color: #c2185b; }

.ms-product {
  display: flex; align-items: center; padding: 8px;
  border-radius: 8px; text-decoration: none; color: #333;
  transition: background 120ms;
}
.ms-product:hover { background: #f9f9f9; }
.ms-product img { width: 50px; height: 50px; object-fit: contain; margin-right: 12px; border-radius: 6px; flex-shrink: 0; }
.ms-noimage { width: 50px; height: 50px; background: #eee; border-radius: 6px; margin-right: 12px; flex-shrink: 0; }
.ms-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ms-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-meta { font-size: 12px; color: #888; margin-top: 2px; }

.ms-allbtn {
  display: block; text-align: center; padding: 10px;
  background: #c2185b; color: #fff; border-radius: 8px;
  font-weight: 700; text-decoration: none; margin-top: 8px;
}
.ms-allbtn:hover { background: #ad1457; color: #fff; }

.ms-trend {
  display: inline-block; padding: 6px 12px; margin: 2px;
  background: #e3f2fd; border-radius: 16px; color: #1976d2;
  font-size: 13px; text-decoration: none;
}
.ms-trend:hover { background: #bbdefb; }

#ms-voice-btn:hover { background: #f5f5f5 !important; border-radius: 50%; }

/* ─── Search results page polish (scoped) ─── */

/* Hide redundant "Критерій пошуку" form on results page when products exist */
#product-search .sc-search-block { display: none; }
#product-search .sc-search-block + .row .sc-category-search-title { display: none; }

/* H1: bigger, lighter, with accent on query */
#product-search h1 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}
#product-search .sc-page-title { padding-bottom: 8px !important; }

/* Sort row: rounded card with subtle shadow */
#product-search .sc-category-sort {
  background: #fff;
  border: 1px solid #f0f0f5;
  border-radius: 12px;
  padding: 10px 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
#product-search .sc-category-sort-select {
  border: 1px solid #e6e6ee;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fafafc;
}

/* Cards: cleaner, with hover lift */
#product-search .product-layout .content-block {
  border-radius: 14px !important;
  border: 1px solid #f0f0f5 !important;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  overflow: hidden;
}
#product-search .product-layout:hover .content-block {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(194, 24, 91, 0.10), 0 2px 6px rgba(0,0,0,0.04);
  border-color: #f6dbe7 !important;
}
#product-search .sc-module-img { background: #fafafc; }
#product-search .sc-module-img img { transition: transform 250ms ease; }
#product-search .product-layout:hover .sc-module-img img { transform: scale(1.04); }

/* Placeholder cards: friendlier */
#product-search .sc-module-img img[src$="placeholder.png"],
#product-search .sc-module-img img[src*="no-thumb"],
#product-search .sc-module-img img[src*="lazy-image"] {
  opacity: 0.35;
  filter: grayscale(0.6);
}

/* Price prominence */
#product-search .product-layout .sc-module-caption .fw-700,
#product-search .product-layout [class*="price"] {
  color: #c2185b;
}

/* Pagination */
#product-search .pagination .page-link,
#product-search .pagination .page-item .page-link {
  border-radius: 8px;
  margin: 0 2px;
  border-color: #f0f0f5;
}
#product-search .pagination .page-item.active .page-link {
  background: #c2185b;
  border-color: #c2185b;
  box-shadow: 0 4px 10px rgba(194,24,91,0.25);
}

/* Spacing fixes */
#product-search .main { padding-bottom: 40px; }
#product-search .sc-category-products { margin-top: 18px; }

/* Empty state — when products is empty, allow form to show */
#product-search:not(:has(.product-layout)) .sc-search-block { display: block; }
