/* ==========================================================================
   SEARCH-MODAL.CSS - Модальне вікно пошуку (минималистичный стиль)
   ========================================================================== */

/* Modal пошуку (центроване, мінімалістичне) */
.modal-open {
  overflow: hidden;
}

.modal-search {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s ease;
}

.modal-search.show {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.7);
}

/* Діалог (по центру) */
.modal-search .modal-dialog {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-search.show .modal-dialog {
  transform: scale(1);
  opacity: 1;
}

/* Контент */
.modal-search .modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Header пошуку */
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-title {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/* Форма пошуку */
.form-search {
  position: relative;
  margin-bottom: 30px;
}

.form-search fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-search input {
  width: 100%;
  padding: 16px 60px 16px 20px;
  border: 1px solid #e5e5e5;
  border-radius: 50px;
  font-size: 15px;
  color: #000;
  background: #f5f5f5;
  transition: all 0.3s ease;
}

.form-search input:focus {
  border-color: #000;
  background: #fff;
  outline: none;
}

.form-search input::placeholder {
  color: #999;
}

/* Кнопка пошуку (чорне коло з лупою) */
.form-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #000;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.form-search button:hover {
  background: #333;
  transform: translateY(-50%) scale(1.05);
}

.form-search button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.form-search button svg path,
.form-search button svg circle {
  stroke: #fff;
}

/* Результати пошуку */
.search-results {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-results-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  padding-right: 8px;
}

/* Товар в результатах пошуку (минималистичный стиль) */
.search-product-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.search-product-item:hover {
  background: #fafafa;
  border-color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.search-product-image {
  flex-shrink: 0;
  width: 100px;
  height: 130px;
  overflow: hidden;
  background: #f8f8f8;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

.search-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-product-item:hover .search-product-image img {
  transform: scale(1.05);
}

.search-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-product-name {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  line-height: 1.5;
  margin: 0 0 12px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Кольори товару */
.search-product-colors {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.search-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e0e0e0;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.search-color-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px #000;
  z-index: 1;
}

.search-product-price {
  font-size: 17px;
  font-weight: 700;
  color: #000;
  margin-top: auto;
}

.search-product-price-old {
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
  margin-left: 10px;
  font-weight: 400;
}

/* Scrollbar */
.search-results-list::-webkit-scrollbar {
  width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Порожній пошук */
.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.search-empty svg {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  color: #ccc;
}

.search-empty p {
  font-size: 14px;
  color: #666;
}

/* Адаптив */
@media (max-width: 767px) {
  .modal-search {
    padding: 60px 16px 16px;
  }

  .modal-search .modal-content {
    padding: 24px;
  }

  .form-search input {
    padding: 14px 56px 14px 16px;
    font-size: 14px;
  }

  .form-search button {
    width: 40px;
    height: 40px;
  }
}
