/*
Theme Name: Asalat Alotoor
Section: Custom WooCommerce Cart
PATCH-013
*/


/* =========================================================
   PAGE RESET
   ========================================================= */

body.woocommerce-cart {
    overflow-x: hidden;
}

body.woocommerce-cart #secondary,
body.woocommerce-cart .widget-area {
    display: none !important;
}

body.woocommerce-cart #primary,
body.woocommerce-cart .content-area,
body.woocommerce-cart main.site-main {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-cart .site-content .col-full {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}


/* =========================================================
   CART ROOT
   ========================================================= */

.asala-cart-page {
    direction: rtl;
    width: 100%;
    background: #ffffff;
    color: #2e201a;
}

.asala-cart-page *,
.asala-cart-page *::before,
.asala-cart-page *::after {
    box-sizing: border-box;
}

.asala-cart-container {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 70px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.asala-cart-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 30px;
}

.asala-cart-heading {
    display: flex;
    align-items: center;
    gap: 16px;
}

.asala-cart-heading-icon {
    display: grid;
    place-items: center;

    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    border-radius: 16px;

    background: #f8eee7;

    font-size: 27px;
}

.asala-cart-heading-kicker {
    display: block;

    margin-bottom: 2px;

    color: #966247;

    font-size: 13px;
    font-weight: 700;
}

.asala-cart-heading h1 {
    margin: 0;

    color: #211612;

    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.25;
    font-weight: 800;
}

.asala-cart-heading p {
    margin: 4px 0 0;

    color: #776860;

    font-size: 14px;
}

.asala-cart-continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 48px;

    padding: 0 22px;

    border: 1px solid #cfae99;
    border-radius: 10px;

    background: #fff;

    color: #762d27 !important;

    text-decoration: none !important;

    font-size: 15px;
    font-weight: 700;
}

.asala-cart-continue-shopping:hover {
    background: #fff7f2;
    color: #762d27 !important;
}


/* =========================================================
   MAIN CART LAYOUT
   ========================================================= */

.asala-cart-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(330px, 0.75fr);

    gap: 28px;

    align-items: start;
}

.asala-cart-main,
.asala-cart-sidebar {
    min-width: 0;
}


/* =========================================================
   CART FORM
   ========================================================= */

.asala-cart-form {
    margin: 0 !important;
}

.asala-cart-items {
    display: grid;
    gap: 14px;
}


/* =========================================================
   PRODUCT CART CARD
   ========================================================= */

.asala-cart-item {
    display: grid;

    grid-template-columns:
        128px
        minmax(0, 1fr)
        minmax(125px, 160px);

    gap: 18px;

    align-items: center;

    min-width: 0;

    padding: 18px;

    border: 1px solid #eadfd8;
    border-radius: 16px;

    background: #fff;

    box-shadow:
        0 3px 16px
        rgba(65, 35, 22, 0.035);
}


/* =========================================================
   PRODUCT IMAGE
   ========================================================= */

.asala-cart-item-image {
    position: relative;

    width: 128px;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    border-radius: 13px;

    background: #faf7f4;
}

.asala-cart-item-image > a {
    display: block;

    width: 100%;
    height: 100%;
}

.asala-cart-item-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    margin: 0 !important;
}

.asala-cart-item-heart {
    position: absolute;

    top: 7px;
    left: 7px;

    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    color: #522e23;

    font-size: 22px;
    line-height: 1;

    box-shadow:
        0 2px 7px
        rgba(0, 0, 0, 0.07);
}

.asala-cart-item-count-badge {
    position: absolute;

    top: 7px;
    right: 7px;

    display: none;

    min-width: 28px;
    height: 28px;

    padding: 0 7px;

    border-radius: 50px;

    background: #7d7a76;
    color: #fff;

    font-size: 12px;
    font-weight: 700;

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


/* =========================================================
   PRODUCT INFORMATION
   ========================================================= */

.asala-cart-item-info {
    min-width: 0;
}

.asala-cart-item-name {
    margin: 0 0 7px;

    color: #211713;

    font-size: 19px;
    line-height: 1.55;
    font-weight: 800;
}

.asala-cart-item-name a {
    color: inherit !important;
    text-decoration: none !important;
}

.asala-cart-item-description {
    max-width: 540px;

    margin: 5px 0 10px;

    color: #76665e;

    font-size: 13px;
    line-height: 1.8;
}

.asala-cart-item-info .variation {
    margin: 5px 0 9px;

    color: #77675f;

    font-size: 12px;
}

.asala-cart-item-unit-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 7px;

    color: #a01232;

    font-size: 16px;
    font-weight: 800;
}

