/* =========================================================
   ALAQ CART PAGE
========================================================= */


/* =========================================================
   HELPERS
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   CART HEADER
========================================================= */

.cart-page-header {
    max-width: 1400px;

    margin:
        0
        auto;

    padding:
        90px
        32px
        65px;

    background:
        var(--alaq-white);
}


.cart-page-header h1 {
    margin:
        0
        0
        14px;

    color:
        var(--alaq-deep);

    font-family:
        "Poppins",
        Arial,
        sans-serif;

    font-size:
        clamp(
            43px,
            6vw,
            70px
        );

    font-weight: 500;

    line-height: 1;

    letter-spacing: -2.5px;
}


.cart-page-header p {
    max-width: 580px;

    margin: 0;

    color:
        var(--alaq-muted);

    font-size: 12px;

    line-height: 1.9;
}


/* =========================================================
   LOGIN REQUIRED
========================================================= */

.cart-login-required {
    max-width: 1400px;

    margin:
        0
        auto;

    padding:
        20px
        32px
        110px;
}


.cart-login-card {
    max-width: 560px;

    margin:
        0
        auto;

    padding:
        50px;

    border:
        1px solid
        var(--alaq-border);

    background:
        linear-gradient(
            145deg,
            #f8f4ed,
            var(--alaq-white)
        );

    text-align: center;
}


.cart-login-card img {
    width: 105px;

    margin:
        0
        auto
        25px;
}


.cart-login-card h2 {
    margin:
        0
        0
        12px;

    color:
        var(--alaq-deep);

    font-size: 28px;

    font-weight: 500;
}


.cart-login-card p {
    margin:
        0
        0
        27px;

    color:
        var(--alaq-muted);

    font-size: 12px;

    line-height: 1.8;
}


.cart-login-actions {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;
}


.cart-login-button,
.cart-register-button {
    min-height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 11px;

    font-weight: 700;
}


.cart-login-button {
    background:
        var(--alaq-green);

    color:
        var(--alaq-white);
}


.cart-register-button {
    border:
        1px solid
        var(--alaq-green);

    color:
        var(--alaq-green);
}


/* =========================================================
   CART LAYOUT
========================================================= */

.cart-main {
    max-width: 1400px;

    margin:
        0
        auto;

    padding:
        0
        32px
        110px;

    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        390px;

    gap:
        65px;

    align-items: start;
}


/* =========================================================
   HEADING
========================================================= */

.cart-section-heading {
    min-height: 52px;

    padding-bottom: 16px;

    border-bottom:
        1px solid
        var(--alaq-border);

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 20px;
}


.cart-section-heading h2 {
    margin: 0;

    color:
        var(--alaq-deep);

    font-size: 18px;

    font-weight: 500;
}


.clear-cart-button {
    padding: 0;

    border: 0;

    background:
        transparent;

    color:
        var(--alaq-muted);

    font-size: 10px;

    text-decoration:
        underline;
}


/* =========================================================
   CART ITEM
========================================================= */

.cart-item {
    padding:
        24px
        0;

    border-bottom:
        1px solid
        var(--alaq-border);

    display: grid;

    grid-template-columns:
        125px
        minmax(
            0,
            1fr
        )
        170px;

    gap: 22px;

    align-items: start;
}


.cart-item-image {
    width: 125px;

    aspect-ratio:
        0.78;

    overflow: hidden;

    background:
        var(--alaq-ivory);
}


.cart-item-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;
}


.cart-item-placeholder {
    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    color:
        rgba(
            4,
            30,
            29,
            0.15
        );

    font-family:
        Georgia,
        serif;

    font-size: 65px;
}


/* =========================================================
   INFO
========================================================= */

.cart-item-category {
    display: block;

    margin-bottom: 7px;

    color:
        var(--alaq-green-soft);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 1.2px;

    text-transform: uppercase;
}


.cart-item-info h3 {
    margin:
        0
        0
        12px;

    color:
        var(--alaq-deep);

    font-size: 17px;

    font-weight: 500;
}


.cart-item-meta {
    display: flex;

    flex-direction: column;

    gap: 5px;

    color:
        var(--alaq-muted);

    font-size: 9px;
}


.cart-item-meta strong {
    color:
        var(--alaq-deep);

    font-weight: 500;
}


.cart-item-unit-price {
    display: block;

    margin-top: 13px;

    color:
        var(--alaq-green);

    font-size: 11px;

    font-weight: 600;
}


/* =========================================================
   ACTIONS
========================================================= */

.cart-item-actions {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 14px;
}


.cart-remove-button {
    padding: 0;

    border: 0;

    background:
        transparent;

    color:
        var(--alaq-muted);

    font-size: 9px;

    text-decoration: underline;
}


.cart-quantity-control {
    width: 120px;

    height: 40px;

    display: grid;

    grid-template-columns:
        38px
        1fr
        38px;

    border:
        1px solid
        var(--alaq-border);
}


