/**
 * Cart Modal Styles - Modern Minimalist Design
 */

/* Floating Cart Button */
.btn-carrito-flotante {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-carrito-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.btn-carrito-flotante .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Cart Modal Overlay */
.carrito-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
}

.carrito-modal.active {
    display: flex;
}

/* Cart Modal Content */
.carrito-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Cart Header */
.carrito-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.carrito-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.carrito-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #86868b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.carrito-modal-close:hover {
    background: #f0f0f0;
    color: #1d1d1f;
}

/* Cart Body */
.carrito-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #ffffff;
}

/* Empty Cart */
.carrito-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.carrito-vacio i {
    font-size: 4rem;
    color: #d1d1d6;
    margin-bottom: 1rem;
}

.carrito-vacio p {
    color: #86868b;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-ver-menu {
    background: #1d1d1f;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-ver-menu:hover {
    background: #424245;
    transform: translateY(-1px);
}

/* Cart Item - Modern Design */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f7;
    border-radius: 14px;
    margin-bottom: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.cart-item:hover {
    background: #ebebed;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
    font-size: 1.5rem;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #86868b;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 8px;
    padding: 0.25rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #1d1d1f;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.qty-btn:hover {
    background: #f5f5f7;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.9rem;
}

.cart-item-total {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.95rem;
}

/* Remove Button */
.btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: #86868b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-remove:hover {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

/* Cart Footer */
.carrito-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* Delivery Type Toggle */
.delivery-type-toggle {
    margin-bottom: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 28px;
    background: #e8e8ed;
    border-radius: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider {
    background: #34c759;
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider::before {
    transform: translateX(22px);
}

.toggle-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1d1d1f;
}

/* Shipping Message */
.shipping-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.shipping-message.success {
    background: #d1f4e0;
    color: #0d7a3f;
}

.shipping-message.info {
    background: #e3f2fd;
    color: #1565c0;
}

.shipping-message i {
    font-size: 1.1rem;
}

/* Price Breakdown */
.price-breakdown {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.price-row:not(:last-child) {
    border-bottom: 1px solid #f5f5f7;
}

.price-label {
    color: #86868b;
    font-size: 0.95rem;
}

.price-value {
    color: #1d1d1f;
    font-weight: 500;
    font-size: 0.95rem;
}

.price-row.total {
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 2px solid #1d1d1f;
}

.price-row.total .price-label {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
}

.price-row.total .price-value {
    color: #1d1d1f;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Checkout Button */
.btn-realizar-pedido {
    display: block;
    width: 100%;
    background: #1d1d1f;
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-realizar-pedido:hover {
    background: #424245;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carrito-modal-content {
        max-width: 100%;
    }

    .btn-carrito-flotante {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .cart-item {
        padding: 0.875rem;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .carrito-modal-header {
        padding: 1.25rem;
    }

    .carrito-modal-title {
        font-size: 1.25rem;
    }
}