.asala-cart-item-unit-price del {
    color: #8d8581;
    opacity: 0.65;
    font-size: 13px;
}

.asala-cart-item-unit-price ins {
    text-decoration: none;
}

.asala-cart-item-unit-yemeni {
    color: #a01232;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   QUANTITY + REMOVE
   ========================================================= */

.asala-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 13px;
}

.asala-cart-quantity {
    display: inline-grid;

    grid-template-columns:
        38px
        58px
        38px;

    align-items: stretch;

    overflow: hidden;

    border: 1px solid #dfd3cb;
    border-radius: 9px;

    background: #fff;
}

.asala-cart-qty-btn {
    display: grid !important;
    place-items: center;

    width: 38px;
    min-width: 38px;
    height: 42px;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: #faf8f6 !important;

    color: #613822 !important;

    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 500 !important;

    cursor: pointer;
}

.asala-cart-qty-btn:hover {
    background: #f0e6df !important;
}

.asala-cart-quantity .quantity {
    width: 58px !important;
    margin: 0 !important;
}

.asala-cart-quantity input.qty {
    display: block;

    width: 58px !important;
    height: 42px !important;

    margin: 0 !important;
    padding: 0 4px !important;

    border: 0 !important;
    border-left: 1px solid #eee5df !important;
    border-right: 1px solid #eee5df !important;
    border-radius: 0 !important;

    background: #fff !important;

    color: #2b211d !important;

    text-align: center;

    font-size: 14px !important;

    box-shadow: none !important;
}

.asala-cart-single-quantity {
    grid-column: 1 / -1;

    display: grid;
    place-items: center;

    min-width: 70px;
    height: 42px;

    font-size: 14px;
}

.asala-cart-remove {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    border: 1px solid #eee0d7;
    border-radius: 9px;

    color: #743118 !important;

    background: #fff;

    text-decoration: none !important;
}

.asala-cart-remove:hover {
    background: #fff4ef;
}

.asala-cart-remove svg {
    width: 22px;
    height: 22px;

    fill: currentColor;
}


/* =========================================================
   LINE TOTAL
   ========================================================= */

.asala-cart-item-total {
    min-width: 0;

    text-align: left;
}

.asala-cart-item-total strong {
    display: block;

    color: #ae0d31;

    font-size: 20px;
    line-height: 1.4;
}

.asala-cart-item-total span {
    display: block;

    margin-top: 5px;

    color: #84756d;

    font-size: 12px;
}


/* =========================================================
   CART ACTIONS
   ========================================================= */

.asala-cart-form-actions {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;

    margin-top: 18px;
}

.asala-cart-coupon {
    display: flex;

    min-width: 0;

    flex: 1;

    max-width: 470px;
}

.asala-cart-coupon input {
    flex: 1;
    min-width: 0;

    height: 48px !important;

    padding: 0 14px !important;

    border: 1px solid #dfd4cd !important;
    border-radius: 0 9px 9px 0 !important;

    background: #fff !important;

    font-size: 13px !important;
}

.asala-cart-coupon-button {
    min-width: 125px;

    height: 48px;

    margin: 0 !important;
    padding: 0 17px !important;

    border-radius: 9px 0 0 9px !important;

    background: #6d321b !important;
    color: #fff !important;
}

.asala-update-cart-button {
    min-height: 48px;

    padding: 0 20px !important;

    border-radius: 9px !important;

    background: #2f2521 !important;
    color: #fff !important;
}

.asala-update-cart-button:disabled {
    opacity: 0.5;
}


