/* ===== UorSearch - Barre de recherche + Dropdown ===== */

/* Widget wrapper */
#uorsearch-form {
  position: relative;
  width: 100%;
}
.uorsearch-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
#uorsearch-input {
  flex: 1;
  height: 42px;
  padding: 8px 44px 8px 16px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #2a2a2a;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
#uorsearch-input::placeholder {
  color: #999;
}
#uorsearch-input:focus {
  border-color: #e8a500;
}
.uorsearch-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #e8a500;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.uorsearch-btn .material-icons {
  font-size: 24px;
}

/* Loading spinner */
#uorsearch-input.uorsearch-loading {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%23e8a500' d='M25 5A20 20 0 1 0 45 25 20 20 0 0 0 25 5zm0 36A16 16 0 1 1 41 25 16 16 0 0 1 25 41z' opacity='.3'/%3E%3Cpath fill='%23e8a500' d='M25 5A20 20 0 0 1 45 25h-4A16 16 0 0 0 25 9z'%3E%3CanimateTransform attributeName='transform' dur='.6s' from='0 25 25' repeatCount='indefinite' to='360 25 25' type='rotate'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 44px center;
  background-size: 18px;
}

/* ===== Dropdown ===== */
.uorsearch-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1e1e1e;
  border: 1px solid #444;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.uorsearch-dd-section {
  padding: 8px 0;
  border-bottom: 1px solid #333;
}
.uorsearch-dd-section:last-child {
  border-bottom: none;
}
.uorsearch-dd-title {
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e8a500;
  letter-spacing: .5px;
}

/* Product row */
.uorsearch-dd-product {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  color: #ddd;
  text-decoration: none;
  transition: background .15s;
  gap: 10px;
}
.uorsearch-dd-product:hover {
  background: #2a2a2a;
  color: #fff;
}
.uorsearch-dd-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
  background: #333;
}
.uorsearch-dd-noimg {
  display: inline-block;
}
.uorsearch-dd-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.uorsearch-dd-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uorsearch-dd-brand {
  font-size: 11px;
  color: #999;
}
.uorsearch-dd-price {
  font-weight: 700;
  font-size: 13px;
  color: #e8a500;
  white-space: nowrap;
}

/* Link rows (categories, brands, blog) */
.uorsearch-dd-link {
  display: block;
  padding: 5px 16px;
  font-size: 13px;
  color: #ccc;
  text-decoration: none;
  transition: background .15s;
}
.uorsearch-dd-link:hover {
  background: #2a2a2a;
  color: #fff;
}

/* Footer */
.uorsearch-dd-footer {
  padding: 10px 16px;
  text-align: center;
  background: #252525;
  border-radius: 0 0 4px 4px;
}
.uorsearch-dd-footer a {
  color: #e8a500;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.uorsearch-dd-footer a:hover {
  text-decoration: underline;
}

.uorsearch-dd-empty {
  padding: 20px 16px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* ===== Results Page ===== */
.uorsearch-results-page {
  padding: 20px 0;
}
.uorsearch-summary {
  font-size: 15px;
  color: #ccc;
  margin-bottom: 24px;
}
.uorsearch-section {
  margin-bottom: 32px;
}
.uorsearch-section h2 {
  font-size: 18px;
  color: #e8a500;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

/* Product grid */
.uorsearch-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.uorsearch-product-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .2s;
}
.uorsearch-product-card:hover {
  border-color: #e8a500;
}
.uorsearch-product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.uorsearch-product-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fff;
}
.uorsearch-no-img {
  width: 100%;
  height: 160px;
  background: #333;
}
.uorsearch-product-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uorsearch-product-name {
  font-size: 13px;
  color: #ddd;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.uorsearch-product-brand {
  font-size: 11px;
  color: #999;
}
.uorsearch-product-price {
  font-size: 14px;
  font-weight: 700;
  color: #e8a500;
}

/* Lists */
.uorsearch-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.uorsearch-list li {
  padding: 4px 0;
}
.uorsearch-list a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}
.uorsearch-list a:hover {
  color: #e8a500;
}
.uorsearch-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* Pagination */
.uorsearch-pagination {
  text-align: center;
  margin-top: 24px;
}
.uorsearch-load-more {
  background: #e8a500;
  color: #1a1a1a;
  border: none;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s;
}
.uorsearch-load-more:hover {
  background: #ffc107;
}
.uorsearch-load-more:disabled {
  opacity: .6;
  cursor: wait;
}

.uorsearch-no-results {
  text-align: center;
  font-size: 16px;
  color: #888;
  padding: 40px 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .uorsearch-dropdown {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 60vh;
    border-radius: 8px 8px 0 0;
    border: 1px solid #444;
  }
  .uorsearch-dd-img {
    width: 40px;
    height: 40px;
  }
  .uorsearch-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .uorsearch-product-card img {
    height: 120px;
  }
}
