/* CASALINDA MINICART V1 */

#cart-drawer.cl-minicart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;

    flex-direction: column;

    width: min(440px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;

    margin: 0 0 0 auto;
    padding: 0;
    overflow: hidden;

    border: 0;
    border-radius: 0;
    background: #fff;
    color: #10283c;

    box-shadow: -12px 0 34px rgba(8, 28, 43, .16);
}

#cart-drawer.cl-minicart:not([open]) {
    display: none;
}

#cart-drawer.cl-minicart[open] {
    display: flex;
}

#cart-drawer.cl-minicart::backdrop {
    background: rgba(7, 20, 31, .56);
}


/* HEADER */

#cart-drawer .cl-minicart__header {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 66px;
    padding: 0 18px;

    border-bottom: 1px solid #dce4e8;
    background: #fff;
}

#cart-drawer .cl-minicart__title {
    margin: 0;

    color: #10283c;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 900;
}

#cart-drawer .cl-minicart__count {
    display: block;
    margin-top: 3px;

    color: #71818a;
    font-size: 10px;
    font-weight: 700;
}

#cart-drawer .cl-minicart__close {
    display: flex;
    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #10283c;
}

#cart-drawer .cl-minicart__close:hover {
    background: #f1f4f6;
}


/* ITEMS AREA */

#cart-drawer .cl-minicart__items {
    flex: 1 1 auto;
    min-height: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 0;
    padding: 12px;

    overflow-y: auto;
    overscroll-behavior: contain;

    background: #f3f6f7;
    list-style: none;
}


/* CARD */

#cart-drawer .cl-minicart__card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;

    margin: 0;
    padding: 12px;

    border: 1px solid #dce4e8;
    border-radius: 8px;

    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 40, 60, .035);
}

#cart-drawer .cl-minicart__image {
    display: flex;
    width: 72px;
    height: 72px;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #edf1f3;
    border-radius: 6px;

    background: #fff;
}

#cart-drawer .cl-minicart__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#cart-drawer .cl-minicart__content {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 9px;
}

#cart-drawer .cl-minicart__product-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;

    align-items: start;
}

#cart-drawer .cl-minicart__product-name {
    min-width: 0;
    margin: 0;

    color: #10283c;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
}

#cart-drawer .cl-minicart__price {
    white-space: nowrap;

    color: #10283c;
    font-size: 12px;
    font-weight: 900;
}

#cart-drawer .cl-minicart__price .price-label {
    display: none !important;
}

#cart-drawer .cl-minicart__details {
    margin: 0;

    color: #687b86;
    font-size: 10px;
    line-height: 1.35;
}

#cart-drawer .cl-minicart__details > div {
    display: flex;
    gap: 5px;
}

#cart-drawer .cl-minicart__details dt {
    font-weight: 500;
}

#cart-drawer .cl-minicart__details dd {
    margin: 0;
    font-weight: 700;
}


/* CONTROLS */

#cart-drawer .cl-minicart__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: auto;
}

#cart-drawer .cl-minicart__qty {
    display: grid;
    grid-template-columns: 31px 34px 31px;

    height: 32px;
    overflow: hidden;

    border: 1px solid #ccd7dd;
    border-radius: 6px;

    background: #fff;
}

#cart-drawer .cl-minicart__qty-button {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;

    background: #fff;
    color: #10283c;

    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}

#cart-drawer .cl-minicart__qty-button:hover:not(:disabled) {
    background: #f2f5f7;
}

#cart-drawer .cl-minicart__qty-button:disabled {
    opacity: .3;
    cursor: default;
}

#cart-drawer .cl-minicart__qty-value {
    display: flex;
    align-items: center;
    justify-content: center;

    border-right: 1px solid #e2e8eb;
    border-left: 1px solid #e2e8eb;

    color: #10283c;
    font-size: 12px;
    font-weight: 900;
}

#cart-drawer .cl-minicart__actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

#cart-drawer .cl-minicart__icon-button {
    display: flex;
    width: 34px;
    height: 34px;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #d5dfe4;
    border-radius: 6px;

    background: #fff;
    color: #315d7d;
}

#cart-drawer .cl-minicart__icon-button:hover {
    background: #f2f6f8;
}

#cart-drawer .cl-minicart__remove {
    color: #b42318;
}

#cart-drawer .cl-minicart__remove:hover {
    border-color: #ecc7c3;
    background: #fff3f2;
}

#cart-drawer .cl-minicart__error {
    margin-top: 2px;
    font-size: 10px;
}


/* FOOTER */

#cart-drawer .cl-minicart__footer {
    flex: 0 0 auto;

    padding: 15px 16px 17px;

    border-top: 1px solid #dce4e8;
    background: #fff;

    box-shadow: 0 -5px 16px rgba(16, 40, 60, .045);
}

#cart-drawer .cl-minicart__subtotal {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;

    margin: 0;

    color: #10283c;
}

#cart-drawer .cl-minicart__subtotal dt {
    font-size: 12px;
    font-weight: 700;
}

#cart-drawer .cl-minicart__subtotal dd {
    margin: 0;

    font-size: 18px;
    font-weight: 900;
}

#cart-drawer .cl-minicart__footer-actions {
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: 9px;

    margin-top: 13px;
}

#cart-drawer .cl-minicart__btn {
    display: flex;

    min-height: 43px;

    align-items: center;
    justify-content: center;

    padding: 0 13px;

    border-radius: 6px;

    font-size: 11px;
    line-height: 1.15;
    font-weight: 900;

    text-decoration: none !important;
}

#cart-drawer .cl-minicart__btn-cart {
    border: 1px solid #315d7d;

    background: #fff;
    color: #315d7d;
}

#cart-drawer .cl-minicart__btn-cart:hover {
    background: #f2f6f8;
}

#cart-drawer .cl-minicart__btn-checkout {
    border: 1px solid #f7dc3d;

    background: #f7dc3d;
    color: #10283c;
}

#cart-drawer .cl-minicart__btn-checkout:hover {
    background: #efd329;
}


/* EMPTY */

#cart-drawer .cl-minicart__empty {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 30px;

    color: #647883;
    text-align: center;
}

#cart-drawer .cl-minicart__empty-icon {
    opacity: .22;
}

#cart-drawer .cl-minicart__empty strong {
    margin-top: 18px;

    color: #10283c;
    font-size: 16px;
}

#cart-drawer .cl-minicart__empty-button {
    margin-top: 16px;
    min-height: 40px;

    padding: 0 18px;

    border: 0;
    border-radius: 6px;

    background: #f7dc3d;
    color: #10283c;

    font-size: 11px;
    font-weight: 900;
}


/* MOBILE */

@media (max-width: 520px) {

    #cart-drawer.cl-minicart {
        width: min(94vw, 420px);
    }

    #cart-drawer .cl-minicart__header {
        min-height: 60px;
        padding: 0 14px;
    }

    #cart-drawer .cl-minicart__items {
        padding: 9px;
    }

    #cart-drawer .cl-minicart__card {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 10px;

        padding: 10px;
    }

    #cart-drawer .cl-minicart__image {
        width: 64px;
        height: 64px;
    }

    #cart-drawer .cl-minicart__footer {
        padding: 13px 12px 14px;
    }
}

/* CASALINDA MINICART - hide tax renderer labels */
#cart-drawer .price-excluding-tax::before,
#cart-drawer .price-excluding-tax::after,
#cart-drawer .price-including-tax::before,
#cart-drawer .price-including-tax::after {
    display: none !important;
    content: none !important;
}

#cart-drawer .price-excluding-tax,
#cart-drawer .price-including-tax {
    white-space: nowrap;
}