/* =========================================================
   SUMMARY CARD
   ========================================================= */

.asala-cart-sidebar {
    position: sticky;
    top: 24px;
}

.asala-cart-summary {
    padding: 22px;

    border: 1px solid #eadfd7;
    border-radius: 16px;

    background:
        linear-gradient(
            180deg,
            #fffdfb 0%,
            #fff8f3 100%
        );
}

.asala-cart-summary-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 20px;
}

.asala-cart-summary-heading > span {
    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;

    border-radius: 9px;

    background: #f1e4da;

    font-size: 18px;
}

.asala-cart-summary-heading h2 {
    margin: 0;

    color: #2b1d18;

    font-size: 22px;
    font-weight: 800;
}

.asala-cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 13px 0;

    color: #594941;

    font-size: 14px;
}

.asala-cart-summary-row strong {
    color: #33231d;
    font-size: 15px;
}

.asala-cart-discount-row strong {
    color: #168c4d;
}

.asala-cart-shipping-status {
    max-width: 155px;

    color: #7b675d !important;

    text-align: left;

    font-size: 12px !important;
    font-weight: 600 !important;
}

.asala-cart-summary-divider {
    height: 1px;

    margin: 5px 0;

    background: #e8ddd5;
}

.asala-cart-summary-total {
    padding: 18px 0;
}

.asala-cart-summary-total > span {
    color: #251813;

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

.asala-cart-summary-total > div {
    text-align: left;
}

.asala-cart-summary-total strong {
    display: block;

    color: #a4092e;

    font-size: 25px;
    line-height: 1.3;
    font-weight: 900;
}

.asala-cart-summary-total small {
    display: block;

    margin-top: 3px;

    color: #a4092e;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   CHECKOUT BUTTONS
   ========================================================= */

.asala-cart-checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    min-height: 56px;

    margin-top: 7px;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #692b17,
            #9c4d1c
        );

    color: #fff !important;

    text-decoration: none !important;

    font-size: 17px;
    font-weight: 800;
}

.asala-cart-checkout-button:hover {
    color: #fff !important;
    opacity: 0.94;
}

.asala-cart-summary-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: 100%;
    min-height: 47px;

    margin-top: 10px;

    border: 1px solid #cfae99;
    border-radius: 10px;

    color: #9a1d35 !important;

    background: #fff;

    text-decoration: none !important;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   SHIPPING CARD
   ========================================================= */

.asala-cart-shipping-card {
    margin-top: 16px;
    padding: 19px;

    border: 1px solid #eaded6;
    border-radius: 15px;

    background: #fffaf6;
}

.asala-cart-shipping-card header {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 9px;
}

.asala-cart-shipping-card header > span {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    border-radius: 50%;

    background: #82441f;
    color: #fff;

    font-size: 15px;
}

.asala-cart-shipping-card h3 {
    margin: 0;

    color: #a20f30;

    font-size: 16px;
    line-height: 1.6;
}

.asala-cart-shipping-card > p {
    margin: 0 0 13px;

    color: #6f5d53;

    font-size: 13px;
    line-height: 1.8;
}

.asala-cart-shipping-companies {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 14px;
}

.asala-cart-shipping-companies span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 5px 13px;

    border: 1px solid #d8bdab;
    border-radius: 50px;

    background: #fff;

    color: #63361f;

    font-size: 12px;
    font-weight: 800;
}

.asala-cart-shipping-note {
    padding: 12px;

    border-radius: 10px;

    background: #f8eee7;
}

.asala-cart-shipping-note strong {
    display: block;

    margin-bottom: 4px;

    color: #6e371e;

    font-size: 13px;
}

.asala-cart-shipping-note p {
    margin: 0;

    color: #766159;

    font-size: 12px;
    line-height: 1.7;
}

.asala-cart-shipping-card > small {
    display: block;

    margin-top: 10px;

    color: #837067;

    font-size: 11px;
    line-height: 1.7;
}


/* =========================================================
   TRUST ROW
   ========================================================= */

.asala-cart-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;

    margin-top: 14px;
}

