.ccfs-search {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.ccfs-search__form {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(17, 24, 39, 0.15);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  width: 100%;
}

.ccfs-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  width: calc(100% - 120px);
  padding: 0.85rem 0.75rem;
  font-size: 14px;
  line-height: 1.3;
  background: transparent;
}

.ccfs-search__input:focus {
  outline: none;
}

.ccfs-search__button {
  flex: 0 0 auto;
  border: 0;
  background: #19a3a3;
  padding: 0 0.9rem;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  min-width: 112px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
  align-self: stretch;
}

.ccfs-search__button:hover {
  background: #148b8b;
}

.ccfs-search__button-label {
  display: inline-block;
}

.ccfs-search__button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ccfs-search__button-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

.ccfs-search__button-loader {
  display: none;
  align-items: flex-end;
  gap: 4px;
  height: 18px;
}

.ccfs-search__button-loader span {
  display: block;
  width: 4px;
  height: 8px;
  background: currentColor;
  border-radius: 0;
  animation: ccfs-equalizer 0.9s ease-in-out infinite;
}

.ccfs-search__button-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.ccfs-search__button-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.ccfs-search__button.is-loading .ccfs-search__button-label {
  display: none;
}

.ccfs-search__button.is-loading .ccfs-search__button-icon {
  display: none;
}

.ccfs-search__button.is-loading .ccfs-search__button-loader {
  display: inline-flex;
}

.ccfs-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 0;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.15);
  padding: 8px;
  max-height: min(90vh, 1360px);
  overflow: hidden;
}

.ccfs-search__items-scroll {
  max-height: min(84vh, 960px);
  overflow-y: auto;
  padding-right: 4px;
}

.ccfs-search__items-scroll::-webkit-scrollbar {
  width: 10px;
}

.ccfs-search__items-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 0;
}

.ccfs-search__categories {
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  margin-bottom: 8px;
}

.ccfs-search__popular {
  padding: 6px;
}

.ccfs-search__popular-list {
  display: grid;
  gap: 6px;
}

.ccfs-search__popular-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.ccfs-search__popular-item:hover {
  background: #f8fafc;
}

.ccfs-search__popular-name {
  min-width: 0;
}

.ccfs-search__popular-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ccfs-search__section-title {
  margin: 0 0 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ccfs-search__category-list {
  display: grid;
  gap: 6px;
}

.ccfs-search__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ccfs-search__category:hover {
  background: #f8fafc;
}

.ccfs-search__category-name {
  min-width: 0;
}

.ccfs-search__category-type {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #312e81;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ccfs-search__category-type--page {
  background: rgba(25, 163, 163, 0.12);
  color: #19a3a3;
}

.ccfs-search__section-title--products {
  padding: 4px 6px 8px;
  margin: 0;
}

.ccfs-search__item {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 0;
  text-decoration: none;
}

.ccfs-search__badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.ccfs-search__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.ccfs-search__badge--sale {
  background: #22c55e;
  color: #ffffff;
}

.ccfs-search__badge--outlet {
  background: #facc15;
  color: #1f2937;
}

.ccfs-search__item:hover {
  background: #f8fafc;
}

.ccfs-search__thumb img {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.ccfs-search__meta {
  min-width: 0;
}

.ccfs-search__title,
.ccfs-search__excerpt,
.ccfs-search__price {
  display: block;
}

.ccfs-search__title {
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
}

.ccfs-search__excerpt {
  margin-top: 4px;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.ccfs-search__stock {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
}

.ccfs-search__stock--instock {
  color: #16a34a;
}

.ccfs-search__stock--outofstock {
  color: #dc2626;
}

.ccfs-search__stock--onbackorder {
  color: #d97706;
}

.ccfs-search__price {
  margin-top: 6px;
  color: #111827;
  font-weight: 700;
  font-size: 13px;
}

.ccfs-search__empty,
.ccfs-search__footer {
  display: block;
  padding: 12px;
}

.ccfs-search__empty {
  color: #475569;
}

.ccfs-search__footer {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}

@keyframes ccfs-equalizer {
  0%,
  100% {
    height: 8px;
    opacity: 0.65;
  }

  50% {
    height: 18px;
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .ccfs-search__button {
    min-width: 104px;
    padding: 0 0.8rem;
  }

  .ccfs-search__input {
    width: calc(100% - 104px);
  }
}
