/* ===== MEJORAS PARA EL PROCESO DE PEDIDOS ===== */

/* Onboarding y Guía Visual */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
}

.onboarding-step {
    position: absolute;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    min-width: 300px;
    text-align: center;
    animation: slideInUp 0.5s ease;
    z-index: 10000;
}

.onboarding-step h3 {
    color: #2E8B57;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.onboarding-step p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.onboarding-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.onboarding-arrow.up {
    border-bottom-color: white;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.onboarding-arrow.down {
    border-top-color: white;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.onboarding-arrow.left {
    border-right-color: white;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
}

.onboarding-arrow.right {
    border-left-color: white;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
}

/* Botones de navegación del onboarding */
.onboarding-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.onboarding-btn {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, #2E8B57, #3CB371);
    color: white;
}

.onboarding-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.onboarding-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Indicador de progreso */
.progress-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #2E8B57;
    transform: scale(1.2);
}

/* Mejoras para la vista de productos */
.products-header {
    background: linear-gradient(135deg, #2E8B57 0%, #3CB371 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.products-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.products-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.ordering-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
}

.step-number {
    background: white;
    color: #2E8B57;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Mejoras para las cards de productos */
.product-card-improved {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-improved:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #2E8B57;
}

.product-card-improved::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2E8B57, #3CB371);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card-improved:hover::before {
    transform: scaleX(1);
}

.product-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-improved:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    text-align: center;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2E8B57;
    margin-bottom: 1rem;
}

/* Controles de cantidad mejorados */
.quantity-controls-improved {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #2E8B57;
    background: white;
    color: #2E8B57;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #2E8B57;
    color: white;
    transform: scale(1.1);
}

.quantity-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    min-width: 50px;
    text-align: center;
}

/* Botones de acción mejorados */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #2E8B57, #3CB371);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 139, 87, 0.3);
}

.remove-from-cart-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-from-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

/* Carrito flotante mejorado */
.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #2E8B57, #3CB371);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(46, 139, 87, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.floating-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(46, 139, 87, 0.4);
}

.cart-count {
    background: #FFD700;
    color: #333;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Tooltips y ayuda */
.help-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.help-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.help-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Tooltip especial para el carrito flotante */
.floating-cart.help-tooltip .tooltip-text {
    width: 250px;
    bottom: 140%;
    margin-left: -125px;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Animaciones */
@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .products-title {
        font-size: 2rem;
    }
    
    .ordering-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .step-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .floating-cart,
    .floating-cart.help-tooltip {
        display: flex !important;
    }
    
    .onboarding-step {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
        width: 100% !important;
        border-radius: 20px !important;
        padding: 2rem 1.5rem !important;
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
        background: white !important;
    }
    
    .quantity-controls-improved {
        gap: 0.5rem;
    }
    
    .quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Estados de carga */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2E8B57;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensajes de confirmación */
.confirmation-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid #28a745;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirmation-message i {
    font-size: 1.2rem;
} 

/* Buscador mejorado para desktop */
.sticky-search-row {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    padding: 1rem 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    /* Solución alternativa para navegadores que no soportan sticky */
    position: -webkit-sticky !important;
    position: -moz-sticky !important;
    position: -ms-sticky !important;
    position: -o-sticky !important;
}

/* Fallback para navegadores antiguos */
@supports not (position: sticky) {
    .sticky-search-row {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
    }
}

.search-container {
    margin: 1.5rem 0 2rem 0;
}

/* Asegurar que el contenedor padre tenga posición relativa */
.container-fluid {
    position: relative !important;
}

.row {
    position: relative !important;
}

.col-12.col-sm-10.col-md-8.col-lg-6.col-xl-5 {
    position: relative !important;
}

.search-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 52px;
}

.search-group:focus-within {
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
    border-color: #059669;
    transform: translateY(-1px);
}

.search-icon {
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    height: 100%;
}

.search-group:focus-within .search-icon {
    color: #059669;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    outline: none;
    box-shadow: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.search-input:focus {
    box-shadow: none;
    outline: none;
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.95rem;
}

.clear-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    flex-shrink: 0;
    cursor: pointer;
}

.clear-btn:hover {
    color: #64748b;
    transform: scale(1.1);
}

.clear-btn:active {
    transform: scale(0.9);
}

.search-btn {
    background: #059669;
    border: none;
    color: white;
    padding: 0 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #047857;
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.95);
} 