/* 
 * This file contains the CSS styles for the product search plugin.
 * It defines the appearance of the search form and results.
 */

body {
  font-family: Arial, sans-serif;
}

.product-search-form {
  margin: 20px 0;
}

.product-search-form input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.product-search-form input[type="submit"] {
  padding: 10px 15px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.product-search-form input[type="submit"]:hover {
  background-color: #005177;
}

.product-search-results {
  margin-top: 20px;
}

.product-search-results .product {
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.product-search-results .product h3 {
  margin: 0 0 10px;
}

.product-search-results .product p {
  margin: 0;
}

/* جستجوی محصول */
.psp-search-container {
  width: 100%;
  position: relative;
}

.psp-search-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* دراپ‌دان دسته‌ها */
.psp-category-dropdown {
  flex: 0 0 auto;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
}

.psp-category-dropdown:hover,
.psp-category-dropdown:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* input جستجو */
.psp-search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  color: #333;
}

.psp-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

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

/* دکمه جستجو */
.psp-search-btn {
  flex: 0 0 auto;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.psp-search-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.psp-search-btn:active {
  transform: scale(0.95);
}

/* نتایج جستجو */
.psp-search-results {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 100%;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  top: 100%;
  left: 0;
  margin-top: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.psp-search-results.active {
  display: block;
}

.psp-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
}

.psp-result-item:hover {
  background-color: #f0f0f0;
}

.psp-result-item:last-child {
  border-bottom: none;
}

.psp-result-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
}

.psp-result-info {
  flex: 1;
}

.psp-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.psp-results-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.psp-results-list li:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .psp-search-wrapper {
    flex-wrap: wrap;
  }

  .psp-category-dropdown {
    min-width: 100%;
  }

  .psp-search-input {
    min-width: 100%;
  }

  .psp-search-btn {
    min-width: 100%;
  }

  .psp-search-results {
    min-width: 100%;
  }
}
