#product-search { position: relative; display: inline-block; }
#product-search-toggle { background: transparent; border: 0; cursor: pointer; font-size: 18px; }

.product-search-wrap { position: absolute; top: 100%; right: 0; width: 360px; max-width: calc(100vw - 20px); background: #fff; border: 1px solid #ddd; box-shadow: 0 6px 20px rgba(0,0,0,0.08); border-radius: 6px; padding: 10px; margin-top: 8px; z-index: 9999; display: none; }
.product-search-wrap.open { display: block; }

.product-search-inner { display: flex; flex-direction: column; }
#product-search-input { width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid #e6e6e6; border-radius: 4px; outline: none; }
#product-search-input:focus { box-shadow: 0 0 0 3px rgba(0,0,0,0.03); }

.product-search-results { margin-top: 8px; max-height: 320px; overflow-y: auto; }
.ps-results-list { list-style: none; margin: 0; padding: 0; }
.ps-item { border-bottom: 1px solid #f0f0f0; }
.ps-item a { display: flex; gap: 10px; padding: 8px; text-decoration: none; color: inherit; align-items: center; }
.ps-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.ps-info { flex: 1; }
.ps-title { font-size: 14px; line-height: 1.2; font-weight: 600; }
.ps-sku { font-size: 12px; color: #666; margin-top: 4px; }
.ps-footer { padding: 10px; text-align: center; border-top: 1px solid #f3f3f3; }
.ps-footer a { font-size: 13px; text-decoration: underline; }

.ps-no-results, .ps-loading { padding: 12px; color: #666; }

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .product-search-wrap { left: 10px; right: 10px; width: auto; max-width: calc(100vw - 20px); }
}