/* ======================================
   WOO HEADER SEARCH (Amazon-style)
====================================== */

.woo-header-search {
  width: 100%;
  max-width: 520px;
  margin-left: 80px;
}

.woo-header-search-form {
  position: relative;
  width: 100%;
}

.woo-header-search-field {
  position: relative;
  width: 100%;
}

.woo-header-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
}

.woo-header-search-input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
  padding: 0 44px 0 44px;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.woo-header-search-input:focus {
  background: #fff;
  border-color: #ccc;
}

/* ✅ clear button */
.woo-header-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #777;
  display: none;
  align-items: center;
  justify-content: center;
}

.woo-header-search-clear.active {
  display: flex;
}

/* ✅ dropdown desktop */
.woo-header-search-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 99999;
}

.woo-header-search-loading,
.woo-header-search-empty {
  padding: 14px 14px;
  font-size: 14px;
  color: #555;
}

.woo-header-search-list {
  display: flex;
  flex-direction: column;
}

.woo-header-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #f3f3f3;
}

.woo-header-search-item:hover {
  background: #fafafa;
}

.woo-header-search-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.woo-header-search-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.woo-header-search-price {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
}

/* ✅ MOBILE ICON visible */
.woo-search-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #111;
  padding: 0;
  margin: 0;
}

/* ✅ Desktop: show search bar, hide icon */
@media (min-width: 992px) {
  .woo-header-search {
    display: block;
  }
  .woo-search-header-icon {
    display: none !important;
  }
}

/* ✅ Mobile: hide desktop bar */
@media (max-width: 991px) {
  .woo-header-search {
    display: none !important;
  }
}

/* ======================================
   ✅ MOBILE SEARCH MODAL (NEW)
   Clean like your 2nd image
====================================== */

.woo-mobile-search-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.woo-mobile-search-modal.active {
  display: block;
}

.woo-mobile-search-box {
  width: 100%;
  background: #fff;
  padding: 14px 14px 10px 14px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.20);
}

.woo-mobile-search-top {
  position: relative;
}

.woo-mobile-search-input {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
  padding: 0 48px 0 48px;
  font-size: 15px;
  outline: none;
}

.woo-mobile-search-input:focus {
  background: #fff;
  border-color: #bbb;
}

.woo-mobile-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  display: flex;
}

.woo-mobile-search-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  color: #444;
  cursor: pointer;
}

.woo-mobile-search-results {
  margin-top: 12px;
  max-height: 65vh;
  overflow-y: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #f1f1f1;
}

.woo-mobile-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #f3f3f3;
}

.woo-mobile-search-item:last-child {
  border-bottom: none;
}

.woo-mobile-search-item:hover {
  background: #fafafa;
}

.woo-mobile-search-thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.woo-mobile-search-title {
  font-size: 14px;
  font-weight: 600;
}

.woo-mobile-search-price {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
}

.woo-mobile-search-empty,
.woo-mobile-search-loading {
  padding: 14px;
  font-size: 14px;
  color: #555;
}

/* lock scroll while open */
body.woo-mobile-search-open {
  overflow: hidden !important;
}
