/*
|--------------------------------------------------------------------------
| ELEMENTAL
| Checkout Page
| Modern Pastel Blue
|--------------------------------------------------------------------------
*/


/* =========================================================
   ROOT
========================================================= */

.checkout-page {

    -checkout-primary: #9fc5df;
    -checkout-primary-dark: #78a9c9;
    -checkout-primary-soft: #eaf4fb;
    -checkout-primary-pale: #f7fbfe;

    -checkout-bg: #f6f9fc;
    -checkout-white: #ffffff;

    -checkout-text: #27313a;
    -checkout-muted: #7d8790;
    -checkout-light: #aeb7be;

    -checkout-border: #e3ebf1;

    -checkout-success: #78a28a;
    -checkout-danger: #d98287;

    min-height: calc(100vh - 100px);

    padding: 45px 0 80px;

    background:
        linear-gradient(
            180deg,
            #f8fbfd 0%,
            #f5f8fb 100%
        );

}


/* =========================================================
   CONTAINER
========================================================= */

.checkout-page .container {

    width: min(
        1180px,
        calc(100% - 32px)
    );

    margin-inline: auto;

}


/* =========================================================
   HEADER
========================================================= */

.checkout-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 28px;

}


.checkout-header-content {

    min-width: 0;

}


.checkout-eyebrow {

    display: block;

    margin-bottom: 6px;

    color: var(--checkout-primary-dark);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;

}


.checkout-title {

    margin: 0;

    color: var(--checkout-text);

    font-size: 30px;

    font-weight: 800;

    line-height: 1.4;

}


.checkout-subtitle {

    margin: 7px 0 0;

    color: var(--checkout-muted);

    font-size: 12px;

}


/* =========================================================
   BACK CART
========================================================= */

.checkout-back-cart {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding: 0 17px;

    border: 1px solid var(--checkout-border);

    border-radius: 12px;

    background: rgba(255,255,255,.85);

    color: var(--checkout-text);

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;

    text-decoration: none;

    transition:
        border-color .25s ease,
        background .25s ease,
        color .25s ease,
        transform .25s ease;

}


.checkout-back-cart:hover {

    border-color: var(--checkout-primary);

    background: var(--checkout-primary-soft);

    color: var(--checkout-primary-dark);

    transform: translateY(-2px);

}


/* =========================================================
   LAYOUT
========================================================= */

.checkout-layout {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        350px;

    gap: 24px;

    align-items: start;

}


/* =========================================================
   FORM SECTION
========================================================= */

.checkout-form-section {

    min-width: 0;

    padding: 0;

}


/* =========================================================
   SECTION HEADER
========================================================= */

.checkout-section-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 72px;

    margin-bottom: 12px;

    padding: 0 20px;

    border: 1px solid var(--checkout-border);

    border-radius: 16px;

    background: rgba(255,255,255,.92);

}


.checkout-section-label {

    display: block;

    margin-bottom: 3px;

    color: var(--checkout-primary-dark);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.checkout-section-header h2 {

    margin: 0;

    color: var(--checkout-text);

    font-size: 15px;

    font-weight: 800;

}


.checkout-section-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 38px;

    height: 38px;

    border-radius: 12px;

    background: var(--checkout-primary-soft);

    color: var(--checkout-primary-dark);

    font-size: 14px;

}


/* =========================================================
   FORM
========================================================= */

.checkout-form {

    display: flex;

    flex-direction: column;

    gap: 13px;

}


/* =========================================================
   FORM BLOCK
========================================================= */

.checkout-form-block {

    padding: 20px;

    border: 1px solid var(--checkout-border);

    border-radius: 17px;

    background: var(--checkout-white);

}


.checkout-block-title {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 17px;

    color: var(--checkout-text);

    font-size: 12px;

    font-weight: 800;

}


.checkout-block-title > i {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 30px;

    height: 30px;

    border-radius: 9px;

    background: var(--checkout-primary-soft);

    color: var(--checkout-primary-dark);

    font-size: 11px;

}


.checkout-block-title small {

    margin-right: auto;

    color: var(--checkout-light);

    font-size: 9px;

    font-weight: 500;

}


/* =========================================================
   FIELDS GRID
========================================================= */

.checkout-fields-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;

}


/* =========================================================
   FIELD
========================================================= */

.checkout-field {

    min-width: 0;

}


.checkout-field-full {

    margin-top: 15px;

}


.checkout-field-small {

    width: calc(50% - 7.5px);

    margin-top: 15px;

}


.checkout-field label {

    display: flex;

    align-items: center;

    gap: 4px;

    margin-bottom: 7px;

    color: var(--checkout-text);

    font-size: 11px;

    font-weight: 700;

}


.checkout-field label span {

    color: var(--checkout-danger);

    font-size: 11px;

}


.checkout-field label small {

    margin-right: 5px;

    color: var(--checkout-light);

    font-size: 9px;

    font-weight: 500;

}


/* =========================================================
   INPUT
========================================================= */

