/* =========================================================
   MC2 DELIVERY
   CHECKOUT
========================================================= */


/* =========================================================
   PÁGINA
========================================================= */

.checkout-page {

    width: 100%;

    background: #f8f8f8;

    min-height: calc(100vh - 70px);

    padding: 35px 0 60px;

    box-sizing: border-box;

}


.checkout-container {

    width: 100%;

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 24px;

    box-sizing: border-box;

}


/* =========================================================
   CABEÇALHO
========================================================= */

.checkout-header {

    margin-bottom: 28px;

}


.checkout-header h1 {

    margin: 0 0 7px;

    color: #222;

    font-size: 30px;

    line-height: 1.25;

    font-weight: 700;

}


.checkout-header p {

    margin: 0;

    color: #777;

    font-size: 15px;

    line-height: 1.5;

}


/* =========================================================
   LAYOUT
========================================================= */

.checkout-layout {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    align-items: start;

    gap: 24px;

}


.checkout-main {

    display: flex;

    flex-direction: column;

    gap: 18px;

}


/* =========================================================
   CARD
========================================================= */

.checkout-card {

    width: 100%;

    padding: 22px;

    background: #fff;

    border: 1px solid #eeeeee;

    border-radius: 14px;

    box-sizing: border-box;

}


.checkout-card-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}


.checkout-card h2 {

    margin: 0 0 18px;

    color: #222;

    font-size: 19px;

    line-height: 1.3;

    font-weight: 700;

}


.checkout-card-header h2 {

    margin: 0;

}


/* =========================================================
   LINK DO CARD
========================================================= */

.checkout-card-link {

    color: #ea1d2c;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

}


.checkout-card-link:hover {

    text-decoration: underline;

}


/* =========================================================
   LIMPAR PEDIDO
========================================================= */

.checkout-clear-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 36px;

    padding: 0 13px;

    border: 1px solid #eeeeee;

    border-radius: 8px;

    background: #fff;

    color: #d71928;

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;

}


.checkout-clear-button:hover {

    background: #fff5f5;

    border-color: #f1c4c7;

}


/* =========================================================
   ITENS
========================================================= */

.checkout-items {

    display: flex;

    flex-direction: column;

}


.checkout-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #eeeeee;

}


.checkout-item:first-child {

    padding-top: 0;

}


.checkout-item:last-child {

    padding-bottom: 0;

    border-bottom: 0;

}


.checkout-item-info {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

}


