/* =========================================
   SEARCH OFFCANVAS BASE
========================================= */

.search-offcanvas {
  width: 390px !important;
  max-width: 90vw;
  border: none !important;
  background: #ffffff;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.12);
}

/* =========================================
   HEADER
========================================= */

.search-offcanvas .search-offcanvas-header {
  height: 72px;
  padding: 0 14px;
  border-bottom: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-offcanvas .search-offcanvas-title {
  margin: 0;
  color: #56060a;
  font-size: 19px;
  font-weight: 600;
}

.search-offcanvas .search-offcanvas-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #f4f7fb;
  color: #91a0b5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.search-offcanvas .search-offcanvas-close:hover {
  background: #e9eef5;
  color: #56060a;
}

/* =========================================
   BODY & WRAPPER
========================================= */

.search-offcanvas .search-offcanvas-body {
  padding: 18px 12px;
  background: #ffffff;
}

.search-offcanvas .search-offcanvas-wrapper {
  width: 100%;
}

/* =========================================
   SEARCH INPUT & CONTROLS
========================================= */

.search-offcanvas .search-input-wrapper {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid #dbe2eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 6px 0 14px;
}

.search-offcanvas .search-input-wrapper:focus-within {
  border-color: #56060a;
  box-shadow: 0 0 0 3px rgba(86, 6, 10, 0.08);
}

.search-offcanvas .search-input-icon {
  color: #8b9ab0;
  font-size: 14px;
  margin-right: 11px;
}

.search-offcanvas .search-input {
  flex: 1;
  height: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #56060a;
}

.search-offcanvas .search-input::placeholder {
  color: #7f8ca0;
  opacity: 1;
}

.search-offcanvas .search-clear-btn {
  width: 28px;
  height: 30px;
  border: none;
  background: transparent;
  color: #8d9aab;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-offcanvas .search-submit-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #56060a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
}

/* =========================================
   SECTION TITLES & BUTTONS
========================================= */

.search-offcanvas .search-section-title {
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #7e8da2;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.search-offcanvas .search-clear-all-btn {
  border: none;
  background: transparent;
  color: #56060a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.search-offcanvas .search-clear-all-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =========================================
   RECENT SEARCHES
========================================= */

.search-offcanvas .search-recent-wrapper {
  width: 100%;
}

.search-offcanvas .search-recent-item {
  width: 100%;
  min-height: 40px;
  padding: 7px 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: #455269;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.search-offcanvas .search-recent-item:hover {
  background: #f5f7fa;
}

.search-offcanvas .search-recent-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.search-offcanvas .search-recent-left span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-offcanvas .search-recent-right {
  display: flex;
  align-items: center;
}

.search-offcanvas .search-recent-icon {
  width: 14px;
  color: #9ba8b9;
  font-size: 12px;
}

.search-offcanvas .search-arrow-icon {
  color: #9ba8b9;
  font-size: 11px;
}

.search-offcanvas .search-remove-item-btn {
  border: none;
  background: transparent;
  color: #9ba8b9;
  padding: 2px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: 0.2s ease;
}

.search-offcanvas .search-remove-item-btn:hover {
  color: #56060a;
  background: #e9eef5;
}

/* =========================================
   LIVE RESULTS & PRODUCTS
========================================= */

.search-offcanvas .search-live-results {
  margin-top: 0;
  max-height: calc(100vh - 155px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.search-offcanvas .search-product-item {
  width: 100%;
  min-height: 66px;
  padding: 7px;
  margin-bottom: 6px;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  background: #ffffff;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.search-offcanvas .search-product-item:hover {
  background: #f6faff;
  border-color: #cfe3f8;
}

.search-offcanvas .search-product-image {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 7px;
  background: #f5f6f8;
  overflow: hidden;
  margin-right: 11px;
}

.search-offcanvas .search-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-offcanvas .search-product-info {
  flex: 1;
  min-width: 0;
}

.search-offcanvas .search-product-name {
  color: #56060a;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-offcanvas .search-product-category {
  margin-top: 3px;
  color: #8b98aa;
  font-size: 11px;
}

.search-offcanvas .search-product-icon {
  margin: 0 8px;
  color: #9aa7b8;
  font-size: 11px;
}

/* =========================================
   NO RESULTS
========================================= */

.search-offcanvas .search-no-result {
  padding: 45px 15px;
  text-align: center;
  color: #98a4b4;
}

.search-offcanvas .search-no-result svg {
  font-size: 22px;
  margin-bottom: 12px;
}

.search-offcanvas .search-no-result p {
  margin: 0;
  font-size: 13px;
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
========================================= */

@media (max-width: 576px) {
  .search-offcanvas {
    width: 900% !important;
    max-width: 90%;
  }

  .search-offcanvas .search-offcanvas-header {
    height: 65px;
    padding: 0 15px;
  }

  .search-offcanvas .search-offcanvas-body {
    padding: 15px 12px;
  }
}