/* ==========================================================================
   Velento Cart Drawer — RTL luxury side cart
   ========================================================================== */
.velento-cart-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(450px, 94vw);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    border-right: 1px solid var(--border);
    box-shadow: 24px 0 70px rgba(0, 0, 0, .20);
    transform: translateX(-105%);
    visibility: hidden;
    opacity: .96;
    z-index: 1100;
    transition: transform .24s cubic-bezier(.22, 1, .36, 1), visibility .24s ease;
    direction: rtl;
}

body.cart-active .velento-cart-drawer {
    transform: translateX(0);
    visibility: visible;
}

.velento-cart-drawer__header {
    flex: 0 0 auto;
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
}

.velento-cart-drawer__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.velento-cart-drawer__header h2 {
    font-size: 1.45rem;
    line-height: 1.3;
    font-weight: 600;
}

.velento-cart-drawer__close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: .25s ease;
}

.velento-cart-drawer__close:hover,
.velento-cart-drawer__close:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.velento-cart-drawer__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.velento-cart-items {
    padding: 10px 24px 18px;
}

.velento-cart-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.velento-cart-item__media {
    width: 82px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: color-mix(in srgb, var(--text) 5%, var(--bg));
}

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

.velento-cart-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.velento-cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.velento-cart-item__name {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.6;
}

.velento-cart-item__name:hover { color: var(--accent); }

.velento-cart-item__meta {
    margin-top: 4px;
    color: var(--secondary);
    font-size: .72rem;
    line-height: 1.7;
}

.velento-cart-item__meta dl,
.velento-cart-item__meta dd,
.velento-cart-item__meta dt { margin: 0; }

.velento-cart-item__meta dd { display: inline; }
.velento-cart-item__meta dt { display: inline; font-weight: 500; }

.velento-cart-item__remove {
    flex: 0 0 auto;
    border: 0;
    padding: 3px;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
}

.velento-cart-item__remove:hover,
.velento-cart-item__remove:focus-visible { color: #b34a4a; }

.velento-cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.velento-cart-item__price {
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
}

.velento-cart-qty {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.velento-cart-qty button,
.velento-cart-qty span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.velento-cart-qty button {
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
}

.velento-cart-qty button:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.velento-cart-qty span { font-size: .76rem; font-weight: 600; }

.velento-cart-summary {
    margin-top: auto;
    padding: 22px 24px 26px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, var(--text));
}

.velento-cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: .9rem;
}

.velento-cart-summary__row strong { font-size: 1rem; }

.velento-cart-summary__note {
    margin: 9px 0 18px;
    color: var(--secondary);
    font-size: .72rem;
    line-height: 1.8;
}

.velento-cart-drawer__actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 9px;
}

.velento-cart-drawer__primary,
.velento-cart-drawer__secondary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    transition: .25s ease;
}

.velento-cart-drawer__primary {
    background: var(--accent);
    color: #0A0A0A;
}

.velento-cart-drawer__primary:hover { transform: translateY(-1px); filter: brightness(1.04); }

.velento-cart-drawer__secondary {
    border: 1px solid var(--border);
    color: var(--text);
}

.velento-cart-drawer__secondary:hover { border-color: var(--accent); color: var(--accent); }

.velento-cart-empty {
    min-height: 100%;
    padding: 70px 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.velento-cart-empty__icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
}

.velento-cart-empty h3 { font-size: 1.1rem; margin-bottom: 9px; }
.velento-cart-empty p { max-width: 280px; margin-bottom: 24px; color: var(--secondary); font-size: .78rem; line-height: 1.9; }

body.cart-active .site-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.cart-active,
body.search-active { overflow: hidden; }

/* ---------- Mobile: bottom sheet, not a full-screen takeover ----------
   Same breakpoint/sizing as the login drawer (components/login-drawer.css)
   so both feel identical on phones: a compact sheet over part of the
   screen, sliding up from the bottom, rather than covering everything. */
@media (max-width: 640px) {
    .velento-cart-drawer {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 82vh;
        border-right: none;
        border-top: 1px solid var(--border);
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -18px 50px rgba(0, 0, 0, .28);
        transform: translateY(100%);
        padding-top: 14px;
    }

    body.cart-active .velento-cart-drawer {
        transform: translateY(0);
    }

    .velento-cart-drawer::before {
        content: "";
        position: absolute;
        top: 10px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 4px;
        border-radius: 999px;
        background: var(--border);
    }

    .velento-cart-drawer__header,
    .velento-cart-items,
    .velento-cart-summary {
        padding-inline: 20px;
    }
}
