/* ─── Cart Sidebar ─── */

.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.is-open {
    display: block;
    opacity: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 546px;
    height: 100dvh;
    background: #fff;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
}

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

/* Header */
.cart-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 40px 28px;
    flex-shrink: 0;
}

.cart-sidebar__title {
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #2a190e;
    margin: 0;
}

.cart-sidebar__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Items list */
.cart-sidebar__items {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px;
}

/* Single cart item */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 0;
    position: relative;
}

.cart-item__divider {
    height: 1px;
    background: #efefef;
    margin: 0;
}

.cart-item__remove {
    position: absolute;
    top: 24px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__image {
    width: 131px;
    height: 131px;
    border: 1px solid #efefef;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.cart-item__image img {
    width: 70%;
    height: 98px;
    object-fit: contain;
    display: block;
}

.cart-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 28px;
}

.cart-item__name {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #2a190e;
    line-height: 1.4;
    margin: 0;
}

.cart-item__price {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #af6f44;
    margin: 0;
    line-height: 1.4;
}

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

.cart-item__qty {
    width: 80px;
    height: 44px;
    border: 1px solid #efefef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #fff;
    box-sizing: border-box;
}

.cart-item__qty span {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #2a190e;
    line-height: 1.5;
}

.cart-item__qty svg {
    flex-shrink: 0;
}

.cart-item__wishlist {
    background: none;
    border: 1px solid #efefef;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Footer */
.cart-sidebar__footer {
    flex-shrink: 0;
    padding: 0 40px 40px;
}

.cart-sidebar__divider {
    height: 1px;
    background: #efefef;
    margin-bottom: 24px;
}

.cart-sidebar__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.cart-sidebar__subtotal-label,
.cart-sidebar__subtotal-value {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #2a190e;
    line-height: 1.4;
}

.cart-sidebar__checkout {
    width: 100%;
    height: 52px;
    background: #af6f44;
    border: none;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    margin-bottom: 8px;
    display: block;
}

.cart-sidebar__viewbag {
    width: 100%;
    height: 52px;
    background: #efefef;
    border: none;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #2a190e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
    .cart-sidebar {
        width: 100vw;
    }

    .cart-sidebar__header {
        padding: 24px 20px 20px;
    }

    .cart-sidebar__items {
        padding: 0 20px;
    }

    .cart-sidebar__footer {
        padding: 0 20px 28px;
    }
}
