/* =========================================================
   MAX BUBBLE STICK
   PRODUCT SEARCH + CATEGORY FILTER
========================================================= */


/* =========================================================
   MAIN CONTROL AREA
========================================================= */

.product-controls {
  width: 100%;
  margin: 35px auto 42px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}


/* =========================================================
   SEARCH BOX
========================================================= */

.product-search {
  position: relative;

  width: min(680px, 100%);

  display: flex;
  align-items: center;

  background: #ffffff;

  border: 2px solid transparent;
  border-radius: 999px;

  box-shadow:
    0 8px 25px rgba(150, 67, 103, 0.10);

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.product-search:focus-within {
  border-color: var(--pink);

  box-shadow:
    0 10px 30px rgba(241, 96, 153, 0.18);

  transform: translateY(-1px);
}


/* Search icon */

.product-search-icon {
  width: 50px;

  display: grid;
  place-items: center;

  font-size: 19px;

  pointer-events: none;
}


/* Search input */

.product-search input {
  width: 100%;
  height: 54px;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--deep);

  font-family:
    "Nunito Sans",
    sans-serif;

  font-size: 14px;
  font-weight: 700;
}

.product-search input::placeholder {
  color: #aa8999;
  font-weight: 600;
}


/* Remove browser search X */

.product-search input::-webkit-search-cancel-button {
  display: none;
}


/* Clear button */

.clear-product-search {
  width: 34px;
  height: 34px;

  margin-right: 10px;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 50%;

  background: #ffe5ef;
  color: var(--deep);

  cursor: pointer;

  font-size: 21px;
  line-height: 1;

  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.clear-product-search:hover {
  background: var(--pink);
  color: #fff;

  transform: rotate(90deg);
}


/* =========================================================
   CATEGORY FILTERS
========================================================= */

.category-filters {
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 9px;

  flex-wrap: wrap;
}


/* Filter button */

.category-filter {
  padding: 10px 17px;

  border: 1px solid #efc4d7;
  border-radius: 999px;

  background: rgba(255,255,255,.82);
  color: var(--deep);

  cursor: pointer;

  font-family:
    "Nunito Sans",
    sans-serif;

  font-size: 11px;
  font-weight: 900;

  white-space: nowrap;

  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}


/* Hover */

.category-filter:hover {
  border-color: var(--pink);
  color: var(--pink);

  transform: translateY(-2px);
}


/* Active */

.category-filter.active {
  border-color: var(--pink);

  background: var(--pink);
  color: #fff;

  box-shadow:
    0 7px 17px rgba(241, 96, 153, .22);
}

.category-filter.active:hover {
  color: #fff;

  transform: translateY(-2px);
}


/* =========================================================
   NO SEARCH RESULTS
========================================================= */

.no-search-results {
  max-width: 520px;

  margin: 10px auto 0;
  padding: 42px 25px;

  border: 1px dashed #ef9fbd;
  border-radius: 22px;

  background: #fff7fa;

  text-align: center;

  color: var(--muted);
}

.no-search-results[hidden] {
  display: none;
}


.no-search-icon {
  width: 58px;
  height: 58px;

  margin: 0 auto 13px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #ffe5ef;

  font-size: 24px;
}


.no-search-results h3 {
  margin: 0 0 5px;

  color: var(--deep);

  font:
    800 25px / 1.1
    "Baloo 2",
    sans-serif;
}


.no-search-results p {
  margin: 0 0 20px;

  font-size: 12px;
}


/* Reset button */

.reset-product-search {
  padding: 10px 18px;

  border: 0;
  border-radius: 999px;

  background: var(--deep);
  color: #fff;

  cursor: pointer;

  font-family:
    "Nunito Sans",
    sans-serif;

  font-size: 11px;
  font-weight: 900;

  transition:
    background .2s ease,
    transform .2s ease;
}

.reset-product-search:hover {
  background: var(--pink);

  transform: translateY(-2px);
}


/* =========================================================
   PRODUCT STATUS
========================================================= */

.product-status {
  min-height: 18px;

  margin-top: 25px;

  text-align: center;

  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 750px) {

  .product-controls {
    margin-top: 28px;
    margin-bottom: 32px;
  }

  .product-search {
    width: 100%;
  }

  .product-search input {
    height: 51px;
    font-size: 13px;
  }

  .category-filters {
    justify-content: flex-start;

    overflow-x: auto;
    flex-wrap: nowrap;

    width: 100%;

    padding: 4px 2px 9px;

    scrollbar-width: none;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-filter {
    flex: 0 0 auto;
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 500px) {

  .product-controls {
    gap: 14px;

    margin-top: 24px;
    margin-bottom: 28px;
  }


  .product-search {
    border-radius: 17px;
  }


  .product-search-icon {
    width: 43px;
    font-size: 17px;
  }


  .product-search input {
    height: 49px;

    font-size: 12px;
  }


  .clear-product-search {
    width: 30px;
    height: 30px;

    margin-right: 8px;

    font-size: 18px;
  }


  .category-filters {
    gap: 7px;
  }


  .category-filter {
    padding: 9px 14px;

    font-size: 10px;
  }


  .no-search-results {
    padding: 34px 18px;
  }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.category-filter:focus-visible,
.reset-product-search:focus-visible,
.clear-product-search:focus-visible {
  outline: 3px solid rgba(241, 96, 153, .30);
  outline-offset: 3px;
}