.sidebar-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: min(380px, 92vw);
    max-width: 92vw;
    height: 100vh;
    background-color: #FFFFFF;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    z-index: 1050;
}

.sidebar-cart.open {
    transform: translateX(0);
}

.cart-header {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

#closeCartBtn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.3rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* FREE SHIPPING TRACKER */
.shipping-progress-box {
    background: #FFF9F4;
    border-bottom: 1px solid #F0ECE4;
    padding: 12px 18px;
}

.shipping-progress-text {
    font-size: 0.8rem;
    margin-bottom: 6px;
    color: #4A3E34;
}

.shipping-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #E8E2D9;
    border-radius: 3px;
    overflow: hidden;
}

.shipping-progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-empty-view {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-muted);
}

.cart-empty-view .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #F0ECE6;
    padding: 12px 0;
}

.cart-item-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #FAF7F2;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #ECE4D8;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 2px 0;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.cart-item-pres {
    display: block;
    font-size: 0.72rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.cart-item-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-line-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-btn {
    background-color: #F0ECE4;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-val {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.cart-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #999;
    padding: 4px;
    margin-left: 4px;
}

.cart-remove-btn:hover {
    color: #D32F2F;
}

.cart-footer {
    padding: 18px 20px;
    border-top: 1px solid #EAE1D5;
    background-color: #FAF8F5;
}

.subtotal {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    color: var(--text-dark);
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(224, 74, 29, 0.25);
    transition: background-color 0.15s;
}

.checkout-btn:hover {
    background-color: var(--primary-hover);
}

@media (max-width: 480px) {
    .sidebar-cart {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
    }
}

