.shopcart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 1100;
    transition: right 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.shopcart-modal.open {
    right: 0;
}

.rtl .shopcart-modal {
    right: auto;
    left: -100%;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
}

.rtl .shopcart-modal.open {
    left: 0;
}

.shopcart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.shopcart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #eee;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    direction: ltr;
}

.rtl .shopcart-header {
    direction: rtl;
}

.shopcart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.5px;
}

.shopcart-header i {
    margin-right: 8px;
    color: #4a4a4a;
}

.rtl .shopcart-header i {
    margin-right: 0;
    margin-left: 8px;
}

.shopcart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shopcart-close:hover {
    color: #000;
    background: #f5f5f5;
}

.shopcart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.shopcart-empty-message {
    text-align: center;
    padding: 60px 20px;
}

.shopcart-empty-icon {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 24px;
}

.shopcart-empty-message p {
    font-size: 16px;
    color: #888;
    margin-bottom: 24px;
}

.shopcart-continue-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.shopcart-continue-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.shopcart-continue-btn i {
    margin-right: 8px;
}

.rtl .shopcart-continue-btn i {
    margin-right: 0;
    margin-left: 8px;
}

.shopcart-item {
    display: flex;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: shopcart-slideIn 0.3s ease;
    direction: ltr;
}

.rtl .shopcart-item {
    direction: rtl;
}

.shopcart-item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 16px;
}

.rtl .shopcart-item-image {
    margin-right: 0;
    margin-left: 16px;
}

.shopcart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shopcart-item-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 15px;
}

.shopcart-item-variants {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.shopcart-item-price {
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
}

.shopcart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.shopcart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shopcart-quantity-btn {
    width: 28px;
    height: 28px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.shopcart-quantity-btn:hover {
    background: #e0e0e0;
}

.shopcart-quantity-input {
    width: 36px;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.shopcart-item-remove {
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.shopcart-item-remove:hover {
    color: #e53935;
}

.shopcart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.shopcart-totals {
    margin-bottom: 20px;
}

.shopcart-subtotal,
.shopcart-shipping,
.shopcart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.shopcart-subtotal span:first-child,
.shopcart-shipping span:first-child,
.shopcart-total span:first-child {
    color: #666;
}

.shopcart-subtotal span:last-child,
.shopcart-shipping span:last-child {
    color: #333;
}

.shopcart-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-weight: 700;
    font-size: 17px;
}

.shopcart-total span:last-child {
    color: #000;
}

.shopcart-buy-btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shopcart-buy-btn:not(:disabled):hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shopcart-buy-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

@keyframes shopcart-slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rtl @keyframes shopcart-slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shopcart-itemRemoved {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.rtl @keyframes shopcart-itemRemoved {
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.shopcart-removing {
    animation: shopcart-itemRemoved 0.3s ease forwards;
}

@media (max-width: 480px) {
    .shopcart-modal {
        max-width: 100%;
    }

    .shopcart-item {
        flex-direction: column;
    }

    .shopcart-item-image {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .rtl .shopcart-item-image {
        margin-left: 0;
    }
}