/* ============================================
   LUNARCO — Full-screen search (luxury-house style)
   Fonts / colours come from style.css variables:
   Cinzel (logo) · Cormorant Garamond (headings) · Inter (UI)
   ============================================ */
.search-overlay.sx {
  position: fixed; inset: 0; z-index: 110; background: #fff; color: var(--ink);
  transform: none; opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  font-family: var(--font-body);
}
.search-overlay.sx.open { opacity: 1; visibility: visible; transition: opacity .28s ease, visibility 0s; }

/* top bar: centred wordmark + close */
.sx-top { position: relative; display: flex; align-items: center; justify-content: center; height: 76px; }
.sx-logo { font-family: var(--font-logo); font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .42em; padding-left: .42em; color: var(--ink); text-decoration: none; }
.sx-close { position: absolute; right: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.sx-close svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.4; }

/* sticky search field (+ count + tabs when searching) */
.sx-sticky { position: sticky; top: 0; z-index: 6; background: #fff; padding: 4px clamp(16px, 8vw, 150px) 0; }
.sx-form { position: relative; max-width: 640px; margin: 0 auto; }
.sx-input {
  width: 100%; height: 46px; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff;
  padding: 0 84px 0 24px; font: 400 14px/1 var(--font-body); letter-spacing: .01em; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .2s;
}
.sx-input:focus { border-color: var(--ink); }
.sx-input::placeholder { color: #6d6d6d; }
.sx-input::-webkit-search-cancel-button { display: none; }
.sx-clear { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: 400 12px var(--font-body); color: #555; letter-spacing: .04em; cursor: pointer; padding: 6px; }
.sx-clear:hover { color: var(--ink); }

/* live suggestions */
.sx-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; z-index: 8; padding: 8px 0; box-shadow: 0 10px 30px rgba(0,0,0,.08); border: 1px solid var(--line); }
.sx-s-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 22px; background: none; border: 0; text-align: left; font: 400 13px var(--font-body); color: #8a8a8a; text-decoration: none; cursor: pointer; }
.sx-s-item b { font-weight: 500; color: var(--ink); }
.sx-s-item span { color: #8a8a8a; }
.sx-s-item:hover, .sx-s-item.on { background: #f6f5f3; }
.sx-s-item svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 1.5; flex-shrink: 0; }
.sx-s-cat span { color: var(--ink); }

/* results bar */
.sx-resbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1760px; margin: 0 auto; padding: 22px 0 14px; }
.sx-count { font-size: 12px; letter-spacing: .02em; color: #6d6d6d; margin: 0; }
.sx-count span { color: var(--ink); }
.sx-filter-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff; font: 400 12px var(--font-body); letter-spacing: .03em; color: var(--ink); cursor: pointer; }
.sx-filter-btn:hover { border-color: var(--ink); }
.sx-filter-btn svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.sx-fcount { min-width: 16px; height: 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px; display: inline-grid; place-items: center; padding: 0 4px; }

/* tabs */
.sx-tabs { display: flex; justify-content: center; gap: clamp(18px, 4vw, 48px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * clamp(16px, 8vw, 150px)); padding: 0 clamp(16px, 8vw, 150px); }
.sx-tabs::-webkit-scrollbar { display: none; }
.sx-tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; padding: 12px 2px; font: 400 12px var(--font-body); letter-spacing: .03em; color: #6d6d6d; cursor: pointer; white-space: nowrap; }
.sx-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* trending */
.sx-trending { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; padding: 18px 20px 30px; font-size: 11px; }
.sx-trend-label { letter-spacing: .1em; text-transform: uppercase; color: #6d6d6d; font-size: 10px; }
.sx-trend-list { display: inline-flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.sx-trend-list button { background: none; border: 0; padding: 4px 0; font: 400 12px var(--font-body); color: var(--ink); cursor: pointer; }
.sx-trend-list button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* home rows */
.sx-row { margin-bottom: 38px; }
.sx-row-title { font: 400 13px var(--font-body); letter-spacing: .02em; color: #6d6d6d; padding: 0 clamp(16px, 2.2vw, 34px) 12px; margin: 0; }
.sx-row-track { display: grid; grid-template-columns: repeat(6, 1fr); }
.sx-empty { text-align: center; color: #6d6d6d; font-size: 13px; padding: 60px 20px; }

/* cards inside search (grey tile, name / tag / price under it) */
.sx .product-card { position: relative; overflow: visible; background: transparent; }
.sx .product-image-wrap.pc-slider { aspect-ratio: 4 / 5; background: #fff; }
.sx .pc-slide img { object-fit: cover; }
.sx .sx-info { padding: 12px clamp(12px, 1.4vw, 22px) 22px; }
.sx .product-name { font: 400 12px/1.4 var(--font-body); color: var(--ink); margin: 0 0 3px; letter-spacing: .01em; }
.sx .sx-tag { font: 400 11px var(--font-body); color: #8a8a8a; margin: 0 0 3px; }
.sx .product-price { font: 400 12px var(--font-body); color: #6d6d6d; margin: 0; }
.sx .product-card.sold-out .pc-slide img { opacity: .55; }

/* results grid */
.sx-results { max-width: 1760px; margin: 0 auto; padding-bottom: 20px; }
.sx-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.sx-loose { text-align: center; font-size: 12px; color: #6d6d6d; padding: 14px 0 6px; margin: 0; }
.sx-none { text-align: center; padding: 70px 20px 40px; font-size: 14px; }
.sx-none p { margin: 0 0 10px; }
.sx-none-sub { color: #6d6d6d; font-size: 12px; margin-top: 26px !important; }
.sx-none-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 10px; }
.sx-none-links a { font-size: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.sx-fclear-inline { background: none; border: 1px solid #cfcfcf; border-radius: 999px; padding: 8px 18px; font: 400 12px var(--font-body); cursor: pointer; }

/* World of Lunarco / FAQ lists */
.sx-links { max-width: 760px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px) 40px; }
.sx-links h3 { font: 400 clamp(24px, 3vw, 32px)/1.2 var(--font-heading); margin: 0 0 14px; }
.sx-link { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sx-link-t { font: 500 14px var(--font-body); }
.sx-link-d { grid-column: 1; font-size: 12px; color: #6d6d6d; margin-top: 4px; }
.sx-link-a { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 22px; color: #8a8a8a; }
.sx-link:hover .sx-link-a { color: var(--ink); }

/* help line */
.sx-help { text-align: center; font-size: 11px; color: var(--ink); padding: 34px 16px 44px; margin: 0; letter-spacing: .02em; }
.sx-help a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sx.is-searching .sx-help { padding-top: 12px; }

/* filters drawer */
.sx-fscrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 20; }
.sx-fscrim[hidden] { display: none; }
.sx-fpanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 21; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.77,0,.175,1); }
.sx-fpanel.open { transform: none; }
.sx-fhead { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.sx-fhead h3 { margin: 0; font: 400 24px var(--font-heading); letter-spacing: .01em; }
.sx-fclose { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 6px; }
.sx-fbody { flex: 1; overflow-y: auto; padding: 8px 26px 20px; }
.sx-fgroup { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sx-fgroup h4 { margin: 0 0 12px; font: 500 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #6d6d6d; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chip { padding: 9px 16px; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff; font: 400 12px var(--font-body); color: var(--ink); cursor: pointer; }
.sx-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sx-ffoot { display: flex; gap: 10px; padding: 16px 26px 22px; border-top: 1px solid var(--line); }
.sx-fclear, .sx-fapply { flex: 1; height: 46px; border-radius: 999px; font: 500 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.sx-fclear { background: #fff; border: 1px solid #cfcfcf; color: var(--ink); }
.sx-fapply { background: var(--ink); border: 1px solid var(--ink); color: #fff; }

/* tablets */
@media (max-width: 1100px) {
  .sx-row-track { grid-template-columns: repeat(4, 1fr); }
  .sx-row-track .product-card:nth-child(n+5) { display: none; }
  .sx-grid { grid-template-columns: repeat(3, 1fr); }
}
/* phones */
@media (max-width: 700px) {
  .sx-top { height: 62px; }
  .sx-sticky { padding-left: 14px; padding-right: 14px; }
  .sx-tabs { margin: 0 -14px; padding: 0 14px; justify-content: flex-start; }
  .sx-trending { padding: 14px 14px 22px; flex-direction: column; align-items: center; gap: 8px; }
  .sx-row-track { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .sx-row-track::-webkit-scrollbar { display: none; }
  .sx-row-track .product-card { flex: 0 0 42%; scroll-snap-align: start; }
  .sx-row-track .product-card:nth-child(n+5) { display: block; }
  .sx-grid { grid-template-columns: repeat(2, 1fr); }
  .sx .sx-info { padding: 10px 10px 18px; }
  .sx-resbar { padding: 16px 0 12px; }
  .sx-input { font-size: 16px; } /* stops iOS zoom-on-focus */
}
@media (prefers-reduced-motion: reduce) {
  .search-overlay.sx, .sx-fpanel { transition: none; }
}
