:root {
  --wyo-accent:#0e7896;
  --wyo-border:#e6e7eb;
  --wyo-text:#0f172a;
  --wyo-muted:#64748b;
  --wyo-hover:#f8fafc;
  --wyo-shadow:0 18px 40px rgba(0,0,0,.12);
  --wyo-bg:#fff;
}

/* -------------------------------------------
   Main floating search box
--------------------------------------------*/
#wk_wyo_box.wk-wyo-box {
  position:absolute;
  background:var(--wyo-bg);
  border:1px solid var(--wyo-border);
  border-radius:4px;
  box-shadow:var(--wyo-shadow);
  overflow:hidden;
  z-index:10000;
  margin-top:4px;
  transform:translateY(6px) scale(.98);
  transform-origin:top center;
  transition:opacity .16s ease, transform .16s ease;
  display:none;
}

/* Little arrow pointer */
#wk_wyo_box.wk-wyo-box::before {
  content:"";
  position:absolute;
  top:-8px;
  left: var(--anchor-x, 50%);
  transform: translateX(-50%);
  width:0; height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-bottom:8px solid var(--wyo-bg);
  filter: drop-shadow(0 -1px 0 var(--wyo-border));
}

/* -------------------------------------------
   Grid layout (categories + products)
--------------------------------------------*/
#wk_wyo_box .wyo-grid {
  display:grid;
  grid-template-columns: 38% 62%;
  grid-template-rows: 1fr auto;
  height: min(70vh, 560px);
  background:#fff;
  overflow:hidden;
}

/* Column containers */
#wk_wyo_box .wyo-col {
  grid-row:1 / 2;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

/* Scrollable list container */
#wk_wyo_box .wyo-col .wyo-list {
  flex:1 1 0;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  margin:0;
  padding:0;
  list-style:none;
}

/* Products column border */
#wk_wyo_box .wyo-prod {
  border-left:1px solid var(--wyo-border);
}

/* -------------------------------------------
   Sticky headers
--------------------------------------------*/
#wk_wyo_box .wyo-header {
  position:sticky;
  top:0;
  z-index:3;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  background:var(--wyo-accent);
  color:#fff;
  font-weight:700;
  border-bottom:1px solid rgba(0,0,0,.06);
}

/* Count bubble */
#wk_wyo_box .wyo-count {
  min-width:24px;
  height:24px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  font-size:12px;
  line-height:1;
  font-weight:600;
}

/* -------------------------------------------
   Category items (unused but harmless)
--------------------------------------------*/
#wk_wyo_box .wyo-item {
  border-top:1px solid var(--wyo-border);
  padding:0;
}

#wk_wyo_box .wyo-cat .wyo-link {
  display:block;
  padding:12px 16px;
  color:var(--wyo-text);
  text-decoration:none;
  line-height:1.4;
}

#wk_wyo_box .wyo-cat .wyo-link:hover {
  background:var(--wyo-hover);
}

/* -------------------------------------------
   Product grid
--------------------------------------------*/
#wk_wyo_box .wyo-prod .wyo-prod-list {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
}

/* Column separator for every second item */
#wk_wyo_box .wyo-prod .wyo-item:nth-child(even) {
  border-left:1px solid var(--wyo-border);
}

/* Product row */
#wk_wyo_box .wyo-link.prod {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  text-decoration:none;
  color:var(--wyo-text);
}

#wk_wyo_box .wyo-link.prod:hover {
  background:var(--wyo-hover);
}

/* Thumbnail styling */
#wk_wyo_box .wyo-thumb {
  width:56px;
  height:80px;
  flex:0 0 56px;
  object-fit:cover;
  border-radius:10px;
  background:#f5f6f8;
  border:1px solid var(--wyo-border);
}

/* Title / meta / price text */
#wk_wyo_box .wyo-title-strong {
  font-size:14px;
  line-height:1.35;
}

#wk_wyo_box .wyo-meta {
  font-size:12px;
  color:var(--wyo-muted);
  margin-top:2px;
}

#wk_wyo_box .wyo-price {
  font-weight:700;
  color:var(--wyo-accent);
  margin-top:4px;
}

/* -------------------------------------------
   Bottom "See all results" section
--------------------------------------------*/
#wk_wyo_box .wyo-see {
  grid-column:1 / -1;
  grid-row:2 / 3;
  border-top:1px solid var(--wyo-border);
  text-align:right;
  padding:8px 16px;
}

#wk_wyo_box .wyo-see a {
  color:var(--wyo-accent);
  font-weight:600;
  text-decoration:none;
  display:inline-block;
  padding:8px 16px;
}

/* highlight <mark> */
#wk_wyo_box mark {
  background:none;
  color:var(--wyo-text);
  font-weight:800;
}

/* -------------------------------------------
   One-column mode (because native search has no categories)
--------------------------------------------*/
#wk_wyo_box .wyo-grid.wyo-one-col {
  grid-template-columns:1fr;
}

#wk_wyo_box .wyo-grid.wyo-one-col .wyo-cat {
  display:none;
}

#wk_wyo_box .wyo-grid.wyo-one-col .wyo-prod .wyo-prod-list {
  grid-template-columns:1fr 1fr;
}

/* -------------------------------------------
   Overlay
--------------------------------------------*/
#wyo-overlay {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  z-index:9998;
  display:none;
  opacity:0;
  transition:opacity .2s ease;
}

#wyo-overlay.active {
  display:block;
  opacity:1;
}

/* -------------------------------------------
   RTL support (optional)
--------------------------------------------*/
html[dir="rtl"] #wk_wyo_box .wyo-link.prod {
  flex-direction: row-reverse;
}

html[dir="rtl"] #wk_wyo_box .wyo-see {
  text-align:left;
}
