/* ==========================================================================
   Kinnoo slide-in cart drawer + toast
   ========================================================================== */
:root {
    --kn-primary: #f97316;
    --kn-primary-hover: #ea580c;
    --kn-text: #1c1917;
    --kn-muted: #78716c;
    --kn-border: #e7e5e4;
    --kn-bg-soft: #fff7f3;
}

/* Overlay */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
    z-index: 1200;
}

body.cart-drawer-open .cart-drawer-overlay {
    opacity: 1;
    visibility: visible;
}

/* Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 400px;
    max-width: 92vw;
    background: #fff;
    z-index: 1201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 40px -10px rgba(0, 0, 0, 0.25);
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.cart-drawer-open .cart-drawer {
    transform: translateX(0);
}

.cart-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--kn-border);
}

    .cart-drawer__head h3 {
        font-size: 1.15rem;
        font-weight: 800;
        margin: 0;
        color: var(--kn-text);
    }

.cart-drawer__close {
    border: none;
    background: none;
    font-size: 1.1rem;
    color: var(--kn-muted);
    cursor: pointer;
}

    .cart-drawer__close:hover {
        color: var(--kn-text);
    }

.cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* Items */
.mini-cart__items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-cart__item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.85rem;
    align-items: center;
}

.mini-cart__img {
    width: 56px;
    height: 56px;
    border-radius: 0.45rem;
    overflow: hidden;
    background: var(--kn-bg-soft);
}

    .mini-cart__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mini-cart__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--kn-text);
    line-height: 1.3;
}

.mini-cart__meta {
    font-size: 0.8rem;
    color: var(--kn-muted);
    margin-top: 0.15rem;
}

.mini-cart__line {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--kn-text);
}

/* Footer */
.cart-drawer .mini-cart__footer,
.mini-cart__footer {
    border-top: 1px solid var(--kn-border);
    padding: 1.25rem 1.5rem;
}

.mini-cart__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

    .mini-cart__subtotal strong {
        font-size: 1.15rem;
        color: var(--kn-primary);
    }

.mini-cart__view,
.mini-cart__checkout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.6rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.mini-cart__view {
    border: 1px solid var(--kn-border);
    color: var(--kn-text);
    margin-bottom: 0.6rem;
}

    .mini-cart__view:hover {
        border-color: var(--kn-primary);
        color: var(--kn-primary);
    }

.mini-cart__checkout {
    background: var(--kn-primary);
    color: #fff;
}

    .mini-cart__checkout:hover {
        background: var(--kn-primary-hover);
        color: #fff;
    }

/* Footer lives at the bottom of the drawer */
.cart-drawer .mini-cart__footer {
    border-top: 1px solid var(--kn-border);
}

/* Empty */
.mini-cart__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--kn-muted);
}

    .mini-cart__empty i {
        font-size: 2.75rem;
        color: var(--kn-primary);
        display: block;
        margin-bottom: 0.75rem;
    }

    .mini-cart__empty p {
        margin-bottom: 1.25rem;
    }

.mini-cart__shop {
    display: inline-block;
    background: var(--kn-primary);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
}

    .mini-cart__shop:hover {
        background: var(--kn-primary-hover);
        color: #fff;
    }

/* Toast */
.kn-toast-wrap {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kn-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--kn-text);
    color: #fff;
    padding: 0.8rem 1.1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

    .kn-toast.show {
        transform: translateX(0);
    }

    .kn-toast i {
        color: #4ade80;
        font-size: 1.1rem;
    }

.kn-toast--error {
    background: #7f1d1d;
}

    .kn-toast--error i {
        color: #fca5a5;
    }
