:root{
  --bt-primary:#5A5FAB;
  --bt-primary-2:#494EA3;
  --bt-dark:#54595F;
  --bt-white:#ffffff;
}

.bst-wrap{ margin:0; }

/* --- search trigger + inline panel (FIXED) --- */

/* Make the filter the positioning context for the overlay */
.bst-wrap .bst-filter{
  position: sticky;
  top: 80px;
  z-index: 30;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  padding:10px 14px;
  margin:6px 0 18px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

/* IMPORTANT: do NOT position this, so the absolute child uses .bst-filter */
.bst-wrap .bst-search{
  position: static;     /* was: relative */
  display:inline-flex;
  align-items:center;
  margin-right:6px;
}

.bst-wrap .bst-search-btn{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--bt-primary);
  padding:8px;
  border-radius:12px;
  cursor:pointer;
  transition:background .18s, transform .15s;
}
.bst-wrap .bst-search-btn:hover{
  background:white;
  color:var(--bt-primary);
}
.bst-wrap .bst-search-btn svg{
  width:18px;
  height:18px;
  display:block;
}

/* Overlay the WHOLE filter container (exact fit) */
.bst-wrap .bst-search-inline{
  position:absolute;      /* positioned against .bst-filter */
  inset:0;                /* left:0; right:0; top:0; bottom:0 */
  background:#fff;
  border-radius:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.14);
  padding:0;
  display:none;
  z-index:5;              /* above chips */
}

.bst-wrap .bst-search.is-open .bst-search-inline{ display:block; }

.bst-wrap .bst-search-input{
  width:100%;
  border:0;
  outline:0;
  background:#f6f7fb;
  border-radius:12px;
  height:56px;            /* consistent height */
  padding:0 48px 0 16px;  /* space for clear button (overridden below for icon) */
  font-size:16px;
  line-height:44px;
}

.bst-wrap .bst-search-clear{
  position:absolute;
  right:18px;
  top:50%;
  transform: translateY(-50%);
  appearance:none;
  border:0;
  background:transparent;
  color:#999;
  cursor:pointer;
  padding:4px;
  line-height:1;
  font-size:20px;
}
.bst-wrap .bst-search-clear:hover{ color:#555; }

/* ===== Filter “text button” style ===== */
.bst-wrap .bst-chip{
  position:relative;
  background:transparent;
  border:0;
  outline:0;
  padding:.55rem .9rem;
  color:var(--bt-primary);
  font-family:"Michroma", Sans-serif;
  font-size:12px;
  font-weight:100;
  letter-spacing:2.5px;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  transition: color .18s ease, transform .15s ease, background .18s ease;
  border-radius:9999px;
}
.bst-wrap .bst-chip .bst-chip-count{
  opacity:.8;
  font-weight:700;
  font-size:11px;
}
.bst-wrap .bst-chip::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:-0.2em;
  height:2px;
  background:var(--bt-primary);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform 220ms ease;
}
.bst-wrap .bst-chip:hover::after,
.bst-wrap .bst-chip:focus-visible::after{
  transform:scaleX(1);
}
.bst-wrap .bst-chip:focus-visible{
  outline:2px solid var(--bt-primary);
  outline-offset:3px;
  border-radius:12px;
}
.bst-wrap .bst-chip.active{
  font-weight:900;
  color:var(--bt-primary);
}
.bst-wrap .bst-chip.active::after{
  transform:scaleX(1);
}

