figcaption {
    display: none;
}

main {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    gap: 22px;
    padding-top: clamp(30px, 2.7vh, 40px);
    padding-bottom: clamp(40px, 5.5vh, 60px);
}

#section-products-cart {
    width: 38.89vw;
    max-width: 559px;
    height: 650px;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2.9vh, 30px);
}

.title-cart {
    font-family: var(--fonte-montserrat);
    font-weight: 600;
    color: var(--cor-destaque);
    font-size: clamp(16px, 2.22vw, 32px);
    margin: 0 !important;
}

#container-products-cart {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: clamp(10px, 2vw, 20px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#container-products-cart::-webkit-scrollbar {
    display: none;
}

.product-cart {
    width: 100%;
    height: 112px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--fundo-secundario);
    border-radius: 10px;
    gap: 12px;
    padding: 10px;
}

#container-img-info-product {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    gap: 8px;
}

#img-product-cart {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 10px;
}

#container-info-about-product {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    gap: 4px;
}

#name-product-cart {
    font-family: var(--fonte-montserrat);
    font-weight: 600;
    color: var(--cor-branca);
    font-size: clamp(10px, 1.9vw, 16px);
    margin: 0 !important;
}

#price-product-cart {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    color: var(--cor-branca);
    font-size: clamp(14px, 1.1vw, 16px);
    margin: 0 !important;
}

#quantity-product-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
}

#txt-quantity {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    color: var(--cor-branca);
    font-size: clamp(14px, 1.1vw, 16px);
    margin: 0 !important;
}

#increment-decrement-product {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    height: 100%;
}

#icon-circle-minus {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--cor-branca);
    margin: 0 !important;
}

#quantity-product {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    color: var(--cor-branca);
    font-size: clamp(14px, 1.1vw, 16px);
    margin: 0 !important;
}

#icon-circle-plus {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--cor-branca);
    margin: 0 !important;
}

#icon-trash-2 {
    width: 25px;
    height: 25px;
    cursor: pointer;
    color: var(--cor-branca);
    margin: 0 !important;
    transition: color 0.2s;
}

#icon-trash-2:hover {
    color: #FF6B6B;
}

#section-buy-cart {
    width: 27.77vw;
    max-width: 399px;
    height: 650px;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2.9vh, 30px);
}

#container-buy-cart {
    width: 100%;
    height: 100%;
    background-color: var(--fundo-secundario);
    border-radius: 10px;
    padding: clamp(20px, 1.73vw, 25px);
    overflow-y: auto;
    scrollbar-width: none;
}

#container-buy-cart::-webkit-scrollbar {
    display: none;
}

#header-buy-cart {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 10px 0;
    border-bottom: 1px solid var(--cor-destaque);
}

#container-title-quantity-product {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

#quantity-product-buy-cart,
#title-quantity-product {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    font-size: clamp(20px, 1.66vw, 24px);
    color: var(--cor-branca);
    margin: 0;
}

#title-price-total-buy-cart {
    font-family: var(--fonte-montserrat);
    font-weight: bold;
    font-size: clamp(20px, 1.66vw, 24px);
    color: var(--cor-branca);
    margin: 0;
}

#main-delivery-product {
    padding: 16px 0 16px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(18px, 1.38vw, 20px);
}

#title-delivery-product {
    font-family: var(--fonte-montserrat);
    font-weight: bold;
    font-size: clamp(20px, 1.66vw, 24px);
    color: var(--cor-branca);
    margin: 0;
}

#container-calc-freight-product {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(19px, 1.45vw, 21px);
}

#input-calc-freight-product {
    width: 100%;
    max-width: 164px;
    height: 50px;
    border: none;
    outline: none;
    border-radius: 8px;
    background-color: var(--fundo-inputs);
    font-family: var(--fonte-montserrat);
    font-weight: 600;
    font-size: clamp(16px, 1.25vw, 18px);
    color: var(--cor-branca);
    text-align: center;
    transition: .3s ease;
}

#input-calc-freight-product:focus-within {
    box-shadow: 0px 0px 1px 2px var(--cor-branca);
}

