
/* =========================
   WINDBAZAAR SEARCH PAGE
========================= */

.search-header {
  padding: 28px 5% 18px;
  background: linear-gradient(135deg, #17102f, #0b0b18 75%);
  border-bottom: 1px solid rgba(150, 100, 255, 0.15);
}

.search-header .back-link {
  display: inline-block;
  color: #b9a0ff;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.search-header h1 {
  color: #fff;
  font-size: clamp(25px, 5vw, 34px);
  margin: 0 0 8px;
}

.search-header p {
  color: #aaa4bd;
  font-size: 14px;
  margin: 0;
}

.search-container {
  width: 90%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 25px 0 110px;
}

/* SEARCH INPUT */

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  min-height: 55px;
  background: #151422;
  border: 1px solid #302844;
  border-radius: 14px;
  margin-bottom: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: #9560ff;
  box-shadow: 0 0 18px rgba(149, 96, 255, 0.12);
}

.search-box > span {
  color: #a77aff;
  font-size: 25px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
}

.search-box input::placeholder {
  color: #777286;
}

#clearSearch {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  display: none;
}

/* SECTION HEADINGS */

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}

.section-heading h2 {
  color: #fff;
  font-size: 20px;
  margin: 0;
}

.section-heading p {
  color: #918ba3;
  font-size: 12px;
  margin: 6px 0 0;
}

#showAllCategories {
  background: transparent;
  border: none;
  color: #ad85ff;
  cursor: pointer;
  font-size: 13px;
}

/* CATEGORY FILTERS */

.filter-section {
  margin-bottom: 35px;
}

.category-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 1px 12px;
  scrollbar-width: thin;
  scrollbar-color: #554078 transparent;
}

.category-filters::-webkit-scrollbar {
  height: 4px;
}

.category-filters::-webkit-scrollbar-thumb {
  background: #554078;
  border-radius: 10px;
}

.category-chip {
  flex: 0 0 auto;
  padding: 10px 17px;
  color: #c4bfd2;
  background: #171625;
  border: 1px solid #302b40;
  border-radius: 30px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}

.category-chip:hover,
.category-chip.active {
  color: #fff;
  background: linear-gradient(135deg, #7438dc, #4930a8);
  border-color: #9664ff;
}

/* SORT */

#sortProducts {
  max-width: 175px;
  padding: 10px 12px;
  background: #171625;
  color: #ddd6ed;
  border: 1px solid #393149;
  border-radius: 9px;
  outline: none;
  font-size: 12px;
}

/* PRODUCT GRID */

.search-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.search-products-grid .product-card {
  min-width: 0;
  overflow: hidden;
}

.loading-text {
  color: #aaa2b9;
  font-size: 13px;
  padding: 12px 0;
}

.no-products {
  text-align: center;
  padding: 55px 15px;
  background: #151422;
  border: 1px solid #302844;
  border-radius: 16px;
  margin-top: 15px;
}

.no-products[hidden] {
  display: none !important;
}

.empty-icon {
  color: #a77aff;
  font-size: 48px;
  margin-bottom: 10px;
}

.no-products h3 {
  color: #fff;
  margin: 0 0 8px;
}

.no-products p {
  color: #9992a9;
  font-size: 13px;
}

#resetFilters {
  margin-top: 12px;
  padding: 11px 20px;
  border: none;
  border-radius: 9px;
  color: #fff;
  background: #713bd0;
  cursor: pointer;
}

/* BOTTOM NAV */

.bottom-nav {
  position: fixed;
  z-index: 100;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 5px calc(10px + env(safe-area-inset-bottom));
  background: rgba(13, 12, 25, 0.96);
  border-top: 1px solid #302844;
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #898398;
  text-decoration: none;
  min-width: 55px;
}

.bottom-nav a span {
  font-size: 22px;
}

.bottom-nav a small {
  font-size: 11px;
}

.bottom-nav a.active {
  color: #b48aff;
}

/* TABLET */

@media (min-width: 650px) {
  .search-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* DESKTOP */

@media (min-width: 950px) {
  .search-header {
    padding-left: max(5%, calc((100% - 1250px) / 2));
  }

  .search-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }

  .bottom-nav {
    display: none;
  }

  .search-container {
    padding-bottom: 60px;
  }
}

@media (max-width: 380px) {
  .search-products-grid {
    gap: 10px;
  }

  #sortProducts {
    max-width: 140px;
    font-size: 11px;
  }
}
/* SEARCH PRODUCT IMAGE + FEATURED BADGE FIX
   Keep the image full-width; position the badge as an overlay
   so it does not take space beside or shrink the image.
*/

.search-products-grid .product-image {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  background: #151422;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-products-grid .product-image img {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.search-products-grid .product-image .featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-block;
  flex: none;
  width: auto;
  margin: 0;
}

.search-products-grid .product-placeholder {
  font-size: 40px;
}

.brand-with-slot{display:inline-flex;align-items:center;gap:9px;text-decoration:none;min-width:0}.brand-logo-slot{width:34px;height:34px;object-fit:contain;flex:0 0 34px}.brand-wordmark{white-space:nowrap;color:inherit}.brand-wordmark span{color:var(--blue,#00d9ff)}

.search-header{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.search-header .brand{margin-right:auto;font-weight:bold;color:inherit;text-decoration:none}
.brand .brand-wordmark{color:inherit}.brand .brand-wordmark span{color:#a66aff}
.product-delivery-type{font-size:11px;color:#a78bfa;margin-top:4px}
