.rs-cart-container {
    position: relative;
}

.rs-cart-icon {
    position: relative;
    cursor: pointer;
    color: #333;
}

.rs-cart-icon i {
    font-size: 24px;
}

.rs-cart-count {
    position: absolute;
    top: -5px;
    left: 20px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.rs-cart-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 5px;
}

.rs-cart-dropdown.show {
    opacity: 1;
    visibility: visible;
}

.rs-cart-items {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rs-cart-item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.rs-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: #ddd 1px solid;
}

.rs-item-details {
    flex: 1;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
    text-align: right;
}

.rs-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.rs-item-quantity,
.item-price {
    font-size: 14px;
    color: #555;
}

.rs-remove-item {
    margin-top: 5px;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    align-self: flex-start;
}

.rs-remove-item:hover {
    text-decoration: underline;
}

.rs-cart-total {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-weight: bold;
}

.rs-btn-cart {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rs-btn-cart:hover {
    background: #2ecc71;
}

.rs-empty-cart {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* واکنش‌گرا بودن */
@media (max-width: 600px) {
    .rs-cart-dropdown {
        width: 100%;
        left: 0;
    }

    .rs-cart-item {
        flex-direction: column;
        align-items: center;
    }

    .rs-item-details {
        margin-right: 0;
        align-items: center;
        text-align: center;
    }

    .rs-remove-item {
        align-self: center;
    }
}
