﻿:root {
    --kcs-green: #2cb978;
    --kcs-green-dark: #2cb978;
    --kcs-text: #1f2a37;
    --kcs-muted: #6b7280;
    --kcs-line: #e5e7eb;
}

/* Light backdrop: tap outside to close */
.kc-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    .kc-sheet-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

/* Mini cart panel under the header cart icon (like the online site) */
/* .kc-sheet is a layer as wide as the .mobile-app column; the white panel sits on its right.
   --kc-app-left and --kc-app-width are set by cart.js, so the panel stays inside the mobile view. */
.kc-sheet {
    position: fixed;
    top: 76px;
    left: var(--kc-app-left, 0px);
    width: var(--kc-app-width, 100vw);
    z-index: 1001;
    display: flex;
    justify-content: flex-end;
    padding: 0 12px;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

    .kc-sheet.is-open {
        opacity: 1;
        transform: none;
        visibility: visible;
    }

.kc-sheet-body {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(340px, 100%);
    max-height: 75vh;
    color: var(--kcs-text);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

/* Round close icon on the top-left corner */
.kc-mini-close {
    position: absolute;
    top: -10px;
    left: -8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #cfd4da;
    border-radius: 50%;
    background: #fff;
    color: #777;
    font-size: 12px;
    line-height: 1;
}

.kc-mini-list {
    flex: 1;
    min-height: 0;
    max-height: 50vh;
    margin: 0;
    padding: 12px 16px 4px;
    overflow-y: auto;
    list-style: none;
}

.kc-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 12px;
}

    .kc-mini-item img {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        object-fit: cover;
        border: 1px solid var(--kcs-line);
        border-radius: 4px;
        background: #f3f4f6;
    }

.kc-mini-info {
    flex: 1;
    min-width: 0;
}

    .kc-mini-info strong {
        display: block;
        font-size: 15px;
        line-height: 1.3;
    }

    .kc-mini-info span {
        display: block;
        margin-top: 2px;
        font-size: 14px;
        font-weight: 600;
    }

.kc-mini-remove {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 18px;
}

.kc-mini-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--kcs-line);
}

/* Buttons */
.kc-btn {
    display: block;
    padding: 12px 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 6px;
}

.kc-btn-fill {
    color: #fff;
    background: var(--kcs-green);
    border-color: var(--kcs-green);
}

.kc-btn-dark {
    color: #fff;
    background: #111;
    border-color: #111;
}

/* Empty state (mini cart and cart page) */
.kc-sheet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px 24px;
    text-align: center;
    color: var(--kcs-muted);
}

    .kc-sheet-empty i {
        font-size: 34px;
        color: var(--kcs-green);
    }

    .kc-sheet-empty p {
        margin: 0 0 6px;
        font-size: 15px;
    }

    .kc-sheet-empty .kc-btn {
        min-width: 200px;
    }

/* Cart page lines (My cart) */
.kc-cart-lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kc-cart-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--kcs-line);
}

    .kc-cart-line:last-child {
        border-bottom: 0;
    }

    .kc-cart-line img {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        object-fit: cover;
        border-radius: 10px;
        background: #f3f4f6;
    }

.kc-cart-line-info {
    flex: 1;
    min-width: 0;
}

    .kc-cart-line-info strong {
        display: block;
        font-size: 14px;
        line-height: 1.3;
    }

    .kc-cart-line-info > span {
        display: block;
        margin: 2px 0 8px;
        font-size: 12.5px;
        color: var(--kcs-muted);
    }

.kc-cart-line-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-size: 14px;
    white-space: nowrap;
}

.kc-cart-remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--kcs-muted);
    font-size: 13px;
}

.kc-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--kcs-line);
    border-radius: 999px;
    overflow: hidden;
}

    .kc-qty button {
        width: 32px;
        height: 30px;
        border: 0;
        background: #fff;
        font-size: 18px;
        line-height: 1;
        color: var(--kcs-green);
    }

        .kc-qty button:disabled {
            opacity: 0.4;
        }

    .kc-qty span {
        min-width: 28px;
        text-align: center;
        font-size: 14px;
        font-weight: 700;
    }
.kc-co-bar {
    left: var(--kc-app-left, 0px);
    right: auto;
    width: var(--kc-app-width, 100%);
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}