/* Cart Off-Sidebar Styles */
.cpc-cart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 360px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 999999 !important;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
}

.cpc-cart-sidebar.active {
    transform: translateX(0) !important;
    visibility: visible !important;
}

.cpc-cart-sidebar__overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999998 !important;
}

.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: -4px 0 24px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    z-index: 999999 !important;
    overflow: hidden;
}

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

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

.cpc-cart-sidebar__count {
    color: #64748b;
    font-weight: 500;
}

.cpc-cart-sidebar__close {
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    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: 14px;
    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;
    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: 14px;
}
.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: 12px;
    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__actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cpc-cart-sidebar__btn-viewcart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.cpc-cart-sidebar__btn-viewcart:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cpc-cart-sidebar__checkout-btn {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    background: #e21736;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(226, 23, 54, 0.25);
}

.cpc-cart-sidebar__checkout-btn:hover {
    background: #c8132e;
    color: #ffffff;
}


@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% !important;
        max-width: 100% !important;
        right: 0 !important;
        transform: translateX(100%);
        z-index: 999999 !important;
    }
    
    .cpc-cart-sidebar.active {
        transform: translateX(0) !important;
    }

    .cpc-cart-sidebar__overlay {
        z-index: 999998 !important;
    }

    .cpc-cart-sidebar__content {
        z-index: 999999 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .cpc-cart-sidebar__footer {
        padding: 12px 14px 18px 14px !important;
    }
}

