/*
 * NetPear Commerce — Mini Cart V2
 * Dedicated component styles.
 */

/* Drawer */

body .npc-cart-drawer {
    width: min(440px, 100vw) !important;
    height: 100dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    z-index: 2147483646 !important;
}

body .npc-cart-backdrop {
    z-index: 2147483645 !important;
}

.npc-cart-drawer .npc-drawer-head {
    flex: 0 0 auto !important;
    padding: 24px !important;
    margin: 0 !important;
    border-bottom: 1px solid #e8eeea !important;
}

.npc-cart-drawer .npc-drawer-head h2 {
    font-size: 25px !important;
    letter-spacing: -.04em !important;
}

.npc-cart-drawer .npc-drawer-status {
    flex: 0 0 auto !important;
    padding: 0 24px !important;
}

.npc-cart-drawer .npc-mini-cart-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.npc-cart-drawer .npc-drawer-footnote {
    display: none !important;
}

/* Content structure */

.npc-cart-drawer .npc-mc {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    font-family: Poppins, Arial, sans-serif;
}

.npc-cart-drawer .npc-mc-summary {
    flex: 0 0 auto;
    padding: 13px 24px;
    background: #f7faf8;
    border-bottom: 1px solid #e8eeea;
}

.npc-cart-drawer .npc-mc-summary-label {
    color: #638070;
    font-size: 12px;
    font-weight: 600;
}

.npc-cart-drawer .npc-mc-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 24px 24px;
}

.npc-cart-drawer .npc-mc-item {
    padding: 20px 0;
    border-bottom: 1px solid #e8eeea;
}

.npc-cart-drawer .npc-mc-product {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
}

.npc-cart-drawer .npc-mc-thumb {
    width: 78px;
    height: 78px;
    border-radius: 12px;
    background: #f1f7f3;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #218b57;
}

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

.npc-cart-drawer .npc-mc-thumb svg {
    width: 37px;
    height: 37px;
}

.npc-cart-drawer .npc-mc-product-info {
    min-width: 0;
}

.npc-cart-drawer .npc-mc-product-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.npc-cart-drawer .npc-mc-name {
    display: block;
    color: #193e2a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.npc-cart-drawer .npc-mc-name:hover {
    color: #218b57;
}

.npc-cart-drawer .npc-mc-remove {
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f3f5f3;
    color: #778b7e;
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
}

.npc-cart-drawer .npc-mc-remove:hover {
    background: #fbeaea;
    color: #ba4343;
}

.npc-cart-drawer .npc-mc-quantity {
    display: block;
    margin-top: 7px;
    color: #718578;
    font-size: 12px;
}

.npc-cart-drawer .npc-mc-price {
    margin-top: 9px;
    font-size: 18px;
    font-weight: 750;
    color: #193e2a;
}

/* Collapsible configuration */

.npc-cart-drawer .npc-mc-options {
    margin-top: 15px;
    border: 1px solid #e1ebe4;
    border-radius: 10px;
    background: #f8fbf9;
    overflow: hidden;
}

.npc-cart-drawer .npc-mc-options summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    color: #26774d;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
}

.npc-cart-drawer .npc-mc-options summary::-webkit-details-marker {
    display: none;
}

.npc-cart-drawer .npc-mc-options[open] summary svg {
    transform: rotate(180deg);
}

.npc-cart-drawer .npc-mc-options-body {
    padding: 0 14px 14px;
    border-top: 1px solid #e6eee8;
}

.npc-cart-drawer .npc-mc-options-body .variation {
    margin: 12px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.npc-cart-drawer .npc-mc-options-body dt {
    display: block !important;
    float: none !important;
    margin: 12px 0 3px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #355a43 !important;
}

.npc-cart-drawer .npc-mc-options-body dd {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    font-size: 12px !important;
    color: #64786b !important;
    overflow-wrap: anywhere;
}

.npc-cart-drawer .npc-mc-options-body p {
    margin: 0 !important;
    font-size: inherit !important;
    line-height: 1.6 !important;
}

/* Fixed checkout section */

.npc-cart-drawer .npc-mc-footer {
    flex: 0 0 auto;
    padding: 20px 24px 24px;
    border-top: 1px solid #e5ece7;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(12, 35, 20, .035);
}

.npc-cart-drawer .npc-mc-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #24432f;
    font-size: 15px;
    font-weight: 650;
}

.npc-cart-drawer .npc-mc-subtotal strong {
    font-size: 23px;
    font-weight: 750;
    color: #183c27;
}

.npc-cart-drawer .npc-mc-tax-note {
    margin: 10px 0 20px;
    font-size: 11px;
    line-height: 1.6;
    color: #819187;
}

.npc-cart-drawer .npc-mc-checkout,
.npc-cart-drawer .npc-mc-view-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    width: 100%;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: background .2s ease;
}

.npc-cart-drawer .npc-mc-checkout {
    background: #218f59;
    color: #fff;
}

.npc-cart-drawer .npc-mc-checkout:hover {
    background: #176c43;
    color: #fff;
}

.npc-cart-drawer .npc-mc-view-cart {
    margin-top: 10px;
    background: #fff;
    color: #20593a;
    border: 1px solid #d6e5db;
}

.npc-cart-drawer .npc-mc-view-cart:hover {
    background: #f3f8f4;
}

.npc-cart-drawer .npc-mc-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    font-size: 11px;
    color: #819187;
}

.npc-cart-drawer .npc-mc-empty {
    padding: 60px 10px;
    text-align: center;
}

.npc-cart-drawer .npc-mc-empty-icon {
    font-size: 38px;
    color: #218f59;
}

.npc-cart-drawer .npc-mc-empty h3 {
    margin: 15px 0 8px;
    font-size: 19px;
    color: #254532;
}

.npc-cart-drawer .npc-mc-empty p {
    font-size: 13px;
    line-height: 1.7;
    color: #718578;
}

.npc-cart-drawer .npc-mc-empty a {
    display: inline-flex;
    margin-top: 18px;
    padding: 12px 20px;
    border-radius: 9px;
    background: #218f59;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

/* Mobile */

@media (max-width: 560px) {

    body .npc-cart-drawer {
        width: 100vw !important;
    }

    .npc-cart-drawer .npc-drawer-head {
        padding: 18px !important;
    }

    .npc-cart-drawer .npc-mc-summary {
        padding: 12px 18px;
    }

    .npc-cart-drawer .npc-mc-items {
        padding: 5px 18px 18px;
    }

    .npc-cart-drawer .npc-mc-footer {
        padding: 17px 18px calc(17px + env(safe-area-inset-bottom));
    }

    .npc-cart-drawer .npc-mc-product {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
    }

    .npc-cart-drawer .npc-mc-thumb {
        width: 64px;
        height: 64px;
    }
}
