feat: Replace product cards with search bar interface

- Replace category cards with modern search bar for services/products
- Implement real-time search with debouncing (200ms delay)
- Add autocomplete functionality for better UX
- Maintain anticipo functionality with dedicated form
- Add visual feedback notifications instead of alerts
- Improve responsive design and accessibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-09-16 12:07:31 -06:00
parent 5cb8dcdd9e
commit 9282bd5480
3 changed files with 416 additions and 52 deletions

View File

@@ -8,6 +8,165 @@
- Secundario: #6c757d (gris medio)
*/
/* --- Estilos para barra de búsqueda de servicios --- */
.services-search-container {
margin-bottom: 20px;
}
.search-bar-container {
position: relative;
margin-bottom: 15px;
}
.search-input-wrapper {
position: relative;
}
#service-search-input {
width: 100%;
box-sizing: border-box;
padding: 12px 40px 12px 15px;
border: 2px solid #dee2e6;
border-radius: 8px;
font-size: 16px;
background-color: #fff;
transition: border-color 0.2s, box-shadow 0.2s;
}
#service-search-input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.search-icon {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
font-size: 18px;
}
.search-results {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: #fff;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
max-height: 300px;
overflow-y: auto;
z-index: 1000;
}
.search-result-item {
padding: 12px 15px;
border-bottom: 1px solid #f1f3f4;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.2s;
}
.search-result-item:hover {
background-color: #f8f9fa;
}
.search-result-item:last-child {
border-bottom: none;
}
.search-result-info {
display: flex;
flex-direction: column;
}
.search-result-name {
font-weight: 600;
color: #212529;
margin-bottom: 2px;
}
.search-result-category {
font-size: 12px;
color: #6c757d;
}
.search-result-price {
font-weight: 600;
color: #28a745;
}
.search-result-custom-price {
font-size: 12px;
color: #ffc107;
font-weight: 500;
}
.anticipo-section {
margin-top: 15px;
}
.anticipo-form-card {
background: #fff;
border: 2px solid #28a745;
border-radius: 8px;
padding: 15px;
}
.anticipo-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.anticipo-header .category-icon {
margin-right: 8px;
font-size: 20px;
}
.anticipo-header h4 {
margin: 0;
color: #28a745;
}
.search-help {
background: #e7f3ff;
border: 1px solid #b3d9ff;
border-radius: 6px;
padding: 10px 15px;
margin-top: 15px;
}
.search-help p {
margin: 0;
font-size: 14px;
color: #0066cc;
}
.search-empty {
padding: 20px;
text-align: center;
color: #6c757d;
font-style: italic;
}
/* Animación para notificaciones */
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* Estilos generales y tipografías */
body {
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;