.checkout-item-info strong {

    color: #222;

    font-size: 15px;

    font-weight: 600;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.checkout-item-info span {

    flex-shrink: 0;

    color: #777;

    font-size: 13px;

}


.checkout-item-price {

    flex-shrink: 0;

    color: #222;

    font-size: 14px;

    font-weight: 700;

}


/* =========================================================
   ENDEREÇOS
========================================================= */

.checkout-address-list {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.checkout-address-option {

    position: relative;

    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 15px;

    border: 1px solid #e5e5e5;

    border-radius: 10px;

    background: #fff;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;

}


.checkout-address-option:hover {

    border-color: #d7d7d7;

    background: #fcfcfc;

}


.checkout-address-option input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.checkout-radio {

    width: 18px;

    height: 18px;

    flex: 0 0 18px;

    margin-top: 2px;

    border: 2px solid #cccccc;

    border-radius: 50%;

    box-sizing: border-box;

}


.checkout-address-option
input:checked
+ .checkout-radio {

    border: 5px solid #ea1d2c;

}


.checkout-address-option
input:checked
~ .checkout-address-content {

    color: #222;

}


.checkout-address-option:has(
    input:checked
) {

    border-color: #ea1d2c;

    background: #fffafa;

}


.checkout-address-content {

    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 0;

    color: #666;

    font-size: 13px;

    line-height: 1.4;

}


.checkout-address-content strong {

    color: #222;

    font-size: 14px;

    font-weight: 600;

}


/* =========================================================
   NOVO ENDEREÇO
========================================================= */

.checkout-new-address {

    display: inline-flex;

    margin-top: 15px;

    color: #ea1d2c;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

}


.checkout-new-address:hover {

    text-decoration: underline;

}


/* =========================================================
   CAMPOS
========================================================= */

.checkout-help {

    margin: -8px 0 18px;

    color: #777;

    font-size: 13px;

    line-height: 1.4;

}


.checkout-field {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.checkout-field label {

    color: #333;

    font-size: 13px;

    font-weight: 600;

}


.checkout-field input {

    width: 100%;

    height: 44px;

    padding: 0 13px;

    border: 1px solid #dddddd;

    border-radius: 8px;

    background: #fff;

    color: #222;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.checkout-field input:focus {

    border-color: #ea1d2c;

    box-shadow:
        0 0 0 3px rgba(234, 29, 44, 0.08);

}


/* =========================================================
   CUPOM
========================================================= */

.checkout-coupon {

    display: flex;

    align-items: stretch;

    gap: 10px;

}


.checkout-coupon input {

    flex: 1;

    min-width: 0;

    height: 44px;

    padding: 0 13px;

    border: 1px solid #dddddd;

    border-radius: 8px;

    background: #fff;

    color: #222;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    box-sizing: border-box;

}


.checkout-coupon input:focus {

    border-color: #ea1d2c;

    box-shadow:
        0 0 0 3px rgba(234, 29, 44, 0.08);

}


.checkout-coupon-button {

    height: 44px;

    padding: 0 18px;

    border: 0;

    border-radius: 8px;

    background: #ea1d2c;

    color: #fff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.checkout-coupon-button:hover {

    background: #d71928;

}


.checkout-coupon-button:active {

    transform: scale(0.98);

}


.checkout-coupon-message {

    margin-top: 10px;

    font-size: 13px;

}


/* =========================================================
   PAGAMENTO
========================================================= */

.checkout-payment-list {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

}


.checkout-payment-option {

    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 70px;

    padding: 13px;

    border: 1px solid #e5e5e5;

    border-radius: 10px;

    background: #fff;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;

}


.checkout-payment-option:hover {

    border-color: #d4d4d4;

    background: #fcfcfc;

}


.checkout-payment-option:has(
    input:checked
) {

    border-color: #ea1d2c;

    background: #fff8f8;

    box-shadow:
        0 0 0 1px #ea1d2c;

}


.checkout-payment-option input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.checkout-payment-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 38px;

    height: 38px;

    flex: 0 0 38px;

    border-radius: 8px;

    background: #f5f5f5;

    font-size: 20px;

}


.checkout-payment-content {

    display: flex;

    flex-direction: column;

    gap: 3px;

    min-width: 0;

}


.checkout-payment-content strong {

    color: #222;

    font-size: 14px;

    font-weight: 600;

}


.checkout-payment-content small {

    color: #777;

    font-size: 11px;

}


/* =========================================================
   RESUMO
========================================================= */

.checkout-summary {

    position: sticky;

    top: 20px;

    width: 100%;

    padding: 22px;

    background: #fff;

    border: 1px solid #eeeeee;

    border-radius: 14px;

    box-sizing: border-box;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.04);

}


.checkout-summary h2 {

    margin: 0 0 22px;

    color: #222;

    font-size: 19px;

    font-weight: 700;

}


.checkout-summary-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 13px;

    color: #666;

    font-size: 14px;

}


.checkout-summary-row strong {

    color: #333;

    font-weight: 600;

}


.checkout-summary-divider {

    width: 100%;

    height: 1px;

    margin: 18px 0;

    background: #eeeeee;

}


.checkout-summary-total {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}


.checkout-summary-total span {

    color: #222;

    font-size: 16px;

    font-weight: 600;

}


.checkout-summary-total strong {

    color: #ea1d2c;

    font-size: 22px;

    font-weight: 700;

}


/* =========================================================
   BOTÃO FINALIZAR
========================================================= */

.checkout-submit {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    min-height: 48px;

    padding: 0 20px;

    border: 0;

    border-radius: 9px;

    background: #ea1d2c;

    color: #fff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.checkout-submit:hover {

    background: #d71928;

    box-shadow:
        0 5px 14px rgba(234, 29, 44, 0.2);

}


.checkout-submit:active {

    transform: translateY(1px);

}


/* =========================================================
   ESTADO VAZIO
========================================================= */

.checkout-empty {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 10px;

    padding: 20px;

    border-radius: 10px;

    background: #fafafa;

    color: #777;

}


.checkout-empty p {

    margin: 0;

    font-size: 14px;

}


.checkout-empty a {

    color: #ea1d2c;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

}


.checkout-empty a:hover {

    text-decoration: underline;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .checkout-layout {

        grid-template-columns: 1fr;

    }


    .checkout-summary {

        position: static;

    }


}


/* =========================================================
   TABLET PEQUENO
========================================================= */

