/* Cataleya Search — Inline Dropdown v2.5 */

body.cs-body-locked { overflow: hidden !important; }

.cs-backdrop {
  position: fixed; inset: 0; z-index: 99990;
  background: rgba(0,0,0,.15); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; pointer-events: none;
}
.cs-backdrop--visible { opacity: 1; visibility: visible; pointer-events: auto; }

.cs-form-active { z-index: 99995 !important; position: relative; }
.cs-header-active { z-index: 99995 !important; }

.cs-dropdown {
  position: absolute; top: 100%; margin-top: 12px; left: 0; right: 0; z-index: 99999;
  background: #fff; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.08);
  max-height: 70vh; overflow-y: auto; overflow-x: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.cs-dropdown--visible { opacity: 1; visibility: visible; transform: translateY(0); }

.cs-scroll-fade {
  position: sticky; bottom: 0; left: 0; right: 0; height: 36px;
  background: linear-gradient(to top, #fff 30%, transparent);
  pointer-events: none; z-index: 2; transition: opacity .2s ease;
}
.cs-scroll-fade--hidden { opacity: 0; }

.cs-dropdown::-webkit-scrollbar { width: 5px; }
.cs-dropdown::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
.cs-dropdown::-webkit-scrollbar-track { background: transparent; }

.cs-section { padding: 4px 0; }
.cs-section--tax, .cs-section--content { border-top: 1px solid #f0f0f0; }
.cs-section__label {
  display: block; padding: 10px 20px 4px; font-size: 10px;
  font-weight: 700; letter-spacing: .08em; color: #999; text-transform: uppercase;
}

.cs-item {
  display: flex; align-items: center; padding: 10px 20px;
  text-decoration: none !important; color: inherit;
  transition: background-color .1s ease; cursor: pointer;
}
.cs-item:hover, .cs-item--active { background-color: #fafafa; }
.cs-item--product { gap: 14px; }

.cs-item__img {
  flex-shrink: 0; width: 76px; height: 76px;
  border-radius: 8px; overflow: hidden; background: #f7f7f7;
}
.cs-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-item__body { flex: 1; min-width: 0; }

.cs-item__title {
  font-size: 17px; font-weight: 600; line-height: 1.3; color: #1a1a1a; margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cs-item__title mark, .cs-item__name mark {     background: #fff0;
    background-image: linear-gradient(90deg,rgb(255 225 0 / .1),rgb(255 225 0 / .7) 4%,rgb(255 225 0 / .3));
    border-radius: .8rem .3rem;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    margin: 0 -.4rem;
    padding: .1rem .4rem
}

.cs-item__cats { font-size: 14px; color: #888; line-height: 1.3; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-item__price { font-size: 15px; font-weight: 700; color: #c61932; line-height: 1.3; }
.cs-price--old { text-decoration: line-through; color: #aaa; font-weight: 400; font-size: 13px; margin-right: 4px; }

.cs-item--tax, .cs-item--content {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; gap: 12px;
}
.cs-item__name { font-size: 15px; font-weight: 500; color: #1a1a1a; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-item__label { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: #999; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }

.cs-viewall-wrap { padding: 12px 20px; text-align: center; }
.cs-viewall-wrap--last { padding-bottom: 20px; }
.cs-viewall {
  display: inline-block; padding: 11px 32px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none !important;
  color: #fff !important; background: #c61932; border-radius: 50px;
  transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 2px 8px rgba(198,25,50,.25);
}
.cs-viewall:hover { background: #a81528; transform: scale(1.02); box-shadow: 0 4px 12px rgba(198,25,50,.35); }
.cs-viewall--secondary { background: #555; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.cs-viewall--secondary:hover { background: #333; box-shadow: 0 4px 12px rgba(0,0,0,.25); }

.cs-empty { padding: 30px 20px; text-align: center; color: #888; font-size: 14px; line-height: 1.5; }
.cs-empty strong { color: #555; }


@media (min-width: 481px) and (max-width: 767px) {
  .cs-dropdown { min-width: 0; max-width: 100%; }
  .cs-item__img { width: 70px; height: 70px; }
  .cs-item__title { font-size: 16px; }
  .cs-item__cats { font-size: 13.5px; }
  .cs-item__price { font-size: 14.5px; }
}

@media (max-width: 480px) {
  .cs-dropdown { max-height: 65vh; min-width: 0; }
  .cs-item { padding: 10px 16px; }
  .cs-item__img { width: 66px; height: 66px; }
  .cs-item__title { font-size: 15.5px; }
  .cs-item__cats { font-size: 13px; }
  .cs-item__price { font-size: 14px; }
  .cs-item__name { font-size: 14.5px; }
  .cs-viewall-wrap { padding: 10px 16px; }
  .cs-viewall-wrap--last { padding-bottom: 18px; }
  .cs-viewall { display: block; width: 100%; text-align: center; padding: 12px 20px; }
  .cs-section__label { padding: 10px 16px 4px; }
  .cs-item--tax, .cs-item--content { padding: 11px 16px; }
}