.checkout-input {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 47px;

    border: 1px solid #dfe8ee;

    border-radius: 12px;

    background: #fbfdff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;

}


.checkout-input > i:first-child {

    flex: 0 0 42px;

    width: 42px;

    text-align: center;

    color: #9bb7c9;

    font-size: 12px;

}


.checkout-input input {

    width: 100%;

    min-width: 0;

    height: 45px;

    padding: 0 8px 0 13px;

    border: 0;

    outline: 0;

    background: transparent;

    color: var(--checkout-text);

    font-family: inherit;

    font-size: 11px;

}


.checkout-input input::placeholder {

    color: #b4bdc3;

}


.checkout-input:focus-within {

    border-color: var(--checkout-primary);

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(159,197,223,.14);

}


/* =========================================================
   SELECT
========================================================= */

.checkout-select {

    position: relative;

}


.checkout-select select {

    width: 100%;

    height: 45px;

    padding:
        0
        38px
        0
        38px;

    border: 0;

    outline: 0;

    appearance: none;

    background: transparent;

    color: var(--checkout-text);

    font-family: inherit;

    font-size: 11px;

    cursor: pointer;

}


.checkout-select select:disabled {

    color: #b5bdc2;

    cursor: not-allowed;

}


.checkout-select .select-arrow {

    position: absolute;

    left: 13px;

    right: auto;

    width: auto;

    color: #a8b6bf;

    font-size: 9px;

    pointer-events: none;

}


.checkout-select:focus-within {

    border-color: var(--checkout-primary);

    box-shadow:
        0 0 0 3px rgba(159,197,223,.14);

}


/* =========================================================
   TEXTAREA
========================================================= */

.checkout-textarea {

    align-items: flex-start;

    min-height: 105px;

}


.checkout-textarea > i:first-child {

    padding-top: 16px;

}


.checkout-textarea textarea {

    width: 100%;

    min-width: 0;

    min-height: 103px;

    padding:
        14px
        10px
        12px
        13px;

    resize: vertical;

    border: 0;

    outline: 0;

    background: transparent;

    color: var(--checkout-text);

    font-family: inherit;

    font-size: 11px;

    line-height: 1.9;

}


.checkout-textarea textarea::placeholder {

    color: #b4bdc3;

}


/* =========================================================
   SECURITY
========================================================= */

.checkout-security {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px 16px;

    border: 1px solid #e1eee6;

    border-radius: 14px;

    background: #f9fcfa;

}


.checkout-security-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 34px;

    width: 34px;

    height: 34px;

    border-radius: 10px;

    background: #edf7f0;

    color: var(--checkout-success);

    font-size: 12px;

}


.checkout-security div:last-child {

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.checkout-security strong {

    color: #526b5a;

    font-size: 10px;

}


.checkout-security span {

    color: #8c9b92;

    font-size: 8px;

    line-height: 1.7;

}


/* =========================================================
   SUBMIT
========================================================= */

.checkout-submit {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    width: 100%;

    min-height: 53px;

    padding: 0 20px;

    border: 0;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #a9cee5,
            #8dbbd7
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(125,170,200,.22);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        opacity .25s ease;

}


.checkout-submit:hover {

    transform: translateY(-2px);

    box-shadow:
        0 11px 26px rgba(125,170,200,.30);

}


.checkout-submit:active {

    transform: translateY(0);

}


.checkout-submit i {

    font-size: 11px;

}


/* =========================================================
   ORDER SUMMARY
========================================================= */

.checkout-summary {

    position: sticky;

    top: 105px;

    overflow: hidden;

    border: 1px solid var(--checkout-border);

    border-radius: 20px;

    background: rgba(255,255,255,.97);

    box-shadow:
        0 12px 35px rgba(48,72,90,.06);

}


/* =========================================================
   SUMMARY HEADER
========================================================= */

.checkout-summary-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid var(--checkout-border);

}


.checkout-summary-header span {

    display: block;

    margin-bottom: 3px;

    color: var(--checkout-primary-dark);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.checkout-summary-header h2 {

    margin: 0;

    color: var(--checkout-text);

    font-size: 15px;

    font-weight: 800;

}


.checkout-summary-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 37px;

    height: 37px;

    border-radius: 11px;

    background: var(--checkout-primary-soft);

    color: var(--checkout-primary-dark);

    font-size: 13px;

}


/* =========================================================
   CHECKOUT ITEMS
========================================================= */

.checkout-items {

    display: flex;

    flex-direction: column;

    gap: 0;

    max-height: 430px;

    overflow-y: auto;

}


/* =========================================================
   CHECKOUT ITEM
========================================================= */

.checkout-item {

    display: grid;

    grid-template-columns:
        62px
        minmax(0,1fr);

    gap: 11px;

    padding: 13px 18px;

    border-bottom: 1px solid #edf1f4;

}


.checkout-item-image {

    width: 62px;

    height: 62px;

    overflow: hidden;

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            #f5faff,
            #edf5fa
        );

}


.checkout-item-image img {

    width: 100%;

    height: 100%;

    object-fit: contain;

}