#input-calc-freight-product::placeholder {
    font-family: var(--fonte-montserrat);
    font-weight: 500;
    font-size: clamp(16px, 1.25vw, 18px);
    color: var(--cor-branca);
}

#btn-calc-freight-product {
    border: none;
    outline: none;
    width: 80%;
    max-width: 154px;
    height: 50px;
    border-radius: 30px;
    background-color: transparent;
    border: 2px solid var(--cor-destaque);
    font-family: var(--fonte-montserrat);
    font-weight: 600;
    font-size: clamp(14px, 1.11vw, 16px);
    color: var(--cor-destaque);
    transition: .3s ease;
    cursor: pointer;
}

#btn-calc-freight-product:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── opções de frete ── */

#container-service-orders {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--cor-destaque);
    padding: 0 0 29px 0;
}

/* quando há pelo menos uma opção renderizada, mostra a borda */
#container-service-orders:empty {
    border-bottom: none;
    padding: 0;
}

.service-order {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px 5px 10px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.service-order:hover {
    border-color: var(--cor-destaque);
}

/* estado selecionado — comportamento de radio */
.service-order.selected {
    border-color: var(--cor-destaque);
    background-color: rgba(201, 244, 14, 0.08);
}

.info-service-order {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.title-service-order {
    font-family: var(--fonte-montserrat);
    font-weight: 600;
    font-size: clamp(14px, 1.11vw, 16px);
    color: var(--cor-branca);
    margin: 0;
    border-right: 1px solid var(--cor-branca);
    padding-right: 6px;
}

.info-service-order p:nth-child(3),
.business-day {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    font-size: clamp(14px, 1.11vw, 16px);
    color: var(--cor-branca);
    margin: 0;
}

.service-order-value-total {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    font-size: clamp(14px, 1.11vw, 16px);
    color: var(--cor-branca);
    margin: 0;
}

#footer-delivery-product {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

#footer-title-total-value {
    font-family: var(--fonte-montserrat);
    font-weight: 100;
    font-size: clamp(20px, 1.66vw, 24px);
    color: var(--cor-branca);
    margin: 0;
}

#footer-total-value {
    font-family: var(--fonte-montserrat);
    font-weight: bold;
    font-size: clamp(20px, 1.66vw, 24px);
    color: var(--cor-branca);
    margin: 0;
}

#btn-finish-buy {
    margin-top: 20px;
    border: none;
    outline: none;
    width: 100%;
    height: 50px;
    border-radius: 30px;
    background-color: var(--cor-destaque);
    font-family: var(--fonte-montserrat);
    font-weight: bold;
    font-size: clamp(16px, 1.25vw, 18px);
    color: #1D0F28;
    cursor: pointer;
    transition: .3s ease;
}

#btn-finish-buy:hover {
    background-color: #CFED89;
}

/* ── mobile ── */


@media (max-width: 768px) {
    main {
        flex-direction: column;
        gap: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    #section-products-cart {
        width: 100%;
        max-width: 100%;
        height: 366px;
        max-height: 366px;
        padding: 24px;
    }

    .title-cart {
        font-size: clamp(18px, 2vw, 20px);
    }

    #section-buy-cart .title-cart {
        font-size: clamp(18px, 2vw, 20px);
        padding-left: 25px;
    }

    #section-buy-cart {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
    }

    #name-product-cart {
        font-size: 18px;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    #price-product-cart {
        font-size: 16px;
    }

    #txt-quantity {
        font-size: 16px;
    }

    #quantity-product {
        font-size: 16px;
    }

    #icon-circle-minus,
    #icon-circle-plus {
        width: 20px;
        height: 20px;
    }

    #icon-trash-2 {
        width: 25px;
        height: 25px;
    }

    #input-calc-freight-product {
        height: 40px;
        font-size: 16px;
    }

    #input-calc-freight-product::placeholder {
        font-size: 16px;
    }

    #btn-calc-freight-product {
        height: 40px;
        font-size: clamp(14px, 1.11vw, 16px);
    }

    .title-service-order {
        font-size: 16px;
    }

    .info-service-order p:nth-child(3),
    .business-day {
        font-size: 16px;
    }

    .service-order-value-total {
        font-size: 16px;
    }

    #footer-title-total-value {
        font-size: 20px;
    }

    #footer-total-value {
        font-size: 20px;
    }

    #btn-finish-buy {
        font-size: 18px;
    }
}

