/* ============================================================
   shopin.city — anteprima laterale del carrello
   ============================================================ */

.drawer-veil {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(3, 5, 10, .62);
    -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .24s var(--ease);
}

.drawer-veil.is-open { opacity: 1; }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 111;
    display: flex;
    flex-direction: column;
    width: min(420px, 100%);
    background: var(--d-surface, #101219);
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 60px rgba(0, 0, 0, .55);
    transform: translateX(100%);
    transition: transform .26s var(--ease);
}

.drawer.is-open { transform: none; }

body.drawer-open { overflow: hidden; }

/* -------------------------------------------------- testata */

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
}

.drawer-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--ink);
}

.drawer-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.drawer-close:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }

/* --------------------------------------------------- corpo */

.drawer-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.drawer-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 18px 12px;
}

.drawer-group + .drawer-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.drawer-shop {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 10px;
    font-size: .84rem;
    color: var(--ink);
}

.drawer-shop-mono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: #fff;
    color: var(--shop-color, #16245F);
    font-size: .68rem;
    font-weight: 800;
    overflow: hidden;
}

.drawer-shop-mono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.drawer-shop-city {
    display: block;
    font-size: .72rem;
    color: var(--muted);
    font-weight: 500;
}

.drawer-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
}

.drawer-row + .drawer-row { border-top: 1px solid var(--line); }

.drawer-thumb {
    flex: none;
    width: 58px;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    background: #EDEFF3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    font-weight: 800;
}

.drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }

.drawer-row-main { flex: 1 1 auto; min-width: 0; }

.drawer-row-name {
    margin: 0;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.drawer-row-meta {
    margin: 2px 0 0;
    font-size: .74rem;
    color: var(--muted);
}

.drawer-row-price {
    margin: 4px 0 0;
    font-size: .88rem;
    font-weight: 800;
    color: var(--ink);
}

.drawer-remove {
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.drawer-remove:hover { background: rgba(255, 255, 255, .08); color: var(--danger); }

/* --------------------------------------------------- piede */

.drawer-foot {
    flex: none;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--d-surface-2, #171A26);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0;
    font-size: .92rem;
    color: var(--muted);
}

.drawer-total strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
}

.drawer-note {
    margin: 0;
    font-size: .74rem;
    line-height: 1.45;
    color: var(--muted);
}

.drawer-note strong { color: var(--ink); font-weight: 700; }

/* --------------------------------------------------- vuoto */

.drawer-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 28px 22px;
    text-align: center;
}

.drawer-empty-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink);
}

.drawer-empty-text {
    margin: 0 0 8px;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--muted);
}

@media (max-width: 620px) {
    .drawer { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .drawer, .drawer-veil { transition: none; }
}
