/* Cart Sidebar - Menu Lateral do Carrinho */

/* Overlay */
.ss-cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.ss-cart-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Sidebar Container */
.ss-cart-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 450px !important;
    height: 100% !important;
    background: linear-gradient(180deg, #1a1b23 0%, #0f1015 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: visible !important;
    opacity: 1 !important;
}

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

/* Header */
.ss-cart-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(111, 129, 255, 0.2);
    background: rgba(26, 27, 35, 0.95);
}

.ss-cart-sidebar__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.ss-cart-sidebar__title-icon {
    font-size: 24px;
}

.ss-cart-sidebar__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    transition: all 0.2s ease;
}

.ss-cart-sidebar__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Body */
.ss-cart-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ss-cart-sidebar__body::-webkit-scrollbar {
    width: 8px;
}

.ss-cart-sidebar__body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.ss-cart-sidebar__body::-webkit-scrollbar-thumb {
    background: rgba(111, 129, 255, 0.3);
    border-radius: 4px;
}

.ss-cart-sidebar__body::-webkit-scrollbar-thumb:hover {
    background: rgba(111, 129, 255, 0.5);
}

/* Empty State */
.ss-cart-sidebar__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.ss-cart-sidebar__empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.ss-cart-sidebar__empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.ss-cart-sidebar__empty-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

/* Cart Items */
.ss-cart-sidebar__items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ss-cart-item {
    background: rgba(26, 27, 35, 0.6);
    border: 1px solid rgba(111, 129, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.2s ease;
}

.ss-cart-item:hover {
    border-color: rgba(111, 129, 255, 0.4);
    background: rgba(26, 27, 35, 0.8);
}

.ss-cart-item__image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.ss-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ss-cart-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.ss-cart-item__info {
    flex: 1;
    min-width: 0;
}

.ss-cart-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-cart-item__price {
    font-size: 16px;
    font-weight: 700;
    color: #6fc8ff;
}

.ss-cart-item__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.ss-cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 4px;
}

/* Quantidade fixa (produtos únicos) */
.ss-cart-item__quantity-fixed {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.ss-quantity-fixed-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.ss-quantity-fixed-label strong {
    color: #fff;
    font-size: 14px;
    margin-left: 4px;
}

.ss-cart-item__qty-btn {
    background: rgba(111, 129, 255, 0.2);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.ss-cart-item__qty-btn:hover {
    background: rgba(111, 129, 255, 0.4);
}

.ss-cart-item__qty-btn:active {
    transform: scale(0.9);
}

.ss-cart-item__qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.ss-cart-item__remove {
    background: none;
    border: none;
    color: rgba(239, 68, 68, 0.8);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
}

.ss-cart-item__remove:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Footer */
.ss-cart-sidebar__footer {
    padding: 20px;
    background: rgba(26, 27, 35, 0.95);
    border-top: 1px solid rgba(111, 129, 255, 0.2);
}

.ss-cart-sidebar__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.ss-cart-sidebar__subtotal-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.ss-cart-sidebar__subtotal-value {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.ss-cart-sidebar__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ss-cart-sidebar__total-label {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.ss-cart-sidebar__total-value {
    font-size: 24px;
    font-weight: 800;
    color: #4ade80;
}

.ss-cart-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ss-cart-sidebar__checkout-btn {
    background: linear-gradient(135deg, var(--ss-primary-600, #6f81ff) 0%, var(--ss-primary-700, #4a5fd9) 100%);
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(111, 129, 255, 0.3);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Ícone Phosphor no botão checkout do sidebar */
.ss-cart-sidebar__checkout-btn i.ph {
    font-size: 1.2rem;
}

.ss-cart-sidebar__checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 129, 255, 0.5);
    background: linear-gradient(135deg, var(--ss-primary-700, #4a5fd9) 0%, var(--ss-primary-800, #3949ab) 100%);
}

.ss-cart-sidebar__continue-btn {
    background: transparent;
    border: 2px solid rgba(111, 129, 255, 0.3);
    padding: 12px 24px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.ss-cart-sidebar__continue-btn:hover {
    border-color: #6fc8ff;
    background: rgba(111, 129, 255, 0.1);
}

/* Responsivo */
@media (max-width: 480px) {
    .ss-cart-sidebar {
        max-width: 100%;
    }
}
