/* Kenouz cart presentation: scoped to the cart page. */
@media (max-width: 1023.98px) {
    body:has(.kn-cart-page) {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .kn-cart-page {
        margin-bottom: 0 !important;
        padding-block: 12px 24px !important;
        background: #f8f5ec;
    }

    .kn-cart-shell {
        padding-inline: clamp(10px, 3vw, 20px);
    }

    .kn-cart-shell > h4 {
        margin-bottom: 14px !important;
        color: #173f2d;
        font-size: clamp(20px, 5.2vw, 25px);
        font-weight: 800;
    }

    .kn-cart-shell .row.gy-3 {
        --bs-gutter-y: 14px;
    }

    .kn-cart-products-card,
    .kn-cart-shell > form > .row > .col-lg-4 > .card {
        height: auto !important;
        border: 1px solid rgba(23, 63, 45, .1);
        border-radius: 16px;
        background: #fffdf8;
        box-shadow: 0 10px 28px rgba(23, 63, 45, .07);
    }

    .kn-cart-products-card > .card-body {
        padding: 13px !important;
    }

    .kn-cart-products-card .cart-step-list {
        margin-bottom: 0;
    }

    .kn-cart-products-card .bg-light {
        background: #f3f0e6 !important;
    }

    .kn-cart-mobile-list {
        gap: 10px;
    }

    .kn-cart-mobile-item {
        position: relative;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px !important;
        padding: 12px !important;
        border: 1px solid rgba(23, 63, 45, .1) !important;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(23, 63, 45, .055);
    }

    .kn-cart-mobile-item__main {
        width: 100%;
        min-width: 0;
        align-items: flex-start !important;
    }

    .kn-cart-mobile-item__main > .shop-item-check {
        margin-top: 28px;
        flex: 0 0 auto;
    }

    .kn-cart-mobile-item__media {
        width: 100%;
        min-width: 0;
        align-items: flex-start !important;
    }

    .kn-cart-mobile-item__image {
        --size: clamp(68px, 19vw, 80px) !important;
        width: var(--size) !important;
        height: var(--size) !important;
        flex: 0 0 var(--size);
        border-color: rgba(23, 63, 45, .09) !important;
        border-radius: 11px !important;
        background: #fffdf8;
    }

    .kn-cart-mobile-item__image img {
        width: 100%;
        height: 100%;
        padding: 5px;
        object-fit: contain !important;
    }

    .kn-cart-mobile-item__body {
        min-width: 0;
        gap: 3px !important;
        padding-inline-start: 2px;
    }

    .kn-cart-mobile-item__title {
        min-height: 0;
        margin: 0;
        color: #173f2d;
        font-size: 14px !important;
        font-weight: 750;
        line-height: 1.5;
    }

    .kn-cart-mobile-item__title a {
        color: inherit;
    }

    .kn-cart-mobile-item__body .fs-12 {
        color: #66776d !important;
        line-height: 1.5;
    }

    .kn-cart-mobile-item__unit {
        margin-top: 2px;
    }

    .kn-cart-mobile-item__discount {
        display: none;
    }

    .kn-cart-mobile-item__total {
        margin-top: 5px;
        color: #173f2d !important;
        font-size: 13px !important;
    }

    .kn-cart-mobile-item__quantity {
        width: max-content;
        min-width: 126px;
        height: 42px;
        flex-direction: row !important;
        justify-self: end;
        overflow: hidden;
        border: 1px solid rgba(23, 63, 45, .16) !important;
        border-radius: 10px !important;
        background: #fffdf8;
    }

    .kn-cart-mobile-item__quantity .quantity__minus,
    .kn-cart-mobile-item__quantity .quantity__plus {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        flex: 0 0 42px;
    }

    .kn-cart-mobile-item__quantity .quantity__qty {
        width: 42px;
        height: 40px;
        border: 0;
        border-inline: 1px solid rgba(23, 63, 45, .1);
        text-align: center;
    }

    .kn-cart-page .free-delivery-area {
        margin-top: 10px;
        border: 1px solid rgba(166, 124, 62, .14);
        background: #fff8e8 !important;
    }

    .kn-cart-shell > form > .row > .col-lg-4 {
        width: 100%;
    }

    .kn-cart-shell > form > .row > .col-lg-4 .card-body {
        gap: 10px !important;
        padding: 17px !important;
    }

    .kn-cart-shell > form > .row > .col-lg-4 h4 {
        color: #173f2d;
        font-size: 19px;
        font-weight: 800;
    }

    .kn-cart-shell #proceed-to-next-action {
        width: 100%;
        min-height: 48px;
        border-radius: 11px;
        background: #173f2d;
        color: #fff;
        font-weight: 800;
    }

    .kn-cart-shell #proceed-to-next-action ~ *,
    .kn-cart-shell #proceed-to-payment-action ~ * {
        max-width: 100%;
    }

    body:has(.kn-cart-page) .feature-secton .container {
        padding-block: 10px !important;
    }

    body:has(.kn-cart-page) .feature-section-inner {
        padding: 12px;
        border-radius: 14px;
    }

    body:has(.kn-cart-page) .feature-secton .row {
        --bs-gutter-y: 6px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body:has(.kn-cart-page) .feature-secton .col-sm-6 {
        width: auto;
        padding-inline: 4px;
    }

    body:has(.kn-cart-page) .feature-secton .col-sm-6:nth-child(4) {
        display: none;
    }

    body:has(.kn-cart-page) .feature-secton .media {
        justify-content: center;
        gap: 5px !important;
        margin: 0 !important;
        text-align: center;
    }

    body:has(.kn-cart-page) .feature-secton .feature-icon-wrap {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    body:has(.kn-cart-page) .feature-secton h2 {
        margin: 0 !important;
        color: #173f2d;
        font-size: 10px;
        line-height: 1.35;
    }

    body:has(.kn-cart-page) .feature-secton p {
        display: none;
    }

    body:has(.kn-cart-page) .social-chat-icons {
        inset-block-end: calc(90px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 420px) {
    .kn-cart-mobile-item__main > .shop-item-check {
        margin-inline-end: 0;
    }

    .kn-cart-mobile-item__quantity {
        min-width: 120px;
    }

    body:has(.kn-cart-page) .feature-secton .media {
        flex-direction: column;
    }
}

@media (min-width: 1024px) {
    .kn-cart-page .kn-cart-shell {
        padding-bottom: 8px;
    }
}


/* Enforce the requested 1024px cart presentation boundary. */
@media (max-width: 1023.98px) {
    .kn-cart-products-card .table-responsive.d-lg-block { display: none !important; }
    .kn-cart-products-card .kn-cart-mobile-list.d-lg-none { display: flex !important; }
    .kn-cart-shell > form > .row > .col-lg-4 .card-body > .mt-3.d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    .kn-cart-shell #proceed-to-next-action { order: 1; }
    .kn-cart-shell > form > .row > .col-lg-4 .card-body > .mt-3.d-flex > .btn-link {
        order: 2;
        align-self: center;
        font-size: 13px;
    }
}
@media (min-width: 1024px) {
    .kn-cart-products-card .table-responsive.d-lg-block { display: block !important; }
    .kn-cart-products-card .kn-cart-mobile-list.d-lg-none { display: none !important; }
}