@media screen and (min-width: 768px) and (max-width: 992px) {
    main {
        flex-direction: column;
        margin: 0 10em;
        width: auto;
        height: auto;
    }

    #container-buy-cart {
        width: 100%;
        min-width: 100%;
        height: auto;
    }

    #section-products-cart {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
    }

    #section-buy-cart {
        max-width: auto;
        height: auto;
        width: 100%;
        max-width: 100%;
    }

    #icon-trash-2 {
        width: 25px;
        height: 25px;
    }
}

@media screen and (max-width: 768px) {
    #modal-payment-box {
        padding: 24px 20px;
        max-height: 95vh;
        border-radius: 16px;
    }

}

/* MODAL DE PAGAMENTO */

#modal-payment-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.72);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#modal-payment-overlay.active {
    display: flex;
}

#modal-payment-box {
    background-color: var(--fundo-secundario);
    border-radius: 20px;
    padding: 32px 36px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    animation: modalIn 0.25s ease;
    position: relative;
}

#modal-payment-box::-webkit-scrollbar {
    display: none;
}

.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
}

/* Header */
.modal-pay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.modal-pay-title {
    font-family: var(--fonte-montserrat);
    font-weight: 700;
    font-size: clamp(16px, 1.5vw, 20px);
    color: var(--cor-destaque);
    margin: 0;
}

.modal-pay-close {
    background: none;
    border: none;
    color: var(--fundo-inputs);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: color 0.2s;
    line-height: 1;
}

.modal-pay-close:hover {
    color: var(--cor-branca);
}

/* Items list */
.modal-order-items {
    max-height: 130px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 244, 14, 0.3) transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    padding-right: 4px;
}

.modal-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.modal-order-item-name {
    font-family: var(--fonte-montserrat);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cor-branca);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.modal-order-item-qty {
    font-family: var(--fonte-montserrat);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--fundo-inputs);
    white-space: nowrap;
    margin: 0;
}

.modal-order-item-price {
    font-family: var(--fonte-montserrat);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cor-branca);
    white-space: nowrap;
    margin: 0;
}

.modal-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.modal-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.modal-summary-label,
.modal-summary-value {
    font-family: var(--fonte-montserrat);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--fundo-inputs);
    margin: 0;
}

.modal-summary-value {
    font-weight: 600;
    color: var(--cor-branca);
}

.modal-summary-row.total .modal-summary-label,
.modal-summary-row.total .modal-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cor-destaque);
}

.modal-pay-method-title {
    font-family: var(--fonte-montserrat);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fundo-inputs);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 20px 0 10px;
}

.modal-pay-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

.modal-pay-method-btn {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
    color: var(--fundo-inputs);
}

.modal-pay-method-btn:hover {
    border-color: rgba(201, 244, 14, 0.35);
    color: var(--cor-branca);
}

.modal-pay-method-btn.selected {
    border-color: var(--cor-destaque);
    background-color: rgba(201, 244, 14, 0.07);
    color: var(--cor-destaque);
}

.modal-pay-method-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-pay-method-label {
    font-family: var(--fonte-montserrat);
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-pay-back {
    background: none;
    border: none;
    color: var(--fundo-inputs);
    font-family: var(--fonte-montserrat);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 0 18px 0;
    transition: color 0.2s;
}

.modal-pay-back:hover {
    color: var(--cor-branca);
}

.modal-pay-back svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* PIX */
.modal-pix-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 10px 0 4px;
}

.modal-pix-qr-img {
    width: 156px;
    height: 156px;
    border-radius: 12px;
    background-color: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-pix-qr-img svg {
    width: 100%;
    height: 100%;
}

.modal-pix-instruction {
    font-family: var(--fonte-montserrat);
    font-size: 0.8rem;
    color: var(--fundo-inputs);
    text-align: center;
    margin: 0;
    max-width: 290px;
    line-height: 1.5;
}

.modal-pix-key-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--fundo-inputs);
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
}

