@font-face {
    font-family: "Cinzel";
    src:
        url("../assets/fonts/Cinzel-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cinzel";
    src:
        url("../assets/fonts/Cinzel-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cinzel";
    src:
        url("../assets/fonts/Cinzel-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src:
        url("../assets/fonts/Vazirmatn-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src:
        url("../assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src:
        url("../assets/fonts/Vazirmatn-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

.checkout-body {
    margin: 0;
    background: #080808;
    color: #fff;
    font-family: "Vazirmatn", sans-serif;
}


/* HEADER */

.checkout-header {
    position: relative;

    height: 4.5rem;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 4vw;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);

    background: #080808;
}


.checkout-logo {
    color: #fff;

    font-family: "Cinzel", serif;

    font-size: 0.95rem;

    letter-spacing: 0.25rem;

    text-decoration: none;
}


.checkout-back {
    position: absolute;

    right: 4vw;

    display: flex;
    align-items: center;

    gap: 0.5rem;

    color: rgba(255, 255, 255, 0.45);

    font-size: 0.58rem;

    text-decoration: none;

    transition: color 0.3s ease;
}


.checkout-back:hover {
    color: #fff;
}


.checkout-label {
    position: absolute;

    left: 4vw;

    font-family: "Cinzel", serif;

    font-size: 0.45rem;

    letter-spacing: 0.2rem;

    color: rgba(255, 255, 255, 0.25);
}



/* PAGE */

.checkout-page {
    min-height: calc(100vh - 4.5rem);

    padding: 3rem 4vw 4rem;

    background:
        radial-gradient(circle at 15% 20%,
            rgba(110, 8, 28, 0.14),
            transparent 25rem),
        radial-gradient(circle at 85% 80%,
            rgba(100, 8, 25, 0.08),
            transparent 22rem),
        #080808;
}


.checkout-title {
    text-align: center;

    margin-bottom: 2.5rem;
}


.checkout-title span {
    display: block;

    margin-bottom: 0.7rem;

    font-family: "Cinzel", serif;

    font-size: 0.45rem;

    letter-spacing: 0.25rem;

    color: rgba(255, 255, 255, 0.28);
}


.checkout-title h1 {
    margin: 0;

    font-size: 1.7rem;

    font-weight: 300;

    color: #fff;
}



/* LAYOUT */

.checkout-layout {
    width: min(72rem, 100%);

    margin: 0 auto;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 20rem;

    gap: 2rem;

    align-items: start;
}



/* FORM */

.checkout-form {
    display: flex;

    flex-direction: column;

    gap: 1rem;
}


.checkout-box {
    padding: 1.3rem;

    border: 1px solid rgba(255, 255, 255, 0.07);

    border-radius: 0.3rem;

    background: rgba(255, 255, 255, 0.025);
}


.checkout-box-title {
    display: flex;

    align-items: center;

    gap: 0.8rem;

    margin-bottom: 1.1rem;

    padding-bottom: 0.9rem;

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}


.checkout-box-title>span {
    color: #9e1833;

    font-family: "Cinzel", serif;

    font-size: 0.55rem;
}


.checkout-box-title small {
    display: block;

    margin-bottom: 0.2rem;

    font-family: "Cinzel", serif;

    font-size: 0.38rem;

    letter-spacing: 0.17rem;

    color: rgba(255, 255, 255, 0.25);
}


.checkout-box-title h2 {
    margin: 0;

    font-size: 0.75rem;

    font-weight: 400;
}



/* INPUT GRID */

.checkout-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0.8rem;
}


.checkout-input {
    display: flex;

    flex-direction: column;

    gap: 0.35rem;
}


.checkout-input.full {
    grid-column: 1 / -1;
}


.checkout-input label {
    font-size: 0.48rem;

    color: rgba(255, 255, 255, 0.42);
}


.checkout-input input,
.checkout-input textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 0.2rem;

    outline: none;

    background: rgba(255, 255, 255, 0.025);

    color: #fff;

    font-family: "Vazirmatn", sans-serif;

    font-size: 0.52rem;

    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}


.checkout-input input {
    height: 2.5rem;

    padding: 0 0.7rem;
}


.checkout-input textarea {
    min-height: 4.5rem;

    padding: 0.7rem;

    resize: none;
}


.checkout-input input::placeholder,
.checkout-input textarea::placeholder {
    color: rgba(255, 255, 255, 0.18);
}


.checkout-input input:focus,
.checkout-input textarea:focus {
    border-color: rgba(165, 25, 45, 0.6);

    background: rgba(120, 10, 25, 0.04);
}



/* DELIVERY */

.delivery-options {
    display: flex;

    gap: 0.7rem;
}


.delivery-option {
    position: relative;

    flex: 1;

    min-height: 2.8rem;

    display: flex;

    align-items: center;

    gap: 0.6rem;

    padding: 0 0.8rem;

    border: 1px solid rgba(255, 255, 255, 0.07);

    border-radius: 0.2rem;

    cursor: pointer;

    font-size: 0.52rem;

    color: rgba(255, 255, 255, 0.6);

    transition: 0.3s ease;
}


.delivery-option:hover {
    border-color: rgba(165, 25, 45, 0.45);
}


.delivery-option input {
    position: absolute;

    opacity: 0;
}


.custom-radio {
    width: 0.7rem;

    height: 0.7rem;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, 0.25);

    border-radius: 50%;
}


.delivery-option input:checked+.custom-radio {
    border-color: #a51b38;

    box-shadow:
        inset 0 0 0 0.18rem #080808,
        inset 0 0 0 0.38rem #a51b38;
}



/* SUMMARY */

.checkout-summary {
    position: sticky;

    top: 1.5rem;

    padding: 1.4rem;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 0.3rem;

    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.015));
}


.summary-heading {
    padding-bottom: 1rem;

    margin-bottom: 1rem;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}


.summary-heading small {
    display: block;

    margin-bottom: 0.35rem;

    font-family: "Cinzel", serif;

    font-size: 0.38rem;

    letter-spacing: 0.18rem;

    color: rgba(255, 255, 255, 0.25);
}


.summary-heading h2 {
    margin: 0;

    font-size: 0.8rem;

    font-weight: 400;
}



/* PRODUCTS */

.summary-product {
    display: flex;

    align-items: center;

    gap: 0.7rem;

    padding-bottom: 0.8rem;

    margin-bottom: 0.8rem;

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.summary-image {
    width: 3.3rem;

    height: 3.3rem;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 0.2rem;
}


.summary-image img {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;
}


.summary-product>div:last-child {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 0.2rem;
}


.summary-product strong {
    font-family: "Cinzel", serif;

    font-size: 0.48rem;

    font-weight: 500;
}


.summary-product small {
    font-size: 0.42rem;

    color: rgba(255, 255, 255, 0.3);
}


.summary-product span {
    font-size: 0.46rem;

    color: rgba(255, 255, 255, 0.55);
}



/* SUMMARY LINES */

.summary-lines {
    display: flex;

    flex-direction: column;

    gap: 0.55rem;

    padding: 0.4rem 0 0.9rem;
}


.summary-lines div {
    display: flex;

    align-items: center;

    justify-content: space-between;
}


.summary-lines span {
    font-size: 0.46rem;

    color: rgba(255, 255, 255, 0.35);
}


.summary-lines strong {
    font-size: 0.46rem;

    font-weight: 400;

    color: rgba(255, 255, 255, 0.65);
}



/* TOTAL */

.summary-total {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-top: 0.9rem;

    border-top: 1px solid rgba(255, 255, 255, 0.09);
}


.summary-total span {
    font-size: 0.5rem;

    color: rgba(255, 255, 255, 0.5);
}


.summary-total strong {
    font-size: 0.7rem;

    font-weight: 400;
}


.payment-button {
    width: 100%;

    height: 2.9rem;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 0.7rem;

    margin-top: 1.2rem;

    border: 1px solid rgba(165, 25, 45, 0.6);

    border-radius: 0.2rem;

    background: rgba(130, 10, 28, 0.25);

    color: #fff;

    font-family: "Vazirmatn", sans-serif;

    font-size: 0.55rem;

    cursor: pointer;

    transition: 0.3s ease;
}


.payment-button:hover {
    background: rgba(160, 15, 38, 0.55);

    border-color: rgba(200, 35, 60, 0.8);

    transform: translateY(-0.1rem);
}


.payment-button i {
    transition: transform 0.3s ease;
}


.payment-button:hover i {
    transform: translateX(-0.2rem);
}


.summary-note {
    margin: 0.8rem 0 0;

    text-align: center;

    font-size: 0.4rem;

    line-height: 1.8;

    color: rgba(255, 255, 255, 0.22);
}


.summary-terms {
    display: block;

    margin-top: 0.25rem;

    text-align: center;

    font-size: 0.4rem;

    color: rgba(165, 25, 45, 0.8);

    text-decoration: none;

    transition: color 0.3s ease;
}


.summary-terms:hover {
    color: #fff;
}


.checkout-message {
    display: none;
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem 1.2rem;
    border: 0.0625rem solid rgba(150, 0, 0, 0.5);
    border-radius: 0.5rem;
    background: rgba(70, 0, 0, 0.2);
    color: #e8dede;
    font-size: 0.7rem;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

.checkout-message.error {
    display: block;
}

.checkout-message.success {
    display: block;
}

/* ========================================
   RESPONSIVE — CHECKOUT
======================================== */


/* =========================
   TABLET
========================= */

@media (max-width: 60rem) {

    .checkout-page {
        padding:
            2.5rem 4vw 3.5rem;
    }

    .checkout-layout {
        width: 100%;

        grid-template-columns:
            minmax(0, 1fr) 18rem;

        gap: 1.5rem;
    }

    .checkout-box {
        padding: 1.1rem;
    }

    .checkout-summary {
        padding: 1.2rem;
    }

}


/* =========================
   SMALL TABLET
========================= */

@media (max-width: 50rem) {

    .checkout-header {
        height: 4.2rem;

        padding:
            0 5vw;
    }

    .checkout-back {
        right: 5vw;

        font-size: 0.55rem;
    }

    .checkout-label {
        left: 5vw;

        font-size: 0.4rem;
    }

    .checkout-logo {
        font-size: 0.88rem;
    }


    .checkout-page {
        padding:
            2.3rem 5vw 3rem;
    }


    .checkout-title {
        margin-bottom: 2rem;
    }


    .checkout-layout {
        display: flex;

        flex-direction: column;

        width: 100%;

        gap: 1.5rem;
    }


    .checkout-form {
        width: 100%;
    }


    .checkout-summary {
        position: relative;

        top: auto;

        width: 100%;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 37.5rem) {

    .checkout-header {
        height: 4rem;

        padding:
            0 5%;
    }


    .checkout-logo {
        font-size: 0.75rem;

        letter-spacing: 0.2rem;
    }


    .checkout-back {
        right: 5%;

        gap: 0.3rem;

        font-size: 0.48rem;
    }


    .checkout-back i {
        font-size: 0.6rem;
    }


    .checkout-label {
        display: none;
    }


    .checkout-page {
        padding:
            2rem 5% 2.5rem;
    }


    .checkout-title {
        margin-bottom: 1.7rem;
    }


    .checkout-title span {
        font-size: 0.4rem;

        letter-spacing: 0.18rem;

        margin-bottom: 0.6rem;
    }


    .checkout-title h1 {
        font-size: 1.4rem;
    }


    /* =====================
       CHECKOUT BOX
    ===================== */

    .checkout-box {
        padding: 0.9rem;
    }


    .checkout-box-title {
        gap: 0.65rem;

        margin-bottom: 0.9rem;

        padding-bottom: 0.75rem;
    }


    .checkout-box-title>span {
        font-size: 0.48rem;
    }


    .checkout-box-title small {
        font-size: 0.34rem;

        letter-spacing: 0.12rem;
    }


    .checkout-box-title h2 {
        font-size: 0.7rem;
    }


    /* =====================
       INPUTS
    ===================== */

    .checkout-grid {
        grid-template-columns: 1fr;

        gap: 0.7rem;
    }


    .checkout-input.full {
        grid-column: auto;
    }


    .checkout-input label {
        font-size: 0.45rem;
    }


    .checkout-input input {
        height: 2.4rem;

        padding:
            0 0.6rem;

        font-size: 0.5rem;
    }


    .checkout-input textarea {
        min-height: 5rem;

        padding: 0.6rem;

        font-size: 0.5rem;
    }


    /* =====================
       DELIVERY
    ===================== */

    .delivery-options {
        flex-direction: column;

        gap: 0.6rem;
    }


    .delivery-option {
        min-height: 2.6rem;

        padding:
            0 0.7rem;

        font-size: 0.5rem;
    }


    /* =====================
       SUMMARY
    ===================== */

    .checkout-summary {
        padding: 1rem;
    }


    .summary-heading {
        padding-bottom: 0.8rem;

        margin-bottom: 0.8rem;
    }


    .summary-heading small {
        font-size: 0.34rem;

        letter-spacing: 0.14rem;
    }


    .summary-heading h2 {
        font-size: 0.75rem;
    }


    .summary-product {
        gap: 0.6rem;

        padding-bottom: 0.7rem;

        margin-bottom: 0.7rem;
    }


    .summary-image {
        width: 3rem;

        height: 3rem;
    }


    .summary-product strong {
        font-size: 0.45rem;
    }


    .summary-product small {
        font-size: 0.39rem;
    }


    .summary-product span {
        font-size: 0.43rem;
    }


    .summary-lines {
        gap: 0.5rem;

        padding:
            0.35rem 0 0.8rem;
    }


    .summary-lines span,
    .summary-lines strong {
        font-size: 0.43rem;
    }


    .summary-total {
        padding-top: 0.8rem;
    }


    .summary-total span {
        font-size: 0.46rem;
    }


    .summary-total strong {
        font-size: 0.62rem;
    }


    .payment-button {
        height: 2.7rem;

        margin-top: 1rem;

        font-size: 0.52rem;
    }


    .summary-note,
    .summary-terms {
        font-size: 0.38rem;
    }

}


/* =========================
   VERY SMALL PHONES
========================= */

@media (max-width: 23.75rem) {

    .checkout-page {
        padding-left: 4%;
        padding-right: 4%;
    }


    .checkout-back span {
        display: none;
    }


    .checkout-logo {
        font-size: 0.7rem;

        letter-spacing: 0.17rem;
    }


    .checkout-box {
        padding: 0.8rem;
    }


    .checkout-title h1 {
        font-size: 1.3rem;
    }


    .summary-product strong {
        font-size: 0.42rem;
    }


    .summary-product small {
        font-size: 0.36rem;
    }


    .summary-product span {
        font-size: 0.4rem;
    }

}