/* Cart Off-Sidebar Styles */
.cpc-cart-sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden by default */
    width: 300px;
    height: 100vh;
    z-index: 9999;
    transition: right 0.3s ease-in-out;
}

.cpc-cart-sidebar.active {
    right: 0;
}

.cpc-cart-sidebar__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.cpc-cart-sidebar.active .cpc-cart-sidebar__overlay {
    opacity: 1;
    visibility: visible;
}

.cpc-cart-sidebar__content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

.cpc-cart-sidebar__header {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    flex-shrink: 0;
}

.cpc-cart-sidebar__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.cpc-cart-sidebar__count {
    color: #6b7280;
    font-weight: 400;
}

.cpc-cart-sidebar__close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.cpc-cart-sidebar__close:hover {
    background: #e5e7eb;
    color: #111827;
}

.cpc-cart-sidebar__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.cpc-cart-sidebar__empty {
    text-align: center;
    padding: 40px 10px;
    color: #6b7280;
}

.cpc-cart-sidebar__items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cpc-cart-sidebar__item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cpc-cart-sidebar__item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cpc-cart-sidebar__item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpc-cart-sidebar__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpc-cart-sidebar__item-image .cp-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.cpc-cart-sidebar__item-image .cp-placeholder svg {
    width: 26px;
    height: 26px;
    display: block;
}

.cpc-cart-sidebar__item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cpc-cart-sidebar__item-title {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.cpc-cart-sidebar__item-title a {
    color: #111827;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cpc-cart-sidebar__item-title a:hover {
    color: #3b82f6;
}

.cpc-cart-sidebar__item-variation {
    margin: 0;
    font-size: 10px;
    color: #6b7280;
}

.cpc-cart-sidebar__item-price {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}

.cpc-cart-sidebar__item-price .price {
    font-size: 11px;
}
.cpc-cart-sidebar__item-price .price-note{
    color: #16a34a;
}
.cpc-cart-sidebar__item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 4px;
}

.cpc-cart-sidebar__qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #ffffff;
}

.cpc-cart-sidebar__qty-btn {
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    padding: 0;
    transition: background-color 0.2s;
}

.cpc-cart-sidebar__qty-btn:hover {
    background: #f3f4f6;
}

.cpc-cart-sidebar__qty-minus {
    border-right: 1px solid #e5e7eb;
}

.cpc-cart-sidebar__qty-plus {
    border-left: 1px solid #e5e7eb;
}

.cpc-cart-sidebar__qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #111827;
    padding: 0 4px;
}

.cpc-cart-sidebar__remove {
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #dc2626;
    padding: 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cpc-cart-sidebar__remove:hover {
    background: #fee2e2;
}

.cpc-cart-sidebar__item-subtotal {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

.cpc-cart-sidebar__item-subtotal strong {
    color: #111827;
    font-weight: 600;
}

.cpc-cart-sidebar__footer {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.cpc-cart-sidebar__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.cpc-cart-sidebar__total-label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.cpc-cart-sidebar__total-amount {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}

.cpc-cart-sidebar__checkout-btn {
    display: block;
    padding: 10px;
    text-align: center;
    background: #e21736;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}


@keyframes productAdded {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(-5px) scale(1.05);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Scrollbar styling */
.cpc-cart-sidebar__body::-webkit-scrollbar {
    width: 4px;
}

.cpc-cart-sidebar__body::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.cpc-cart-sidebar__body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.cpc-cart-sidebar__body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cpc-cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cpc-cart-sidebar.active {
        right: 0;
    }
}

