/* ── Minicart right sidebar ───────────────────────────────────── */

.has-dropdown > .mini-cart,
.mini-cart {
    display: none !important;
}

.wz-minicart {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
    visibility: hidden;
}

body.wz-minicart-open {
    overflow: hidden;
}

body.wz-minicart-open .wz-minicart {
    pointer-events: auto;
    visibility: visible;
}

.wz-minicart__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 14, 42, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.38s ease;
}

body.wz-minicart-open .wz-minicart__backdrop {
    opacity: 1;
}

.wz-minicart__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #ffffff 0%, #f9f6fc 48%, #f3eef9 100%);
    box-shadow: -12px 0 48px rgba(46, 31, 83, 0.18), -2px 0 0 rgba(107, 79, 163, 0.08);
    transform: translateX(105%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

body.wz-minicart-open .wz-minicart__panel {
    transform: translateX(0);
}

/* Header */
.wz-minicart__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 20px 18px;
    background: linear-gradient(135deg, var(--primary-color, #6b4fa3) 0%, #8b6bc4 55%, #a888d8 100%);
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.wz-minicart__header::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.wz-minicart__header-main {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.wz-minicart__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.wz-minicart__title {
    margin: 0 0 2px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.wz-minicart__subtitle {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.88;
    font-weight: 500;
}

.wz-minicart__close {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.wz-minicart__close:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: scale(1.05);
}

/* Scrollable items */
.wz-minicart__items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 79, 163, 0.35) transparent;
}

.wz-minicart__items::-webkit-scrollbar {
    width: 5px;
}

.wz-minicart__items::-webkit-scrollbar-thumb {
    background: rgba(107, 79, 163, 0.35);
    border-radius: 99px;
}

/* Cart line item */
.wz-mc-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(107, 79, 163, 0.1);
    box-shadow: 0 4px 16px rgba(46, 31, 83, 0.05);
    animation: wzMcItemIn 0.35s ease both;
}

@keyframes wzMcItemIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wz-mc-item:nth-child(2) { animation-delay: 0.04s; }
.wz-mc-item:nth-child(3) { animation-delay: 0.08s; }
.wz-mc-item:nth-child(4) { animation-delay: 0.12s; }

.wz-mc-item__thumb {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 11px;
    overflow: hidden;
    border: 1px solid #f0ebf6;
    flex-shrink: 0;
    background: #f8f5fb;
}

.wz-mc-item__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wz-mc-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wz-mc-item__name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark, #2e1f53);
    text-decoration: none;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.wz-mc-item__name:hover {
    color: var(--primary-color, #6b4fa3);
}

.wz-mc-item__variant {
    font-size: 0.72rem;
    color: var(--text-muted, #7a718f);
    font-weight: 500;
}

.wz-mc-item__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.wz-mc-item__price {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--primary-color, #6b4fa3);
}

.wz-mc-item__price .bdt-icon {
    color: var(--primary-color, #6b4fa3);
}

.wz-mc-item__qty {
    font-size: 0.72rem;
    color: #9a92a8;
    font-weight: 500;
}

.wz-mc-item__addons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.wz-mc-item__addon {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.wz-mc-item__addon-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-color, #6b4fa3);
    background: rgba(107, 79, 163, 0.1);
}

.wz-mc-item__addon-meta {
    font-size: 0.72rem;
    color: #9a92a8;
}

.wz-mc-item__addon-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}

.wz-mc-item__addon-name {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a4060;
}

.wz-mc-item__addon-price {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color, #6b4fa3);
    white-space: nowrap;
}

.wz-mc-item__addon-price .bdt-icon {
    color: var(--primary-color, #6b4fa3);
}

.wz-mc-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid #e4ddf0;
    background: #fff;
    width: fit-content;
}

.wz-mc-qty--addon {
    margin-top: 4px;
}

.wz-mc-qty__btn {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: #f5f1fa;
    color: var(--primary-color, #6b4fa3);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.wz-mc-qty__btn:hover {
    background: rgba(107, 79, 163, 0.14);
}

.wz-mc-qty__value {
    min-width: 22px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-dark, #2e1f53);
}

.wz-float-cart-wrap {
    width: 90px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

/* Floating cart FAB (in dock above chat) */
.wz-float-cart {
    position: relative;
    width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    animation: wzFloatCartIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wz-float-cart__trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 90px;
    flex-shrink: 0;
}

.wz-float-cart__fab {
    position: relative;
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    padding: 0;
    cursor: pointer;
    background: transparent;
    box-shadow: 0 10px 28px rgba(var(--theme-accent-rgb, 255 193 7), 0.45);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease;
    flex-shrink: 0;
}

.wz-float-cart__fab:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 36px rgba(var(--theme-accent-rgb, 255 193 7), 0.55);
}

.wz-float-cart__fab-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgb(var(--theme-accent-rgb, 255 193 7));
    color: #fff;
    overflow: hidden;
}

.wz-float-cart__icon {
    display: block;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(var(--theme-secondary-rgb, 46 31 83), 0.2));
}

.wz-float-cart__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 2;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgb(var(--theme-primary-rgb, 107 79 163));
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(var(--theme-secondary-rgb, 46 31 83), 0.25);
    border: 2px solid #fff;
    pointer-events: none;
}

.wz-float-cart__fab.is-bounce {
    animation: wzFloatCartBounce 0.7s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.wz-float-cart.is-feedback .wz-float-cart__pulse {
    animation: wzFloatCartPulse 1.2s ease-out 2;
}

.wz-float-cart.is-feedback .wz-float-cart__badge {
    animation: wzFloatCartBadgePop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes wzFloatCartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.14) translateY(-4px); }
    55% { transform: scale(0.96) translateY(0); }
    100% { transform: scale(1); }
}

@keyframes wzFloatCartPulse {
    0% {
        opacity: 0.55;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

@keyframes wzFloatCartBadgePop {
    0% { transform: scale(0.7); }
    45% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Slight overlay while add-to-cart toaster is visible */
.wz-cart-fly-overlay {
    position: fixed;
    inset: 0;
    z-index: 10070;
    background: rgba(46, 31, 83, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wz-cart-fly-overlay.is-visible {
    opacity: 1;
}

.wz-cart-fly-overlay.is-hiding {
    opacity: 0;
}

/* Top-right toaster that flies into the floating cart */
.wz-cart-fly-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    left: auto;
    z-index: 10080;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(var(--theme-primary-rgb, 107 79 163), 0.16);
    box-shadow: 0 14px 34px rgba(var(--theme-secondary-rgb, 46 31 83), 0.18);
    color: rgb(var(--theme-secondary-rgb, 46 31 83));
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition:
        opacity 0.28s ease,
        transform 0.7s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    will-change: transform, opacity;
    pointer-events: none;
}

.wz-cart-fly-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wz-cart-fly-toast.is-flying {
    /* transform/opacity driven inline toward #wz-float-dock cart */
    pointer-events: none;
}

.wz-cart-fly-toast__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb, 107 79 163), 0.12);
    color: rgb(var(--theme-primary-rgb, 107 79 163));
    font-size: 0.95rem;
}

.wz-cart-fly-toast__body {
    min-width: 0;
    flex: 1;
}

.wz-cart-fly-toast__title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 800;
    color: rgb(var(--theme-primary-rgb, 107 79 163));
    line-height: 1.2;
}

.wz-cart-fly-toast__sub {
    margin: 2px 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b5f80;
    line-height: 1.3;
}

@media (max-width: 575px) {
    .wz-cart-fly-toast {
        top: 12px;
        right: 12px;
        left: auto;
        width: min(320px, calc(100vw - 32px));
        max-width: min(320px, calc(100vw - 32px));
        min-width: 0;
    }
}

@keyframes wzFloatCartIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wz-float-cart__pulse {
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    border: 2px solid rgba(var(--theme-primary-rgb, 107 79 163), 0.45);
    animation: wzFloatCartPulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes wzFloatCartPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70%, 100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

.wz-mc-item__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #b0a8bc;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    align-self: center;
}

.wz-mc-item__remove:hover {
    color: #e05252;
    background: rgba(224, 82, 82, 0.08);
}

/* Footer */
.wz-minicart__footer {
    flex-shrink: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(107, 79, 163, 0.1);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.wz-minicart__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}

.wz-minicart__subtotal-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a718f;
}

