/* =============================================================
   Lyuboshchi Search — live-suggest dropdown
   Matches existing .lyu-search overlay (dark panel, red gradient).
   ============================================================= */

.lyub-sug {
  --lyub-sug-grad: linear-gradient(135deg, #f2053c 0%, #cb003d 100%);
  --lyub-sug-grad-soft: linear-gradient(135deg, #ff5078 0%, #f2053c 100%);
  --lyub-sug-red: #f2053c;
  --lyub-sug-dark: #15161d;
  --lyub-sug-dark-2: #1c1d26;
  --lyub-sug-line: rgba(255, 255, 255, .08);
  --lyub-sug-line-2: rgba(255, 255, 255, .14);
  --lyub-sug-text: #f5f5f8;
  --lyub-sug-text-2: #b9bcc9;
  --lyub-sug-muted: #7e8194;
  --lyub-sug-radius: 14px;
  --lyub-sug-ease: cubic-bezier(.4, 0, .2, 1);

  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 100;
  background: var(--lyub-sug-dark);
  border: 1px solid var(--lyub-sug-line);
  border-radius: var(--lyub-sug-radius);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
  font-family: 'GothamPro', system-ui, -apple-system, sans-serif;
  color: var(--lyub-sug-text);
  animation: lyub-sug-in .18s var(--lyub-sug-ease) both;
}
.lyub-sug[hidden] { display: none !important; }

@keyframes lyub-sug-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* scrollbar (webkit) */
.lyub-sug::-webkit-scrollbar { width: 6px; }
.lyub-sug::-webkit-scrollbar-thumb { background: var(--lyub-sug-line-2); border-radius: 3px; }
.lyub-sug::-webkit-scrollbar-track { background: transparent; }

/* ===== sections ===== */
.lyub-sug__section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--lyub-sug-line);
}
.lyub-sug__section:last-child { border-bottom: 0; }
.lyub-sug__section--popular {
  background: rgba(242, 5, 60, .035);
}
.lyub-sug__section + .lyub-sug__all { /* tight to footer */ }
.lyub-sug a { color: var(--lyub-sug-text); }  /* defensive against theme cascade */

.lyub-sug__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lyub-sug-muted);
  margin: 0 0 10px;
}
.lyub-sug__heading svg { color: var(--lyub-sug-red); }

