/* =========================================================
   Search Marketplace v8 — dashboard redesign
   Matches modern green hero + clean filter/results layout
   ========================================================= */

.tf-search-v8{--sr-green:#0d4f3c;--sr-green-2:#146b52;--sr-orange:#f07a1a;--sr-orange-2:#ff8a2b;--sr-ink:#0f1f2e;--sr-muted:#5b6b7c;--sr-line:#e6edf3;--sr-card:#fff;--sr-bg:#f4f7fa}

/* Hide legacy navy hero when v8 is active */
.tf-search-v8 .tf-search-hero,
.tf-search-v8 .page-hero.compact.tf-search-hero{display:none!important}
.tf-search-v8 .tf-search-results-head,
.tf-search-v8 .tf-search-trending-inline{display:none!important}

/* ---- Hero ---- */
.tf-sr-hero{
  position:relative;overflow:hidden;
  background:
    radial-gradient(ellipse 60% 80% at 85% 40%,rgba(255,200,80,.18),transparent 55%),
    radial-gradient(ellipse 40% 60% at 70% 20%,rgba(255,255,255,.08),transparent 50%),
    linear-gradient(115deg,#0a3d2e 0%,#0d4f3c 40%,#125a45 70%,#0b3a2c 100%);
  color:#fff;padding:22px 0 28px;
}
.tf-sr-hero-shell{
  display:grid;grid-template-columns:minmax(0,1.25fr) minmax(220px,.75fr);
  align-items:center;gap:24px;
}
.tf-sr-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 12px;font-size:12px;color:rgba(255,255,255,.72)}
.tf-sr-breadcrumb a{color:rgba(255,255,255,.85);text-decoration:none}
.tf-sr-breadcrumb a:hover{color:#fff;text-decoration:underline}
.tf-sr-hero h1{
  margin:0 0 8px;font-size:clamp(24px,3vw,34px);line-height:1.18;font-weight:850;letter-spacing:-.02em;color:#fff;
}
.tf-sr-hero h1 em{font-style:normal;color:#ffc857}
.tf-sr-hero-sub{margin:0 0 16px;max-width:520px;font-size:14px;line-height:1.5;color:rgba(255,255,255,.78)}

.tf-sr-searchbar{
  display:flex;align-items:center;gap:0;max-width:560px;
  background:#fff;border-radius:999px;padding:5px 5px 5px 14px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}
.tf-sr-search-ico{color:#8a9aab;display:grid;place-items:center;flex:0 0 auto}
.tf-sr-searchbar input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  height:42px;padding:0 10px;font-size:14px;color:var(--sr-ink);
}
.tf-sr-clear{
  width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  color:#7a8a9a;text-decoration:none;font-size:18px;line-height:1;
}
.tf-sr-searchbar button{
  border:0;cursor:pointer;height:42px;padding:0 20px;border-radius:999px;
  background:linear-gradient(135deg,var(--sr-orange),var(--sr-orange-2));
  color:#fff;font-weight:800;font-size:13px;white-space:nowrap;
  box-shadow:0 6px 16px rgba(240,122,26,.35);
}
.tf-sr-searchbar button:hover{filter:brightness(1.05)}

.tf-sr-popular{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px;font-size:12px;color:rgba(255,255,255,.7)}
.tf-sr-popular>span{font-weight:700}
.tf-sr-popular a{
  display:inline-flex;align-items:center;min-height:28px;padding:0 12px;border-radius:999px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);
  color:#fff;text-decoration:none;font-weight:650;font-size:12px;
}
.tf-sr-popular a:hover{background:rgba(255,255,255,.22)}
.tf-sr-expansion{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:12px;color:rgba(255,255,255,.65)}
.tf-sr-expansion a{color:#ffd98a;text-decoration:none}
.tf-sr-expansion a:hover{text-decoration:underline}

/* Decorative visual stack (no external images required) */
.tf-sr-hero-visual{position:relative;min-height:160px;display:grid;place-items:center}
.tf-sr-visual-glow{
  position:absolute;inset:10% 5%;border-radius:50%;
  background:radial-gradient(circle,rgba(255,200,80,.25),transparent 65%);
  filter:blur(8px);
}
.tf-sr-visual-stack{position:relative;width:100%;max-width:320px;height:170px}
.tf-sr-vcard{
  position:absolute;border-radius:16px;border:1px solid rgba(255,255,255,.2);
  background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.05));
  backdrop-filter:blur(6px);box-shadow:0 12px 28px rgba(0,0,0,.2);
}
.tf-sr-vcard--a{width:46%;height:72%;left:4%;top:14%;transform:rotate(-8deg)}
.tf-sr-vcard--b{width:42%;height:68%;left:30%;top:8%;transform:rotate(4deg);z-index:2}
.tf-sr-vcard--c{width:44%;height:70%;right:2%;top:18%;transform:rotate(10deg);z-index:1}

/* ---- Body ---- */
.tf-search-v8 .tf-search-body{padding-top:18px;padding-bottom:40px;background:var(--sr-bg)}
.tf-search-entity-strip{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 14px}
.tf-sr-entity{background:#fff;border:1px solid var(--sr-line);border-radius:14px;padding:12px 14px;flex:1 1 240px}
.tf-sr-entity strong{display:block;margin:0 0 8px;font-size:12px;color:var(--sr-muted);text-transform:uppercase;letter-spacing:.06em}
.tf-sr-entity div{display:flex;flex-wrap:wrap;gap:8px}
.tf-sr-entity a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:10px;background:#f3f7fb;color:var(--sr-ink);text-decoration:none;font-size:13px}
.tf-sr-entity a:hover{background:#e8f1fa}
.tf-sr-entity small{color:#1a9a5c;font-weight:700;font-size:11px}

/* Category rail */
.tf-sr-cat-rail{
  display:flex;gap:10px;overflow-x:auto;padding:2px 2px 14px;margin:0 0 6px;
  scrollbar-width:thin;
}
.tf-sr-cat-pill{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;
  min-height:52px;padding:0 16px;border-radius:14px;
  background:#fff;border:1px solid var(--sr-line);color:var(--sr-ink);
  text-decoration:none;font-size:13px;font-weight:700;
  box-shadow:0 2px 8px rgba(15,40,70,.04);
}
.tf-sr-cat-pill b{margin-left:4px;color:var(--sr-orange);font-size:12px}
.tf-sr-cat-pill.active,
.tf-sr-cat-pill:hover{
  background:linear-gradient(135deg,var(--sr-orange),var(--sr-orange-2));
  border-color:transparent;color:#fff;box-shadow:0 8px 18px rgba(240,122,26,.25);
}
.tf-sr-cat-pill.active b,.tf-sr-cat-pill:hover b{color:#fff}
.tf-sr-cat-ico{opacity:.7;font-size:14px}

/* Filters panel polish */
.tf-search-v8 .tf-sr-filters,
.tf-search-v8 .filter-sidebar{
  background:#fff;border:1px solid var(--sr-line);border-radius:18px;
  padding:16px 14px;box-shadow:0 6px 20px rgba(15,40,70,.05);
}
.tf-search-v8 .filter-sidebar .filter-head,
.tf-search-v8 .filter-sidebar h3,
.tf-search-v8 .filter-sidebar .sidebar-title{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:16px;font-weight:850;color:var(--sr-ink);margin:0 0 12px;
}
.tf-search-v8 .filter-sidebar legend,
.tf-search-v8 .filter-sidebar .tf-facet-group legend{
  font-size:13px;font-weight:800;color:var(--sr-ink);padding:0;margin-bottom:8px;
}
.tf-search-v8 .tf-facet-group{border:0;margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #eef2f6}
.tf-search-v8 .filter-sidebar input[type=text],
.tf-search-v8 .filter-sidebar input[type=number],
.tf-search-v8 .filter-sidebar input[type=search],
.tf-search-v8 .filter-sidebar select{
  width:100%;min-height:40px;border:1px solid #d9e3ec;border-radius:10px;
  padding:0 12px;background:#fafcfe;font-size:13px;color:var(--sr-ink);
}
.tf-search-v8 .filter-sidebar .check-row,
.tf-search-v8 .filter-sidebar .tf-country-row{
  display:flex;align-items:center;gap:8px;padding:6px 0;font-size:13px;color:#334;
}
.tf-search-v8 .filter-sidebar button[type=submit],
.tf-search-v8 .filter-sidebar .btn-apply{
  width:100%;min-height:42px;border:0;border-radius:12px;cursor:pointer;
  background:linear-gradient(135deg,var(--sr-orange),var(--sr-orange-2));
  color:#fff;font-weight:800;font-size:13px;margin-top:8px;
}

/* Results toolbar + grid */
.tf-search-v8 .tf-search-page{min-width:0}
.tf-search-v8 .catalog-toolbar,
.tf-search-v8 .tf-catalog-toolbar,
.tf-search-v8 .results-toolbar{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
  margin:0 0 14px;padding:4px 0;
}
.tf-search-v8 .product-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;
}
.tf-search-v8 .product-card,
.tf-search-v8 .tf-product-card,
.tf-search-v8 .product-grid>article,
.tf-search-v8 .product-grid>a.product-card{
  background:#fff;border:1px solid var(--sr-line);border-radius:16px;
  overflow:hidden;box-shadow:0 6px 18px rgba(15,40,70,.05);
  transition:transform .15s ease,box-shadow .15s ease;
}
.tf-search-v8 .product-card:hover,
.tf-search-v8 .tf-product-card:hover{
  transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,40,70,.1);
}

/* Card CTA row emphasis when present */
.tf-search-v8 .product-card .btn,
.tf-search-v8 .product-card .tf-btn-contact,
.tf-search-v8 .product-card a.contact,
.tf-search-v8 .product-card .ask-price{
  border-radius:10px!important;
}
.tf-search-v8 .search-facet-box{
  margin-top:12px;padding-top:12px;border-top:1px solid #eef2f6;
  display:grid;gap:6px;font-size:12px;color:var(--sr-muted);
}
.tf-search-v8 .search-facet-box strong{color:var(--sr-ink);font-size:13px}
.tf-search-v8 .search-facet-box span{display:flex;justify-content:space-between;gap:8px}
.tf-search-v8 .search-facet-box b{color:var(--sr-ink)}

.tf-sr-fallback{margin-top:28px}
.tf-sr-fallback h3{margin:0 0 12px;font-size:18px;color:var(--sr-ink)}

/* Responsive */
@media(max-width:1200px){
  .tf-search-v8 .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  .tf-sr-hero-shell{grid-template-columns:1fr}
  .tf-sr-hero-visual{display:none}
  .tf-search-v8 .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tf-search-v8 .catalog-layout,
  .tf-search-v8 .tf-search-catalog{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:640px){
  .tf-sr-hero{padding:16px 0 20px}
  .tf-sr-searchbar{max-width:none}
  .tf-sr-searchbar button{padding:0 14px}
  .tf-search-v8 .product-grid{grid-template-columns:1fr 1fr;gap:10px}
  .tf-sr-cat-pill{min-height:44px;padding:0 12px;font-size:12px}
}
@media(max-width:420px){
  .tf-search-v8 .product-grid{grid-template-columns:1fr}
}