.modal-pix-key {
    font-family: var(--fonte-montserrat);
    font-size: 0.72rem;
    color: var(--cor-branca);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.modal-copy-btn {
    background: none;
    border: none;
    color: var(--cor-destaque);
    cursor: pointer;
    font-family: var(--fonte-montserrat);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.modal-copy-btn:hover {
    opacity: 0.7;
}

/* BOLETO */
.modal-boleto-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 12px 0 4px;
}

.modal-boleto-barcode {
    display: flex;
    align-items: stretch;
    height: 72px;
    width: 100%;
    max-width: 340px;
    overflow: hidden;
    border-radius: 6px;
    background: white;
    padding: 8px;
    box-sizing: border-box;
}

.modal-boleto-instruction {
    font-family: var(--fonte-montserrat);
    font-size: 0.8rem;
    color: var(--fundo-inputs);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.modal-card-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 8px;
}

.modal-card-input {
    width: 100%;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    outline: none;
    border-radius: 10px;
    background-color: var(--fundo-inputs);
    font-family: var(--fonte-montserrat);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--cor-branca);
    padding: 0 14px;
    transition: border-color 0.2s;
}

.modal-card-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    font-weight: 400;
}

.modal-card-input:focus {
    border-color: var(--cor-destaque);
}

.modal-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-modal-pay-confirm {
    margin-top: 18px;
    border: none;
    outline: none;
    width: 100%;
    height: 50px;
    border-radius: 30px;
    background-color: var(--cor-destaque);
    font-family: var(--fonte-montserrat);
    font-weight: 700;
    font-size: 0.95rem;
    color: #1D0F28;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn-modal-pay-confirm:hover {
    background-color: #CFED89;
}

.btn-modal-pay-confirm:disabled {
    opacity: 0.45;
    cursor: default;
}

.modal-success-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0 10px;
    text-align: center;
}

.modal-success-anim-ring {
    width: 88px;
    height: 88px;
}

.checkmark-circle {
    stroke: var(--cor-destaque);
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: drawCircle 0.55s cubic-bezier(.65, 0, .45, 1) forwards 0.15s;
    transform-origin: center;
    transform: rotate(-90deg);
}

.checkmark-circle-bg {
    fill: rgba(201, 244, 14, 0.08);
}

.checkmark-check {
    stroke: var(--cor-destaque);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 55;
    stroke-dashoffset: 55;
    animation: drawCheck 0.4s cubic-bezier(.65, 0, .45, 1) forwards 0.65s;
}

/* Ajustes nas opções de fretes */

.service-order {
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    
}

.service-order-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* lado esquerdo */
.service-order .left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* nome da transportadora */
.service-order .title {
    font-weight: 600;
    color: white;
    font-size: 1.2rem;
}

/* prazo */
.service-order .delivery {
    font-size: 0.85rem;
    color: white;
    font-size: 1rem;
}

/* preço sempre alinhado */
.service-order .right {
    min-width: 90px; 
    text-align: right;
}

.service-order .price {
    font-weight: 600;
    color: white;
    font-size: 1.3rem;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.modal-success-title {
    font-family: var(--fonte-montserrat);
    font-weight: 700;
    font-size: clamp(18px, 1.5vw, 22px);
    color: var(--cor-branca);
    margin: 0;
}

.modal-success-sub {
    font-family: var(--fonte-montserrat);
    font-size: 0.88rem;
    color: var(--fundo-inputs);
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}

.modal-success-order-num {
    font-family: var(--fonte-montserrat);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cor-destaque);
    margin: 0;
    background: rgba(201, 244, 14, 0.08);
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid rgba(201, 244, 14, 0.25);
}

@media (max-width: 576px) {
    #modal-payment-box {
        padding: 24px 20px;
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-pay-methods {
        gap: 8px;
    }

    .modal-pay-method-btn {
        padding: 12px 6px;
    }
}

.modal-method-panel {
    display: none;
}

.modal-method-panel.active {
    display: block;
}