/* Top row: search + filter burger */
.bst-wrap .bst-filter-top{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Chips wrapper (desktop default) */
.bst-wrap .bst-filter-chips{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

/* Burger button (hidden on desktop, shown on mobile later) */
.bst-wrap .bst-filter-toggle{
  display:none; /* mobile only; see media query */
  margin-left:auto;
  appearance:none;
  border:0;
  background:transparent;
  padding:8px;
  border-radius:12px;
  cursor:pointer;
  color:var(--bt-primary);
  transition:background .18s, transform .15s;
}
.bst-wrap .bst-filter-toggle:hover{
  background:transparent;
  color: #5A5FAB;
  transform:translateY(-1px);
}
.bst-wrap .bst-filter-toggle svg{
  width:18px;
  height:18px;
  display:block;
}

/* ===== Compact mobile filter bar (search + burger, collapsible chips) ===== */
@media (max-width:640px){
  .bst-wrap .bst-filter{
    flex-direction:column;
    align-items:stretch;
    gap:0;             /* no empty space under bar when chips are closed */
    margin-top:0;      /* so Elementor top:0 really sits at the top */
  }

  .bst-wrap .bst-filter-top{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between; /* search left, burger right */
  }

  /* show burger on mobile */
  .bst-wrap .bst-filter-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  /* search stays compact on the left */
  .bst-wrap .bst-search{
    flex:0 0 auto;
    margin-right:0;
  }

  /* chips become collapsible panel */
  .bst-wrap .bst-filter-chips{
    justify-content:center;
    gap:10px;
    overflow:hidden;
    max-height:0;
    opacity:0;
    transform:translateY(-4px);
    margin-top:0;
    transition:
      max-height .25s ease,
      opacity .2s ease,
      transform .2s ease,
      margin-top .2s ease;
  }

  .bst-wrap .bst-filter.filters-open .bst-filter-chips{
    max-height:220px; /* adjust if you have many categories */
    opacity:1;
    transform:translateY(0);
    margin-top:10px;  /* spacing only when open */
  }

  .bst-wrap .bst-chip{
    justify-content:center;
    text-align:center;
  }
}

/* ===== Card buttons ===== */
.bst-wrap .bst-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.bst-wrap .bst-actions .bst-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
/* Peržiūrėti */
.bst-wrap .bst-actions .bst-btn.ghost{
  background:#fff;
  color:var(--bt-primary);
  border:2px solid #ffffff;
  border-radius:12px;
}
.bst-wrap .bst-actions .bst-btn.ghost:hover,
.bst-wrap .bst-actions .bst-btn.ghost:focus{
  background:#5A5FAB;
  color:#fff;
  border-color:#5A5FAB;
  transform:translateY(-1px);
  outline:0;
}
/* Užsakyti */
.bst-wrap .bst-actions .bst-btn.solid{
  background:var(--bt-primary);
  color:#fff;
  border:2px solid var(--bt-primary);
}
.bst-wrap .bst-actions .bst-btn.solid:hover,
.bst-wrap .bst-actions .bst-btn.solid:focus{
  background:var(--bt-primary-2);
  border-color:var(--bt-primary-2);
  color:#fff;
  transform:translateY(-1px);
  outline:0;
}

/* ===== Load more ===== */
.bst-wrap .bst-pager{
  display:flex;
  justify-content:center;
  margin-top:18px;
}
.bst-wrap .bst-load-more{
  appearance:none;
  cursor:pointer;
  background:var(--bt-primary);
  color:#fff;
  border:2px solid var(--bt-primary);
  border-radius:16px;
  padding:.6rem 1rem;
  font-weight:700;
  transition:background .2s, border-color .2s, transform .15s;
}
.bst-wrap .bst-load-more:hover,
.bst-wrap .bst-load-more:focus{
  background:var(--bt-primary-2);
  border-color:var(--bt-primary-2);
  transform:translateY(-1px);
  outline:0;
}
.bst-wrap .bst-load-more.is-disabled{ display:none; }

/* ===== Titles ===== */
.bst-wrap .bst-title{
  text-shadow:0 2px 12px rgba(0,0,0,.25);
}

/* ===== Grid / layout (inline vars) ===== */
/* Base grid */
.bst-grid{ display:grid; gap:var(--bst-gap); }
.bst-grid.cols-2{ grid-template-columns: repeat(2,minmax(0,1fr)); }
.bst-grid.cols-3{ grid-template-columns: repeat(3,minmax(0,1fr)); }
.bst-grid.cols-4{ grid-template-columns: repeat(4,minmax(0,1fr)); }
.bst-grid.cols-5{ grid-template-columns: repeat(5,minmax(0,1fr)); }
.bst-grid.cols-6{ grid-template-columns: repeat(6,minmax(0,1fr)); }

/* Tablet: 2–3 columns depending on original */
@media (max-width:1024px){
  .bst-grid.cols-4,
  .bst-grid.cols-5,
  .bst-grid.cols-6{
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
@media (max-width:768px){
  .bst-grid,
  .bst-grid.cols-2,
  .bst-grid.cols-3,
  .bst-grid.cols-4,
  .bst-grid.cols-5,
  .bst-grid.cols-6{
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* Phone: always 1 column */
@media (max-width:520px){
  .bst-grid,
  .bst-grid.cols-2,
  .bst-grid.cols-3,
  .bst-grid.cols-4,
  .bst-grid.cols-5,
  .bst-grid.cols-6{
    grid-template-columns: 1fr;
  }
}

/* ===== Card & pan effect ===== */
.bst-card{
  position:relative;
  overflow:hidden;
  border-radius:var(--bst-radius);
  background:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
  transition: box-shadow .25s ease, transform .25s ease;
}
.bst-card:hover{
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}
.bst-thumb{
  padding-top:var(--bst-aspect);
  background-size:cover;
  background-position:top center;
  transition: background-position 10s ease-out, transform .35s ease;
  will-change: background-position;
}
.bst-card:hover .bst-thumb{
  background-position:bottom center;
  transform: scale(1.02);
}

.bst-meta{
  position:absolute;
  inset:auto 0 0 0;
  background: linear-gradient(to top, var(--bst-overlay-from), var(--bst-overlay-to));
  color:#fff;
  padding:30px;
  transform: translateY(60%);
  transition: transform .35s ease;
}
.bst-card:hover .bst-meta{
  transform: translateY(0);
}
.bst-title{
  margin:0 0 20px 0;
  font-size:18px;
  line-height:1.2;
  font-weight:600;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  .bst-wrap .bst-chip::after,
  .bst-wrap .bst-search-btn{
    transition: none;
  }
}

/* Icon inside the inline search field */
.bst-wrap .bst-search-icon{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  color:var(--bt-primary);
  opacity:.9;
  pointer-events:none; /* clicks go to the input */
}
.bst-wrap .bst-search-icon svg{
  width:100%;
  height:100%;
  display:block;
}

/* increase left padding to make room for the icon */
.bst-wrap .bst-search-input{
  padding:0 48px 0 44px; /* was 16px on the left */
}

/* Empty-state should take the full grid width */
.bst-grid .bst-empty{ grid-column:1 / -1; }

/* 4-up desktop, 2x2 tablet, 1 column mobile */
.bst-suggest-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:var(--bst-gap);
}
@media (max-width:1024px){
  /* tablet: 2 x 2 */
  .bst-suggest-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}
@media (max-width:640px){
  /* mobile: 1 per row */
  .bst-suggest-grid{
    grid-template-columns:1fr;
  }
}

/* Make the empty-state CTA look like the load-more button */
.bst-empty .bst-load-more{
  margin:10px 0 18px;
}

/* Entrance fade-up */
@keyframes bstFadeUp{
  from{ opacity:0; transform: translateY(12px); }
  to{   opacity:1; transform: translateY(0); }
}

/* When grid has .animate-in, newly inserted cards fade up */
.bst-grid.animate-in .bst-card{
  opacity:0;
  transform: translateY(12px);
  animation: bstFadeUp .38s ease both;
  animation-delay: calc(var(--stagger, 0) * 60ms); /* stagger */
}
@media (prefers-reduced-motion: reduce){
  .bst-grid.animate-in .bst-card{
    animation:none;
    opacity:1;
    transform:none;
  }
}