/* ===== products list ===== */
.lyub-sug__products {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lyub-sug__product {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--lyub-sug-text);
  transition: background .15s var(--lyub-sug-ease), box-shadow .2s var(--lyub-sug-ease);
}
.lyub-sug__product:hover,
.lyub-sug__product.is-focused {
  background: rgba(255, 255, 255, .055);
  color: var(--lyub-sug-text);
}
.lyub-sug__product.is-focused {
  background: linear-gradient(90deg, rgba(242, 5, 60, .14), rgba(242, 5, 60, .04));
  box-shadow: inset 3px 0 0 var(--lyub-sug-red);
}
.lyub-sug__product::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translate(4px, -50%);
  opacity: 0;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff5078' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18l6-6-6-6'/></svg>") no-repeat center / contain;
  transition: opacity .15s var(--lyub-sug-ease), transform .15s var(--lyub-sug-ease);
}
.lyub-sug__product:hover::after,
.lyub-sug__product.is-focused::after {
  opacity: 1;
  transform: translate(0, -50%);
}
.lyub-sug__product-img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--lyub-sug-dark-2);
  border: 1px solid var(--lyub-sug-line);
}
.lyub-sug__product-img--placeholder {
  display: inline-block;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .03) 60%, transparent 60%),
    var(--lyub-sug-dark-2);
}
.lyub-sug__product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lyub-sug__product-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--lyub-sug-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lyub-sug__product-title mark {
  background: transparent;
  color: var(--lyub-sug-red);
  font-weight: 700;
}
.lyub-sug__product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lyub-sug__product-price {
  font-size: 13px;
  font-weight: 700;
  background: var(--lyub-sug-grad-soft);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lyub-sug__product-price del {
  color: var(--lyub-sug-muted);
  background: none;
  -webkit-text-fill-color: var(--lyub-sug-muted);
  font-weight: 400;
  font-size: 11.5px;
  margin-right: 4px;
}

/* badges */
.lyub-sug__badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lyub-sug__badge--sale {
  background: var(--lyub-sug-grad);
  color: #fff;
  box-shadow: 0 2px 8px rgba(242, 5, 60, .3);
}
.lyub-sug__badge--oos {
  background: rgba(255, 255, 255, .08);
  color: var(--lyub-sug-muted);
  border: 1px solid var(--lyub-sug-line);
}

/* ===== chips (categories + popular) ===== */
.lyub-sug__chips,
.lyub-sug__popular-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lyub-sug__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--lyub-sug-line);
  color: var(--lyub-sug-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color .15s var(--lyub-sug-ease), background .15s var(--lyub-sug-ease), transform .15s var(--lyub-sug-ease);
}
.lyub-sug__chip:hover,
.lyub-sug__chip.is-focused {
  border-color: var(--lyub-sug-red);
  background: rgba(242, 5, 60, .12);
  color: #fff;
}
.lyub-sug__chip.is-focused { transform: translateY(-1px); }
.lyub-sug__chip mark {
  background: transparent;
  color: var(--lyub-sug-red);
  font-weight: 700;
}
.lyub-sug__chip-count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--lyub-sug-muted);
  background: rgba(255, 255, 255, .05);
  padding: 1px 6px;
  border-radius: 999px;
}
.lyub-sug__section--popular .lyub-sug__chip {
  background: rgba(255, 255, 255, .03);
}

/* ===== pages list ===== */
.lyub-sug__pages {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lyub-sug__page {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--lyub-sug-text-2);
  text-decoration: none;
  transition: background .15s var(--lyub-sug-ease), color .15s var(--lyub-sug-ease);
}
.lyub-sug__page svg { color: var(--lyub-sug-muted); }
.lyub-sug__page:hover,
.lyub-sug__page.is-focused {
  background: rgba(255, 255, 255, .05);
  color: #fff;
}
.lyub-sug__page.is-focused svg { color: var(--lyub-sug-red); }
.lyub-sug__page mark {
  background: transparent;
  color: var(--lyub-sug-red);
  font-weight: 700;
}