.cart-quantity-control button {
    border: 0;

    background:
        transparent;

    color:
        var(--alaq-deep);

    font-size: 16px;
}


.cart-quantity-control button:disabled {
    opacity: 0.3;

    cursor: default;
}


.cart-quantity-control span {
    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 11px;

    font-weight: 600;
}


.cart-line-total {
    color:
        var(--alaq-deep);

    font-size: 12px;
}


/* =========================================================
   SUMMARY
========================================================= */

.cart-summary {
    position: sticky;

    top: 110px;

    padding:
        32px;

    background:
        linear-gradient(
            145deg,
            #f1eadf,
            #f8f4ed
        );

    border:
        1px solid
        rgba(
            4,
            30,
            29,
            0.08
        );
}


.summary-eyebrow {
    display: block;

    margin-bottom: 9px;

    color:
        var(--alaq-green-soft);

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 1.8px;
}


.cart-summary h2 {
    margin:
        0
        0
        28px;

    color:
        var(--alaq-deep);

    font-size: 25px;

    font-weight: 500;
}


.cart-summary-row {
    margin-bottom: 16px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    color:
        var(--alaq-muted);

    font-size: 11px;
}


.cart-summary-row strong {
    color:
        var(--alaq-deep);

    font-size: 11px;
}


.cart-summary-divider {
    height: 1px;

    margin:
        23px
        0;

    background:
        rgba(
            4,
            30,
            29,
            0.12
        );
}


.cart-summary-row.total {
    margin-bottom: 25px;

    color:
        var(--alaq-deep);

    font-size: 13px;

    font-weight: 600;
}


.cart-summary-row.total strong {
    font-size: 16px;
}


/* =========================================================
   CHECKOUT BUTTON
========================================================= */

.checkout-button {
    width: 100%;

    min-height: 54px;

    border:
        1px solid
        var(--alaq-green);

    background:
        var(--alaq-green);

    color:
        var(--alaq-white);

    font-size: 11px;

    font-weight: 700;
}


.checkout-button:hover:not(:disabled) {
    background:
        var(--alaq-deep);

    border-color:
        var(--alaq-deep);
}


.checkout-button:disabled {
    opacity: 0.38;

    cursor: default;
}


.continue-shopping-link {
    margin-top: 17px;

    display: block;

    color:
        var(--alaq-green);

    text-align: center;

    font-size: 10px;

    font-weight: 600;
}


.cart-summary-note {
    margin-top: 25px;

    padding-top: 20px;

    border-top:
        1px solid
        rgba(
            4,
            30,
            29,
            0.10
        );
}


.cart-summary-note p {
    margin: 0;

    color:
        var(--alaq-muted);

    font-size: 9px;

    line-height: 1.7;
}


/* =========================================================
   EMPTY
========================================================= */

.cart-empty {
    padding:
        70px
        20px;

    text-align: center;
}


.cart-empty-mark {
    margin-bottom: 16px;

    color:
        rgba(
            4,
            30,
            29,
            0.12
        );

    font-family:
        Georgia,
        serif;

    font-size: 90px;
}


.cart-empty h3 {
    margin:
        0
        0
        9px;

    color:
        var(--alaq-deep);

    font-size: 23px;

    font-weight: 500;
}


.cart-empty p {
    margin:
        0
        auto
        24px;

    max-width: 380px;

    color:
        var(--alaq-muted);

    font-size: 11px;

    line-height: 1.8;
}


.cart-empty-button {
    min-height: 45px;

    padding:
        0
        22px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    background:
        var(--alaq-green);

    color:
        var(--alaq-white);

    font-size: 10px;

    font-weight: 700;
}


.cart-loading,
.cart-error {
    padding:
        60px
        20px;

    color:
        var(--alaq-muted);

    text-align: center;

    font-size: 11px;
}


/* =========================================================
   TABLET
========================================================= */

@media (
    max-width: 950px
) {

    .cart-main {
        grid-template-columns:
            1fr;

        gap: 45px;
    }


    .cart-summary {
        position: static;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (
    max-width: 650px
) {

    .cart-page-header {
        padding:
            65px
            18px
            45px;
    }


    .cart-page-header h1 {
        font-size: 42px;
    }


    .cart-main {
        padding:
            0
            18px
            75px;
    }


    .cart-item {
        grid-template-columns:
            95px
            1fr;

        gap: 15px;
    }


    .cart-item-image {
        width: 95px;
    }


    .cart-item-actions {
        grid-column:
            1 / -1;

        padding-left: 110px;

        align-items:
            stretch;

        flex-direction: row;

        justify-content:
            space-between;

        flex-wrap: wrap;
    }


    body[dir="rtl"]
    .cart-item-actions {
        padding-left: 0;

        padding-right: 110px;
    }


    .cart-login-actions {
        grid-template-columns:
            1fr;
    }


    .cart-login-card {
        padding:
            40px
            22px;
    }


    .cart-login-required {
        padding:
            10px
            18px
            75px;
    }

}