/* Carrito lateral */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-sidebar.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar.is-open .cart-sidebar__overlay {
    opacity: 1;
}

.cart-sidebar__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background-color: var(--vista-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

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

.cart-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--jazzberry-jam);
    color: white;
}

.cart-sidebar__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cart-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cart-sidebar__close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-sidebar__close svg {
    width: 20px;
    height: 20px;
}

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

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--pale-sky);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cart-empty__icon {
    width: 48px;
    height: 48px;
    color: var(--jazzberry-jam);
    opacity: 0.7;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item__image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

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

.cart-item__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item__price {
    font-size: 16px;
    font-weight: 600;
    color: var(--jazzberry-jam);
    margin: 0;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-item__qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--iron);
    background: var(--white);
    color: var(--black);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cart-item__qty-btn:hover {
    background: var(--chantilly);
    border-color: var(--hopbush);
}

.cart-item__qty {
    font-size: 14px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--pale-sky);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-item__remove:hover {
    color: var(--jazzberry-jam);
    background: var(--chantilly);
}

.cart-sidebar__footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--vista-white);
}

.cart-shipping-info {
    margin-bottom: 16px;
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px 16px;
    background: white;
    border-radius: 0;
    border-left: none;
    border-top: 1px solid var(--jazzberry-jam);
    border-bottom: 1px solid var(--jazzberry-jam);
}

.cart-shipping-text {
    font-size: 14px;
    font-weight: 300;
    color: black;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

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

.cart-total__label {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.cart-total__amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--jazzberry-jam);
}

.cart-checkout {
    width: 100%;
    background: var(--jazzberry-jam);
    color: white;
    border: 2px solid var(--jazzberry-jam);
    padding: 16px 24px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(186, 11, 95, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: cart-checkout-pulse 2s ease-in-out infinite;
}

.cart-checkout span {
    display: inline-block;
}

@keyframes cart-checkout-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(186, 11, 95, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(186, 11, 95, 0.6);
        transform: scale(1.02);
    }
}



.cart-checkout:hover:not(:disabled) {
    background: var(--cardinal-pink);
    border-color: var(--cardinal-pink);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(186, 11, 95, 0.3);
}

.cart-checkout:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(186, 11, 95, 0.3);
    background: var(--jazzberry-jam);
    border-color: var(--jazzberry-jam);
}

.cart-checkout:disabled {
    background: var(--iron);
    color: var(--pale-sky);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    animation: none;
}


/* Responsive */
@media (max-width: 480px) {
    .cart-sidebar__content {
        width: 100%;
    }
}