.asala-cart-trust > div {
    display: flex;
    align-items: center;
    gap: 7px;

    min-width: 0;

    padding: 10px 7px;

    border: 1px solid #eee1d8;
    border-radius: 10px;

    background: #fff;
}

.asala-cart-trust span {
    flex: 0 0 28px;

    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    background: #f5e8df;

    font-size: 13px;
}

.asala-cart-trust strong {
    color: #5d4032;

    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   WOOCOMMERCE NOTICES
   ========================================================= */

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
    width: min(1280px, calc(100% - 40px));

    margin: 20px auto !important;

    border-radius: 10px;

    box-sizing: border-box;
}

body.woocommerce-cart .woocommerce-message {
    border-top-color: #16894d;
}

body.woocommerce-cart .woocommerce-message::before {
    color: #16894d;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .asala-cart-container {
        width: min(100% - 32px, 960px);
    }

    .asala-cart-layout {
        grid-template-columns:
            minmax(0, 1.4fr)
            minmax(290px, 0.75fr);

        gap: 20px;
    }

    .asala-cart-item {
        grid-template-columns:
            105px
            minmax(0, 1fr);

        gap: 15px;
    }

    .asala-cart-item-image {
        width: 105px;
    }

    .asala-cart-item-total {
        grid-column: 2;

        text-align: right;
    }

    .asala-cart-trust {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .asala-cart-container {
        width: 100%;
        max-width: 640px;

        padding:
            25px
            14px
            45px;
    }


    /* Header */

    .asala-cart-page-header {
        display: block;

        margin-bottom: 22px;
    }

    .asala-cart-heading {
        gap: 11px;
    }

    .asala-cart-heading-icon {
        width: 46px;
        height: 46px;

        flex-basis: 46px;

        border-radius: 12px;

        font-size: 22px;
    }

    .asala-cart-heading h1 {
        font-size: 34px;
    }

    .asala-cart-heading p {
        font-size: 12px;
    }

    .asala-cart-continue-shopping {
        width: 100%;
        min-height: 45px;

        margin-top: 14px;
    }


    /* Layout */

    .asala-cart-layout {
        display: flex;
        flex-direction: column;

        gap: 18px;
    }

    .asala-cart-main,
    .asala-cart-sidebar {
        width: 100%;
    }

    .asala-cart-sidebar {
        position: static;
    }


    /* Product card */

    .asala-cart-item {
        grid-template-columns:
            92px
            minmax(0, 1fr);

        gap: 13px;

        padding: 12px;

        border-radius: 13px;
    }

    .asala-cart-item-image {
        width: 92px;

        border-radius: 10px;
    }

    .asala-cart-item-count-badge {
        display: flex;
    }

    .asala-cart-item-heart {
        display: none;
    }

    .asala-cart-item-name {
        margin-bottom: 5px;

        font-size: 16px;
    }

    .asala-cart-item-description {
        display: -webkit-box;
        overflow: hidden;

        margin-bottom: 7px;

        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;

        font-size: 11px;
        line-height: 1.7;
    }

    .asala-cart-item-unit-price {
        font-size: 15px;
    }

    .asala-cart-item-unit-yemeni {
        font-size: 10px;
    }

    .asala-cart-item-controls {
        gap: 8px;

        margin-top: 9px;
    }

    .asala-cart-quantity {
        grid-template-columns:
            34px
            48px
            34px;
    }

    .asala-cart-qty-btn {
        width: 34px;
        min-width: 34px;
        height: 38px;
    }

    .asala-cart-quantity .quantity {
        width: 48px !important;
    }

    .asala-cart-quantity input.qty {
        width: 48px !important;
        height: 38px !important;
    }

    .asala-cart-remove {
        width: 38px;
        height: 38px;

        flex-basis: 38px;
    }

    .asala-cart-remove svg {
        width: 19px;
        height: 19px;
    }

    .asala-cart-item-total {
        grid-column: 1 / -1;

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

        padding-top: 10px;

        border-top: 1px solid #eee5df;

        text-align: right;
    }

    .asala-cart-item-total strong {
        font-size: 17px;
    }

    .asala-cart-item-total span {
        margin: 0;

        font-size: 11px;
    }


    /* Actions */

    .asala-cart-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .asala-cart-coupon {
        width: 100%;
        max-width: none;
    }

    .asala-cart-coupon-button {
        min-width: 115px;

        font-size: 12px !important;
    }

    .asala-update-cart-button {
        width: 100%;
    }


    /* Summary */

    .asala-cart-summary {
        padding: 17px;

        border-radius: 14px;
    }

    .asala-cart-summary-heading h2 {
        font-size: 20px;
    }

    .asala-cart-summary-total strong {
        font-size: 23px;
    }

    .asala-cart-checkout-button {
        min-height: 54px;

        font-size: 16px;
    }


    /* Shipping */

    .asala-cart-shipping-card {
        padding: 16px;
    }

    .asala-cart-trust {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 6px;
    }

    .asala-cart-trust > div {
        display: block;

        padding: 9px 4px;

        text-align: center;
    }

    .asala-cart-trust span {
        margin: 0 auto 6px;
    }

    .asala-cart-trust strong {
        display: block;

        font-size: 9px;
    }


    /* Notices */

    body.woocommerce-cart .woocommerce-message,
    body.woocommerce-cart .woocommerce-info,
    body.woocommerce-cart .woocommerce-error {
        width: calc(100% - 28px);

        margin:
            12px
            auto !important;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 430px) {

    .asala-cart-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .asala-cart-heading h1 {
        font-size: 31px;
    }

    .asala-cart-item {
        grid-template-columns:
            86px
            minmax(0, 1fr);

        gap: 10px;

        padding: 10px;
    }

    .asala-cart-item-image {
        width: 86px;
    }

    .asala-cart-item-name {
        font-size: 15px;
    }

    .asala-cart-coupon input {
        font-size: 12px !important;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   320 - 360
   ========================================================= */

@media (max-width: 360px) {

    .asala-cart-container {
        padding-left: 9px;
        padding-right: 9px;
    }

    .asala-cart-heading h1 {
        font-size: 28px;
    }

    .asala-cart-heading-icon {
        display: none;
    }

    .asala-cart-item {
        grid-template-columns:
            78px
            minmax(0, 1fr);

        gap: 8px;
    }

    .asala-cart-item-image {
        width: 78px;
    }

    .asala-cart-item-name {
        font-size: 14px;
    }

    .asala-cart-item-description {
        font-size: 10px;
    }

    .asala-cart-quantity {
        grid-template-columns:
            31px
            42px
            31px;
    }

    .asala-cart-qty-btn {
        width: 31px;
        min-width: 31px;
    }

    .asala-cart-quantity .quantity {
        width: 42px !important;
    }

    .asala-cart-quantity input.qty {
        width: 42px !important;
    }

    .asala-cart-remove {
        width: 36px;
        height: 38px;

        flex-basis: 36px;
    }

    .asala-cart-summary {
        padding: 14px;
    }

    .asala-cart-trust {
        grid-template-columns: 1fr;
    }

    .asala-cart-trust > div {
        display: flex;

        text-align: right;
    }

    .asala-cart-trust span {
        margin: 0;
    }

}


/* =========================================================
   PATCH-014
   CART FINAL VISUAL REFINEMENT
   Remove duplicate page title + desktop/tablet polish
   ========================================================= */


/* =========================================================
   REMOVE STOREFRONT / WORDPRESS DUPLICATE PAGE TITLE
   نحتفظ فقط بعنوان السلة المخصص داخل cart.php
   ========================================================= */

body.woocommerce-cart .entry-header,
body.woocommerce-cart header.entry-header,
body.woocommerce-cart .page-header {
    display: none !important;
}

body.woocommerce-cart .entry-title {
    display: none !important;
}


/* =========================================================
   REMOVE EXTRA THEME SPACING
   ========================================================= */

body.woocommerce-cart .site-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.woocommerce-cart .site-content > .col-full {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.woocommerce-cart article.page,
body.woocommerce-cart .hentry {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.woocommerce-cart .entry-content {
    margin: 0 !important;
}


/* =========================================================
   DESKTOP CART PROPORTIONS
   ========================================================= */

@media (min-width: 1025px) {

    .asala-cart-container {
        width: min(1220px, calc(100% - 48px));
        padding-top: 28px;
        padding-bottom: 60px;
    }

    .asala-cart-page-header {
        margin-bottom: 24px;
    }

    .asala-cart-layout {
        grid-template-columns:
            minmax(0, 1.62fr)
            minmax(320px, 0.72fr);

        gap: 24px;
    }

    .asala-cart-item {
        grid-template-columns:
            120px
            minmax(0, 1fr)
            minmax(120px, 145px);

        gap: 17px;

        padding: 16px;
    }

    .asala-cart-item-image {
        width: 120px;
    }

    .asala-cart-summary {
        padding: 20px;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 768px) and (max-width: 1024px) {

    .asala-cart-container {
        width: min(100% - 32px, 960px);
        padding-top: 24px;
        padding-bottom: 50px;
    }

    .asala-cart-page-header {
        margin-bottom: 22px;
    }

    .asala-cart-layout {
        grid-template-columns:
            minmax(0, 1.35fr)
            minmax(280px, 0.75fr);

        gap: 18px;
    }

    .asala-cart-summary {
        padding: 18px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .asala-cart-container {
        padding-top: 18px;
        padding-bottom: 38px;
    }

    .asala-cart-page-header {
        margin-bottom: 18px;
    }

    .asala-cart-heading {
        align-items: center;
    }

    .asala-cart-heading h1 {
        font-size: clamp(29px, 8vw, 34px);
        line-height: 1.25;
    }

    .asala-cart-heading p {
        margin-top: 3px;
    }

    .asala-cart-continue-shopping {
        margin-top: 12px;
    }

    .asala-cart-layout {
        gap: 16px;
    }

    .asala-cart-form-actions {
        margin-top: 14px;
        gap: 9px;
    }

    .asala-cart-sidebar {
        margin-top: 0;
    }

    .asala-cart-summary,
    .asala-cart-shipping-card {
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL PHONES
   320px - 360px
   ========================================================= */

@media (max-width: 360px) {

    .asala-cart-container {
        padding-top: 15px;
    }

    .asala-cart-heading h1 {
        font-size: 27px;
    }

    .asala-cart-page-header {
        margin-bottom: 15px;
    }
}


/* =========================================================
   PATCH-044Q — Cart title icon aligned with Checkout title style
   ========================================================= */
.asala-cart-heading-icon {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #35160f, #6f2d18) !important;
    color: #ffffff !important;
    font-size: 0 !important;
}

.asala-cart-heading-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 767px) {
    .asala-cart-heading-icon {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
        border-radius: 8px !important;
    }

    .asala-cart-heading-icon svg {
        width: 19px;
        height: 19px;
    }
}

/* =========================================================
   PATCH-045J — Mobile sticky checkout bar for cart page
   Mirrors the mobile checkout bottom action for visual continuity.
   ========================================================= */
.asala-mobile-cart-bar {
    display: none;
}

@media (max-width: 767px) {
    body.woocommerce-cart {
        padding-bottom: 96px !important;
    }

    .asala-mobile-cart-bar {
        position: fixed;
        z-index: 9998;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        background: rgba(255,255,255,.97);
        border-top: 1px solid #e7ddd6;
        box-shadow: 0 -8px 30px rgba(31,20,14,.12);
        backdrop-filter: blur(10px);
    }

    .asala-mobile-cart-bar__total {
        flex: 1;
        min-width: 0;
    }

    .asala-mobile-cart-bar__total small {
        display: block;
        color: #49382e;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.4;
    }

    .asala-mobile-cart-bar__total strong {
        display: block;
        margin-top: 3px;
        color: #2b1c17;
        font-size: 16px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .asala-mobile-cart-bar__cta {
        flex: 0 0 min(56vw, 330px);
        min-height: 54px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        padding: 10px 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, #17110e, #37251c);
        color: #fff !important;
        text-decoration: none !important;
        font-size: 16px;
        font-weight: 900;
        box-shadow: 0 12px 26px rgba(31,20,14,.18);
    }

    .asala-mobile-cart-bar__cta-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(255,255,255,.12);
        flex: 0 0 30px;
    }

    .asala-mobile-cart-bar__cta-icon svg {
        width: 18px;
        height: 18px;
        display: block;
    }
}


/* =========================================================
   PATCH-047G — Cart quantity visibility / interaction repair
   The Atelier sitewide field rule loads after cart.css and applies
   a 48px minimum input height/padding to the compact quantity field.
   Reassert the cart-specific geometry and visible numeric value.
   ========================================================= */
body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity .quantity {
    display: block !important;
    width: 58px !important;
    min-width: 0 !important;
    max-width: 58px !important;
    height: 42px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    overflow: visible !important;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty {
    display: block !important;
    position: static !important;
    width: 58px !important;
    min-width: 0 !important;
    max-width: 58px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 3px !important;
    border: 0 !important;
    border-left: 1px solid #eee5df !important;
    border-right: 1px solid #eee5df !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #2b211d !important;
    -webkit-text-fill-color: #2b211d !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 42px !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity .quantity {
        width: 48px !important;
        max-width: 48px !important;
        height: 38px !important;
    }

    body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty {
        width: 48px !important;
        max-width: 48px !important;
        height: 38px !important;
        min-height: 38px !important;
        line-height: 38px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 390px) {
    body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity .quantity {
        width: 42px !important;
        max-width: 42px !important;
    }

    body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty {
        width: 42px !important;
        max-width: 42px !important;
    }
}


/* =========================================================
   PATCH-047M — Native WooCommerce quantity display
   The WooCommerce numeric input stays the submitted source of truth.
   The real input is visible and editable; no separate numeric mirror.
   ========================================================= */
body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity {
    position: relative;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-qty-minus {
    grid-column: 1;
    grid-row: 1;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity .quantity {
    grid-column: 2;
    grid-row: 1;
    position: relative !important;
    z-index: 1;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-qty-plus {
    grid-column: 3;
    grid-row: 1;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty {
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    font-variant-numeric: tabular-nums !important;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty::-webkit-outer-spin-button,
body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =========================================================
   PATCH-047J — Live cart quantity request state
   ========================================================= */
body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity.is-updating {
    opacity: .72;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-quantity.is-updating .asala-cart-qty-btn {
    cursor: wait !important;
}

body#asala-page.asala-atelier.woocommerce-cart .asala-cart-page .asala-cart-qty-btn:disabled {
    opacity: .58;
}

/* Secondary equivalent display only, below the current SAR/USD total. */
.asala-mobile-cart-bar__prices { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; min-width:0; }
.asala-mobile-cart-bar__total .asala-secondary-yer { display:block; flex:0 0 100%; font-size:11px; font-weight:400; color:#74675e; line-height:1.4; margin:0; overflow-wrap:anywhere; }

@media(max-width:767px) {
 .asala-mobile-cart-bar--with-yer .asala-mobile-cart-bar__cta { flex-basis:44%; box-sizing:border-box; padding-inline:10px; font-size:14px; }
}

/* PATCH-CC-001: native line discount, separate from catalog sale prices. */
.asala-line-coupon-saving {
    margin: 8px 0;
    padding: 7px 10px;
    border-radius: 10px;
    background: #eef8f1;
    color: #207447;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.asala-line-coupon-saving small { display: block; font-size: 11px; }
.asala-cart-item-unit-price ins { text-decoration: none; }

/* PATCH-CC-002: keep catalog sale and actual coupon prices distinguishable. */
.asala-sc-price-stage{display:inline-flex;flex-direction:column;gap:3px;margin-inline-end:10px}
.asala-sc-price-stage small{font-size:11px;color:#74675f;font-weight:400}
.asala-sc-price-stage ins{color:#991d40;font-weight:800}
.asala-sc-catalog-regular{opacity:.7}