@media (max-width: 700px) {

    .checkout-page {

        padding: 25px 0 100px;

    }


    .checkout-container {

        padding: 0 16px;

    }


    .checkout-header {

        margin-bottom: 20px;

    }


    .checkout-header h1 {

        font-size: 25px;

    }


    .checkout-header p {

        font-size: 14px;

    }


    .checkout-main {

        gap: 14px;

    }


    .checkout-card {

        padding: 17px;

        border-radius: 12px;

    }


    .checkout-card h2 {

        font-size: 17px;

    }


    .checkout-card-header {

        align-items: flex-start;

    }


    .checkout-payment-list {

        grid-template-columns: 1fr;

    }


    .checkout-summary {

        padding: 18px;

        border-radius: 12px;

    }

}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 480px) {

    .checkout-page {

        padding-top: 20px;

    }


    .checkout-container {

        padding-left: 12px;

        padding-right: 12px;

    }


    .checkout-header h1 {

        font-size: 23px;

    }


    .checkout-header p {

        font-size: 13px;

    }


    .checkout-card {

        padding: 15px;

    }


    .checkout-card-header {

        gap: 10px;

    }


    .checkout-card-header h2 {

        font-size: 16px;

    }


    .checkout-clear-button {

        min-height: 34px;

        padding: 0 10px;

        font-size: 12px;

    }


    .checkout-item {

        gap: 10px;

    }


    .checkout-item-info {

        gap: 7px;

    }


    .checkout-item-info strong {

        font-size: 14px;

    }


    .checkout-item-price {

        font-size: 13px;

    }


    .checkout-coupon {

        flex-direction: column;

    }


    .checkout-coupon-button {

        width: 100%;

    }


    .checkout-address-option {

        padding: 13px;

    }


    .checkout-payment-option {

        min-height: 64px;

        padding: 11px;

    }


    .checkout-payment-icon {

        width: 34px;

        height: 34px;

        flex-basis: 34px;

        font-size: 18px;

    }


    .checkout-summary-total strong {

        font-size: 20px;

    }
    

    .checkout-item-image {

    width: 58px;

    height: 58px;

    flex-basis: 58px;

    border-radius: 8px;

    }


    .checkout-item-image-placeholder {

    font-size: 22px;

    }


    .checkout-item-info strong {

    font-size: 13px;

    }


    .checkout-item-quantity {

    font-size: 12px;

    }


    .checkout-item-unit-price {

    font-size: 11px;

    }


    .checkout-item-price {

    font-size: 12px;

    }


    .checkout-add-products-button {

    width: 100%;

    }
    
    .checkout-item-image {

        width: 54px;

        height: 54px;

        flex-basis: 54px;

        border-radius: 8px;

    }

}

/* =========================================================
   IMAGEM DO PRODUTO
========================================================= */

.checkout-item-image {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 72px;

    height: 72px;

    flex: 0 0 72px;

    overflow: hidden;

    border-radius: 10px;

    background: #f5f5f5;

}


.checkout-item-image img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.checkout-item-image-placeholder {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    height: 100%;

    background: #f5f5f5;

    font-size: 27px;

}


/* =========================================================
   INFORMAÇÕES DO ITEM
========================================================= */

.checkout-item-info {

    display: flex;

    flex: 1 1 auto;

    flex-direction: column;

    align-items: flex-start;

    justify-content: center;

    gap: 4px;

    min-width: 0;

}


.checkout-item-info strong {

    display: block;

    width: 100%;

    color: #222;

    font-size: 15px;

    line-height: 1.3;

    font-weight: 600;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.checkout-item-quantity {

    color: #555;

    font-size: 13px;

    font-weight: 600;

}


.checkout-item-unit-price {

    color: #888;

    font-size: 12px;

}


/* =========================================================
   ADICIONAR MAIS PRODUTOS
========================================================= */

.checkout-add-products {

    margin-top: 18px;

    padding-top: 18px;

    border-top: 1px solid #eeeeee;

}


.checkout-add-products-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding: 0 16px;

    border: 1px solid #ea1d2c;

    border-radius: 8px;

    background: #fff;

    color: #ea1d2c;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;

}


.checkout-add-products-button span {

    font-size: 19px;

    line-height: 1;

}


.checkout-add-products-button:hover {

    background: #ea1d2c;

    color: #fff;

}


/* =========================================================
   TÍTULO DO ENDEREÇO
========================================================= */

.checkout-address-title {

    color: #222 !important;

    font-size: 13px !important;

    font-weight: 700 !important;

}

/* =========================================================
   IMAGEM DO PRODUTO
========================================================= */

.checkout-item-image {

    width: 64px;

    height: 64px;

    flex: 0 0 64px;

    overflow: hidden;

    border-radius: 9px;

    background: #f5f5f5;

}


.checkout-item-image img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.checkout-item-image-placeholder {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    height: 100%;

    font-size: 25px;

}