.checkout-item-info {

    display: flex;

    flex-direction: column;

    justify-content: center;

    min-width: 0;

    gap: 5px;

}


.checkout-item-name {

    overflow: hidden;

    color: var(--checkout-text);

    font-size: 10px;

    font-weight: 700;

    line-height: 1.7;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

}


.checkout-item-meta {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

}


.checkout-item-quantity {

    color: var(--checkout-muted);

    font-size: 9px;

}


.checkout-item-price {

    color: var(--checkout-primary-dark);

    font-size: 10px;

    font-weight: 800;

}


/* =========================================================
   SUMMARY DIVIDER
========================================================= */

.checkout-summary-divider {

    height: 1px;

    margin: 0 18px;

    background: var(--checkout-border);

}


/* =========================================================
   TOTAL
========================================================= */

.checkout-total {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 19px 20px;

}


.checkout-total span {

    color: var(--checkout-text);

    font-size: 11px;

    font-weight: 700;

}


.checkout-total strong {

    color: var(--checkout-primary-dark);

    font-size: 17px;

    font-weight: 900;

}


/* =========================================================
   PAYMENT NOTE
========================================================= */

.checkout-payment-note {

    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0 15px 15px;

    padding: 12px;

    border-radius: 12px;

    background: var(--checkout-primary-pale);

}


.checkout-payment-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 30px;

    width: 30px;

    height: 30px;

    border-radius: 9px;

    background: var(--checkout-primary-soft);

    color: var(--checkout-primary-dark);

    font-size: 10px;

}


.checkout-payment-note > div:last-child {

    display: flex;

    flex-direction: column;

    gap: 2px;

}


.checkout-payment-note strong {

    color: var(--checkout-text);

    font-size: 9px;

}


.checkout-payment-note span {

    color: var(--checkout-muted);

    font-size: 7px;

    line-height: 1.6;

}


/* =========================================================
   EMPTY CHECKOUT
========================================================= */

.checkout-items:empty::before {

    content: "سبد خرید شما خالی است";

    display: block;

    padding: 45px 20px;

    color: var(--checkout-muted);

    font-size: 11px;

    text-align: center;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .checkout-layout {

        grid-template-columns: 1fr;

    }


    .checkout-summary {

        position: static;

        order: 2;

    }


    .checkout-form-section {

        order: 1;

    }


    .checkout-items {

        max-height: none;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .checkout-page {

        padding: 25px 0 50px;

    }


    .checkout-page .container {

        width: calc(100% - 18px);

    }


    .checkout-header {

        flex-direction: column;

        align-items: stretch;

        gap: 13px;

        margin-bottom: 20px;

    }


    .checkout-title {

        font-size: 25px;

    }


    .checkout-subtitle {

        font-size: 10px;

    }


    .checkout-back-cart {

        width: 100%;

    }


    .checkout-section-header {

        min-height: 58px;

        padding: 0 14px;

        border-radius: 14px;

    }


    .checkout-section-header h2 {

        font-size: 13px;

    }


    .checkout-section-icon {

        width: 34px;

        height: 34px;

    }


    .checkout-form-block {

        padding: 15px;

        border-radius: 14px;

    }


    .checkout-block-title {

        margin-bottom: 14px;

    }


    .checkout-fields-grid {

        grid-template-columns: 1fr;

        gap: 12px;

    }


    .checkout-field-full {

        margin-top: 12px;

    }


    .checkout-field-small {

        width: 100%;

        margin-top: 12px;

    }


    .checkout-input {

        min-height: 45px;

    }


    .checkout-input input {

        height: 43px;

        font-size: 10px;

    }


    .checkout-select select {

        height: 43px;

        font-size: 10px;

    }


    .checkout-textarea {

        min-height: 95px;

    }


    .checkout-textarea textarea {

        min-height: 93px;

        font-size: 10px;

    }


    .checkout-security {

        padding: 12px;

    }


    .checkout-submit {

        min-height: 51px;

        font-size: 11px;

    }


    .checkout-summary {

        border-radius: 16px;

    }


    .checkout-summary-header {

        padding: 16px;

    }


    .checkout-summary-header h2 {

        font-size: 13px;

    }


    .checkout-item {

        padding: 12px 15px;

    }


    .checkout-total {

        padding: 17px 16px;

    }


    .checkout-payment-note {

        margin: 0 13px 13px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .checkout-page .container {

        width: calc(100% - 14px);

    }


    .checkout-title {

        font-size: 23px;

    }


    .checkout-form-block {

        padding: 13px;

    }


    .checkout-item {

        grid-template-columns:
            55px
            minmax(0,1fr);

    }


    .checkout-item-image {

        width: 55px;

        height: 55px;

    }

}


/* =========================================================
   FOCUS
========================================================= */

.checkout-input:focus-within,
.checkout-submit:focus-visible,
.checkout-back-cart:focus-visible {

    outline: none;

}


.checkout-submit:focus-visible,
.checkout-back-cart:focus-visible {

    box-shadow:
        0 0 0 3px rgba(159,197,223,.25);

}