/* Right-side slide-out cart drawer (see footer.php + assets/js/cart-drawer.js). */

.pf-no-scroll { overflow: hidden; }

.pf-cart-drawer {
    inset: 0;
    position: fixed;
    z-index: 200;
}

.pf-cart-drawer__overlay {
    background: rgba(32, 16, 79, 0.45);
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 280ms ease;
}

.pf-cart-drawer__panel {
    background: #fff;
    box-shadow: -18px 0 40px rgba(32, 16, 79, 0.18);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 92vw;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 300ms ease;
    width: 420px;
}

.pf-cart-drawer.is-open .pf-cart-drawer__overlay { opacity: 1; }
.pf-cart-drawer.is-open .pf-cart-drawer__panel { transform: translateX(0); }

.pf-cart-drawer__header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
}

.pf-cart-drawer__header h2 { font-size: 18px; margin: 0; }

.pf-cart-drawer__close {
    background: var(--surface-tint);
    border: 0;
    border-radius: 50%;
    color: var(--text);
    height: 36px;
    width: 36px;
}

.pf-cart-drawer__close:hover { background: var(--primary); color: #fff; }

.pf-cart-drawer__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    padding: 12px 24px 24px;
}

.pf-cart-drawer__items { display: grid; gap: 16px; list-style: none; margin: 0; padding: 8px 0; }

.pf-cart-drawer__item {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 64px 1fr auto;
}

.pf-cart-drawer__item-media { border-radius: 8px; overflow: hidden; }
.pf-cart-drawer__item-media img { height: 64px; object-fit: cover; width: 64px; }

.pf-cart-drawer__item-info { display: grid; gap: 4px; min-width: 0; }
.pf-cart-drawer__item-title { color: var(--text); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-cart-drawer__item-title:hover { color: var(--primary); }
.pf-cart-drawer__item-qty { color: var(--text-light); font-size: 13px; }

.pf-cart-drawer__item-remove {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--text-light);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.pf-cart-drawer__item-remove:hover { background: #fdeaea; color: #b3261e; }

.pf-cart-drawer__subtotal {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
}

.pf-cart-drawer__subtotal strong { color: var(--primary); font-size: 17px; }

.pf-cart-drawer__actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.pf-cart-drawer__actions .pf-btn { width: 100%; }

.pf-cart-drawer__empty {
    align-items: center;
    color: var(--text-light);
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    text-align: center;
}

.pf-cart-drawer__empty i { color: var(--border); font-size: 42px; }

@media (max-width: 480px) {
    .pf-cart-drawer__panel { width: 100%; }
}
