/* Estilos del Carrito */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(117, 2, 56, 0.1);
    gap: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(117, 2, 56, 0.1);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.cart-item-image img:hover {
    transform: scale(1.05);
}

/* Estilos para imagen placeholder */
.cart-item-image img[src*="placeholder"] {
    opacity: 0.8;
    filter: grayscale(20%);
    background: #f8f9fa;
}

.cart-item-image img[src*="placeholder"]:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Asegurar que las imágenes se carguen correctamente */
.cart-item-image img {
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.1);
}

.cart-item-image img:not([src*="placeholder"]) {
    border: 1px solid rgba(117, 2, 56, 0.2);
}

/* Animación de carga de imagen */
.cart-item-image img {
    opacity: 0;
    animation: fadeInImage 0.3s ease forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

.cart-item-price {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-subtotal {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.85rem;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Mejoras táctiles para elementos de cantidad */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.quantity-change {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.quantity-change::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.quantity-change:hover {
    background: var(--color-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(117, 2, 56, 0.3);
}

.quantity-change:active {
    transform: scale(0.95);
    background: var(--color-accent);
}

.quantity-change:active::before {
    width: 100%;
    height: 100%;
}

.quantity-change:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

.quantity-number {
    background: var(--color-white);
    border: 2px solid var(--color-accent);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    color: var(--color-accent);
    min-width: 60px;
    text-align: center;
    font-size: 1.1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.cart-item-remove {
    background: var(--color-danger);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cart-item-remove:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.cart-item-remove:active {
    transform: translateY(0);
    background: var(--color-danger);
}

.cart-summary {
    background: linear-gradient(135deg, rgba(117, 2, 56, 0.05), rgba(117, 2, 56, 0.08));
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(117, 2, 56, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--color-text);
}

.cart-total-line span:last-child {
    font-weight: 600;
    color: var(--color-secondary);
}

.cart-total-line.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-accent);
    border-top: 2px solid rgba(117, 2, 56, 0.2);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.cart-total-line.total span:last-child {
    color: var(--color-accent);
    font-size: 1.4rem;
}

/* Formulario de Contacto */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--color-accent);
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(117, 2, 56, 0.2);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-input.error {
    border-color: var(--color-danger);
}

.form-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    display: none;
}

.form-error.show {
    display: block;
}

/* Botones */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--color-success) !important;
    color: var(--color-white) !important;
}

.btn-primary:hover {
    background: #218838 !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-accent) !important;
    color: var(--color-white) !important;
    border: 2px solid var(--color-accent) !important;
}

.btn-secondary:hover {
    background: #5a0229 !important;
    color: var(--color-white) !important;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: var(--color-white);
    font-weight: 600;
    z-index: 1100;
    animation: slideInRight 0.3s ease;
    box-shadow: var(--shadow-md);
}

.notification.success {
    background: var(--color-success);
}

.notification.error {
    background: var(--color-danger);
}

.notification.info {
    background: var(--color-accent);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty States */
.empty-cart {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    margin: 1rem 0;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #6c757d;
    opacity: 0.6;
}

.empty-cart h3 {
    color: var(--color-accent);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }
    
    .cart-item-image img {
        border-radius: 6px;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 0.85rem;
    }
    
    .cart-item-subtotal {
        font-size: 0.8rem;
    }
    
    .cart-item-controls {
        gap: 0.25rem;
    }
    
    .quantity-change {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        margin: 0.25rem;
    }
    
    .quantity-number {
        min-height: 48px;
        padding: 1rem;
        font-size: 1.2rem;
        min-width: 70px;
    }
    
    .cart-item-remove {
        min-height: 48px;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .cart-item-quantity {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .cart-summary {
        padding: 1rem;
    }
    
    .cart-total-line {
        font-size: 0.95rem;
    }
    
    .cart-total-line.total {
        font-size: 1.2rem;
    }
    
    .cart-total-line.total span:last-child {
        font-size: 1.3rem;
    }
    
    .empty-cart {
        padding: 2rem 1rem;
    }
    
    .empty-cart-icon {
        font-size: 3rem;
    }
    
    .empty-cart h3 {
        font-size: 1.2rem;
    }
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .quantity-change:hover,
    .cart-item-remove:hover {
        transform: none;
        box-shadow: none;
    }
    
    .quantity-change:active {
        transform: scale(0.9);
        background: var(--color-secondary);
    }
    
    .cart-item-remove:active {
        transform: scale(0.95);
        background: #c82333;
    }
}

/* Actualización de botones - Timestamp: 2024-12-19 */