.wz-minicart__subtotal-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark, #2e1f53);
}

.wz-minicart__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wz-minicart__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wz-minicart__btn--primary {
    background: linear-gradient(135deg, var(--primary-color, #6b4fa3) 0%, #8b6bc4 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(107, 79, 163, 0.32);
}

.wz-minicart__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(107, 79, 163, 0.4);
    color: #fff;
}

.wz-minicart__btn--ghost {
    background: #fff;
    color: var(--text-dark, #2e1f53);
    border: 1.5px solid #e4ddf0;
}

.wz-minicart__btn--ghost:hover {
    border-color: var(--primary-color, #6b4fa3);
    color: var(--primary-color, #6b4fa3);
    background: rgba(107, 79, 163, 0.04);
}

/* Empty state */
.wz-minicart__empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.wz-minicart__empty-icon {
    color: rgba(107, 79, 163, 0.35);
    margin-bottom: 16px;
}

.wz-minicart__empty-title {
    margin: 0 0 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark, #2e1f53);
}

.wz-minicart__empty-text {
    margin: 0 0 22px;
    font-size: 0.88rem;
    color: #7a718f;
    max-width: 240px;
    line-height: 1.5;
}

.wz-minicart__empty .wz-minicart__btn {
    max-width: 220px;
}

/* Cart trigger pulse when items added */
@keyframes wzCartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.food-action-btn--cart.wz-cart-pulse {
    animation: wzCartPulse 0.45s ease;
}

@media (max-width: 480px) {
    .wz-minicart__panel {
        width: 100vw;
    }

    .wz-minicart__header {
        padding: 18px 16px 14px;
    }

    .wz-mc-item {
        grid-template-columns: 64px 1fr auto;
        gap: 10px;
        padding: 10px;
    }

    .wz-mc-item__thumb {
        width: 64px;
        height: 64px;
    }
}