/* ===== show all (CTA footer) ===== */
/* Explicit color + !important to defeat theme cascades (.lyu-search__panel a { color: red }). */
.lyub-sug .lyub-sug__all,
.lyub-sug .lyub-sug__all:link,
.lyub-sug .lyub-sug__all:visited,
.lyub-sug .lyub-sug__all:hover,
.lyub-sug .lyub-sug__all:focus,
.lyub-sug .lyub-sug__all:active,
.lyub-sug .lyub-sug__all.is-focused {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  margin: 0;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
  background: var(--lyub-sug-grad) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  text-transform: none;
  position: relative;
  overflow: hidden;
  transition: filter .2s var(--lyub-sug-ease), transform .15s var(--lyub-sug-ease);
}
.lyub-sug .lyub-sug__all::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .55s var(--lyub-sug-ease);
  pointer-events: none;
}
.lyub-sug .lyub-sug__all:hover,
.lyub-sug .lyub-sug__all.is-focused {
  filter: brightness(1.08);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.lyub-sug .lyub-sug__all:hover::before,
.lyub-sug .lyub-sug__all.is-focused::before {
  transform: translateX(100%);
}
.lyub-sug__all-count {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
.lyub-sug__all-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  transition: transform .2s var(--lyub-sug-ease);
}
.lyub-sug .lyub-sug__all:hover .lyub-sug__all-arrow {
  transform: translateX(3px);
  background: rgba(255, 255, 255, .28);
}

/* ===== loading animation: wand wobbles over a box, sparkles fly ===== */
.lyub-sug__loading {
  padding: 22px 18px 24px;
  text-align: center;
}
.lyub-sug__loading-anim {
  display: inline-flex;
  margin-bottom: 8px;
}
.lyub-sug__loading-anim svg {
  filter: drop-shadow(0 6px 14px rgba(242, 5, 60, .25));
}
.lyub-sug__loading-wand {
  transform-origin: 60px 60px;
  animation: lyub-load-wobble .6s cubic-bezier(.4,0,.2,1) infinite alternate;
}
@keyframes lyub-load-wobble {
  0%   { transform: rotate(-22deg) translateY(0); }
  100% { transform: rotate(22deg)  translateY(-3px); }
}
.lyub-sug__loading-ring {
  transform-origin: 60px 22px;
  animation: lyub-load-ring .55s ease-out infinite;
}
@keyframes lyub-load-ring {
  0%   { transform: scale(.6); opacity: .9; }
  100% { transform: scale(2);  opacity: 0; }
}
.lyub-sug__sp {
  transform-box: fill-box;
  transform-origin: center;
  animation: lyub-load-sparkle 1.6s ease-in-out infinite;
}
.lyub-sug__sp--1 { animation-delay: 0s; }
.lyub-sug__sp--2 { animation-delay: .25s; }
.lyub-sug__sp--3 { animation-delay: .5s; }
.lyub-sug__sp--4 { animation-delay: .75s; }
.lyub-sug__sp--5 { animation-delay: 1s; }
.lyub-sug__sp--6 { animation-delay: 1.25s; }
@keyframes lyub-load-sparkle {
  0%   { opacity: 0; transform: scale(0) translateY(8px); }
  35%  { opacity: 1; transform: scale(1.3) translateY(-4px); }
  70%  { opacity: .6; transform: scale(.9) translateY(-10px); }
  100% { opacity: 0; transform: scale(.4) translateY(-16px); }
}
.lyub-sug__loading-text {
  margin: 0;
  color: var(--lyub-sug-text-2);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.lyub-sug__loading-text strong {
  color: #fff;
  font-weight: 600;
  background: var(--lyub-sug-grad-soft);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .lyub-sug__loading-wand,
  .lyub-sug__loading-ring,
  .lyub-sug__sp { animation: none !important; }
  .lyub-sug__loading-wand { transform: none !important; }
}

/* ===== empty / hint states ===== */
.lyub-sug__empty {
  padding: 26px 18px 20px;
  text-align: center;
  color: var(--lyub-sug-muted);
}
.lyub-sug__empty svg { color: var(--lyub-sug-muted); margin-bottom: 10px; opacity: .8; }
.lyub-sug__empty p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--lyub-sug-text-2); }
.lyub-sug__empty strong { color: #fff; font-weight: 600; }
.lyub-sug__empty-suggest {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.lyub-sug__hint {
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--lyub-sug-muted);
  text-align: center;
  border-bottom: 1px solid var(--lyub-sug-line);
}

/* ===== recently searched ===== */
.lyub-sug__section--recent { background: rgba(255, 255, 255, .015); }
.lyub-sug__recent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--lyub-sug-line);
  color: var(--lyub-sug-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color .15s var(--lyub-sug-ease), background .15s var(--lyub-sug-ease);
}
.lyub-sug__recent:hover,
.lyub-sug__recent.is-focused {
  border-color: var(--lyub-sug-red);
  background: rgba(242, 5, 60, .1);
  color: #fff;
}
.lyub-sug__recent-text { padding-right: 4px; }
.lyub-sug__recent-remove {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  color: var(--lyub-sug-muted);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: background .15s var(--lyub-sug-ease), color .15s var(--lyub-sug-ease);
}
.lyub-sug__recent-remove:hover {
  background: var(--lyub-sug-red);
  color: #fff;
}
.lyub-sug__recents-clear {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--lyub-sug-muted);
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s var(--lyub-sug-ease), background .15s var(--lyub-sug-ease);
}
.lyub-sug__recents-clear:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.lyub-sug__heading--with-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== position adjustments ===== */
.lyu-search__form { position: relative; }     /* main overlay form */
.lyu-drawer__search form { position: relative; }  /* mobile drawer */

