#floating-cart {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

#floating-cart.show {
    transform: translateX(0);
}

.floating-cart-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-cart-header h5 {
    margin: 0;
    font-size: 16px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.floating-cart-items {
    height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 15px;
}

.floating-cart-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-left: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 13px;
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.cart-item-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-decrease,
.cart-item-increase {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
}

.cart-item-decrease:hover,
.cart-item-increase:hover {
    background: #f5f5f5;
}

.cart-item-quantity {
    padding: 0 10px;
    min-width: 40px;
    text-align: center;
    font-size: 14px;
}

.cart-item-remove {
    color: #dc3545;
    background: none;
    border: none;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 13px;
}

.cart-total {
    margin-bottom: 15px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-total-row.final {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL specific adjustments */
body[dir="rtl"] #floating-cart {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

body[dir="rtl"] #floating-cart.show {
    transform: translateX(0);
}

body[dir="rtl"] .cart-item-image {
    margin-left: 0;
    margin-right: 15px;
}

body[dir="rtl"] .cart-item-remove {
    margin-right: 0;
    margin-left: 10px;
} 