/* =========================================================
   CART DRAWER — glass panel floating design
   ========================================================= */

.editorial-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgba(14,27,77,0.7);
    margin: 0 0 2px;
}

/* Backdrop */
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(14,27,77,0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.cart-overlay.is-visible { opacity: 1; pointer-events: all; }

/* Outer wrapper: full-screen, flex end, pointer-events none when closed */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    padding: 12px;
    pointer-events: none;
}
.cart-drawer.is-open { pointer-events: all; }

/* Glass panel */
.cart-panel {
    position: relative;
    width: min(94vw, 32rem);
    height: 100%;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 20px 60px rgba(14,27,77,0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(2.5rem);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.cart-drawer.is-open .cart-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* Header */
.cart-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(14,27,77,0.1);
    flex-shrink: 0;
}
.cart-panel__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0e1b4d;
    margin: 0;
    line-height: 1.1;
}
.cart-panel__close {
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(14,27,77,0.15);
    background: rgba(255,255,255,0.8);
    color: #0e1b4d;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.cart-panel__close:hover { background: #fff; }
.cart-panel__close svg { width: 16px; height: 16px; }

/* Scrollable body */
.cart-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cart-panel__body::-webkit-scrollbar { width: 4px; }
.cart-panel__body::-webkit-scrollbar-track { background: transparent; }
.cart-panel__body::-webkit-scrollbar-thumb { background: rgba(14,27,77,0.15); border-radius: 4px; }

/* Items container */
.cart-drawer__items:empty { display: none; }

/* Cart item card */
.cart-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255,255,255,0.9);
    border-radius: 1.5rem;
    border: 1px solid rgba(14,27,77,0.08);
    padding: 14px;
    margin-bottom: 10px;
}
.cart-item:last-child { margin-bottom: 0; }
.cart-item__image {
    flex-shrink: 0;
    width: 88px;
    aspect-ratio: 1/1;
    border-radius: 1rem;
    overflow: hidden;
    background: #f5f5f3;
}
.cart-item__image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.cart-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cart-item__name { font-size: 0.9rem; font-weight: 700; color: #0e1b4d; text-decoration: none; line-height: 1.3; margin: 0; }
.cart-item__name:hover { text-decoration: underline; }
.cart-item__variant { font-size: 0.75rem; color: rgba(14,27,77,0.45); margin: 0; }
.cart-item__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.cart-item__price { font-size: 0.9rem; font-weight: 700; color: #0e1b4d; margin: 0; }

/* Qty pill — circular style */
.qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(14,27,77,0.15);
    border-radius: 9999px;
    overflow: hidden;
    height: 36px;
}
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #0e1b4d;
    transition: background 0.15s;
    flex-shrink: 0;
}
.qty-btn:hover { background: rgba(14,27,77,0.06); }
.qty-display {
    min-width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0e1b4d;
    padding: 0 2px;
    border-left: 1px solid rgba(14,27,77,0.12);
    border-right: 1px solid rgba(14,27,77,0.12);
    line-height: 36px;
}

/* Remove (trash icon) — top right */
.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(14,27,77,0.3);
    padding: 2px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.15s;
    margin-top: -2px;
}
.remove-item:hover { color: #0e1b4d; }
.remove-item svg { display: block; }

/* Empty state */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 22rem;
    border-radius: 2rem;
    border: 1.5px dashed rgba(14,27,77,0.18);
    background: rgba(255,255,255,0.7);
    padding: 24px;
}
.cart-empty-icon {
    width: 64px; height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #0e1b4d;
    color: #fff;
    flex-shrink: 0;
}
.cart-empty-state h3 {
    margin: 20px 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0e1b4d;
}
.cart-empty-state p {
    margin: 12px 0 0;
    font-size: 0.875rem;
    color: rgba(14,27,77,0.65);
    line-height: 1.6;
    max-width: 20rem;
}
.cart-empty-btn {
    margin-top: 24px;
    display: inline-block;
    border-radius: 9999px;
    background: #0e1b4d;
    color: #fff;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.cart-empty-btn:hover { background: #12256a; }

/* Summary card */
.cart-summary {
    border-radius: 1.75rem;
    border: 1px solid rgba(14,27,77,0.1);
    background: rgba(255,255,255,0.7);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cart-summary__counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgba(14,27,77,0.65);
}
.cart-summary__subtotal-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.cart-summary__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(14,27,77,0.6);
    margin: 0;
}
.cart-drawer__subtotal-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0e1b4d;
    margin: 0;
}
.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 9999px;
    background: #0e1b4d;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.cart-checkout-btn:hover { background: #12256a; color: #fff; }
.cart-continue-btn {
    width: 100%;
    border-radius: 9999px;
    border: 1px solid rgba(14,27,77,0.18);
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0e1b4d;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}
.cart-continue-btn:hover { background: rgba(14,27,77,0.04); }

/* Recommendations */
.cart-recs { display: flex; flex-direction: column; gap: 16px; }
.cart-recs__header { display: flex; flex-direction: column; gap: 8px; }
.cart-recs__sub { font-size: 0.875rem; color: rgba(14,27,77,0.65); line-height: 1.6; margin: 0; }
.cart-recs__list { display: flex; flex-direction: column; gap: 12px; }
.cart-rec-card {
    display: flex;
    gap: 12px;
    align-items: center;
    border-radius: 1.5rem;
    border: 1px solid rgba(14,27,77,0.1);
    background: rgba(255,255,255,0.8);
    padding: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cart-rec-card:hover { transform: translateY(-2px); box-shadow: 0 30px 80px rgba(17,22,34,0.12); }
.cart-rec-card__img {
    width: 80px;
    flex-shrink: 0;
    aspect-ratio: 4/5;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(14,27,77,0.04);
}
.cart-rec-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.cart-rec-card__info { flex: 1; min-width: 0; }
.cart-rec-card__name { font-size: 0.9rem; font-weight: 700; color: #0e1b4d; margin: 0 0 4px; }
.cart-rec-card__price { font-size: 0.8rem; color: rgba(14,27,77,0.55); margin: 0; font-weight: 600; }