/* When the suggest panel is open, soften the form border */
.lyu-search__form.lyub-sug-open {
  border-color: var(--lyub-sug-red);
}

/* ===== mobile breakpoint ===== */
@media (max-width: 600px) {
  .lyub-sug {
    max-height: 70vh;
    top: calc(100% + 8px);
    border-radius: 12px;
  }
  .lyub-sug__section { padding: 10px 12px; }
  .lyub-sug__product { padding: 8px 6px; gap: 10px; }
  .lyub-sug__product-img { flex-basis: 48px; width: 48px; height: 48px; }
  .lyub-sug__product-title { font-size: 12.5px; }
  .lyub-sug__chip { font-size: 12px; padding: 6px 10px; }
  .lyub-sug__all { padding: 12px 14px; font-size: 12.5px; }
}

/* ===== When inside the dark drawer (mobile menu), the form has different bg ===== */
.lyu-drawer__search .lyub-sug {
  left: 0;
  right: 0;
  margin-top: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lyub-sug { animation: none; }
  .lyub-sug__chip,
  .lyub-sug__product,
  .lyub-sug__page,
  .lyub-sug__all { transition: none; }
}

/* =============================================================
   Gutenberg block — `lyu-search/search-bar`
   ============================================================= */
.lyub-block-search {
  --lyub-bs-grad: linear-gradient(135deg, #f2053c, #cb003d);
  --lyub-bs-red: #f2053c;
  position: relative;
  font-family: 'GothamPro', system-ui, sans-serif;
}
.lyub-block-search__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lyub-block-search__form:focus-within {
  border-color: var(--lyub-bs-red);
  box-shadow: 0 0 0 4px rgba(242, 5, 60, .14);
}
.lyub-block-search__icon { color: #6b7280; flex-shrink: 0; }
.lyub-block-search__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #1a1a2e;
  font-size: 15px;
  font-family: inherit;
  padding: 11px 0;
}
.lyub-block-search__input::placeholder { color: #9ca3af; }
.lyub-block-search__submit {
  padding: 10px 20px;
  background: var(--lyub-bs-grad);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(242, 5, 60, .3);
  transition: transform .2s ease;
  font-family: inherit;
}
.lyub-block-search__submit:hover { transform: translateY(-1px); }

.lyub-block-search__popular {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
}
.lyub-block-search__popular-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}
.lyub-block-search__popular-item {
  padding: 6px 12px;
  background: #f4f4f8;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #1a1a2e;
  font-size: 12.5px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.lyub-block-search__popular-item:hover {
  border-color: var(--lyub-bs-red);
  background: rgba(242, 5, 60, .06);
}

/* Dark variant — for placement on dark backgrounds */
.lyub-block-search--dark .lyub-block-search__form {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}
.lyub-block-search--dark .lyub-block-search__input { color: #fff; }
.lyub-block-search--dark .lyub-block-search__input::placeholder { color: rgba(255, 255, 255, .5); }
.lyub-block-search--dark .lyub-block-search__icon { color: rgba(255, 255, 255, .5); }
.lyub-block-search--dark .lyub-block-search__popular-label { color: rgba(255, 255, 255, .55); }
.lyub-block-search--dark .lyub-block-search__popular-item {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
}

@media (max-width: 600px) {
  .lyub-block-search__form { padding: 4px 4px 4px 12px; gap: 6px; }
  .lyub-block-search__input { font-size: 14px; padding: 10px 0; }
  .lyub-block-search__submit { padding: 9px 14px; font-size: 12px; }
}
