/*
|--------------------------------------------------------------------------
| JERBEL — CARRINHO
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

.cart-page {
    min-height: 100vh;
    padding: 56px 0 80px;
    background:
        linear-gradient(
            180deg,
            #fffafb 0%,
            #faf7f8 100%
        );
}

.cart-container {
    width: min(1220px, 92%);
    margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| CABEÇALHO
|--------------------------------------------------------------------------
*/

.cart-heading {
    margin-bottom: 36px;
}

.cart-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #a94f70;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cart-heading h1 {
    margin: 0 0 10px;
    color: #57253a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.1;
}

.cart-heading p {
    max-width: 720px;
    margin: 0;
    color: #756a6f;
    font-size: 16px;
    line-height: 1.65;
}

/*
|--------------------------------------------------------------------------
| LAYOUT
|--------------------------------------------------------------------------
*/

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.cart-products,
.cart-summary-box,
.cart-empty {
    border: 1px solid #eadde3;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 16px 42px rgba(89, 49, 65, 0.07);
}

.cart-products {
    padding: 28px;
}

.cart-summary {
    position: sticky;
    top: 24px;
}

.cart-summary-box {
    padding: 26px;
}

/*
|--------------------------------------------------------------------------
| TOPO DOS PRODUTOS
|--------------------------------------------------------------------------
*/

.cart-products-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.cart-products-top h2,
.cart-summary-box h2 {
    margin: 0 0 7px;
    color: #4f2738;
    font-size: 23px;
}

.cart-products-top p {
    margin: 0;
    color: #83767c;
    font-size: 14px;
}

.cart-clear-button {
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: #9e3f5f;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| ITENS DO CARRINHO
|--------------------------------------------------------------------------
*/

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 18px;
    border: 1px solid #eee3e7;
    border-radius: 18px;
    background: #ffffff;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.cart-item:hover {
    border-color: #dfc4cf;
    box-shadow:
        0 12px 26px rgba(81, 45, 59, 0.07);
    transform: translateY(-1px);
}

.cart-item-unavailable {
    opacity: 0.68;
    background: #fbf8f9;
}

.cart-item-image {
    display: block;
    width: 126px;
    height: 126px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 16px;
    background: #f5eef1;
}

.cart-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a08e96;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 700;
}

.cart-item-info {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.cart-item-name {
    display: inline-block;
    color: #3f2b34;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}

.cart-item-name:hover {
    color: #8e3556;
}

.cart-item-sku {
    display: block;
    margin-top: 7px;
    color: #9b8d93;
    font-size: 12px;
}

.cart-item-unit-price {
    flex-shrink: 0;
    color: #913b5c;
    font-size: 20px;
    white-space: nowrap;
}

.cart-stock-warning {
    display: block;
    margin-top: 10px;
    color: #a56c00;
    font-size: 13px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| PERSONALIZAÇÃO
|--------------------------------------------------------------------------
*/

.cart-personalization {
    margin-top: 14px;
    padding: 13px 14px;
    border: 1px solid #eadde3;
    border-radius: 13px;
    background: #fcf8fa;
}

.cart-personalization > strong {
    display: block;
    margin-bottom: 8px;
    color: #6e344c;
    font-size: 13px;
}

.cart-personalization ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-personalization li {
    min-width: 0;
    color: #70646a;
    font-size: 13px;
    line-height: 1.45;
}

.cart-personalization li span {
    color: #8a7c82;
}

.cart-personalization li strong {
    color: #4d3540;
}

.cart-item-observation {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid #c6819b;
    border-radius: 0 10px 10px 0;
    background: #fff9fb;
    color: #6f6067;
    font-size: 13px;
    line-height: 1.55;
}

.cart-item-observation strong {
    color: #5a3444;
}

/*
|--------------------------------------------------------------------------
| QUANTIDADE E AÇÕES
|--------------------------------------------------------------------------
*/

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
}

.cart-quantity {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #ddcfd5;
    border-radius: 12px;
    background: #ffffff;
}

.cart-quantity-button {
    width: 40px;
    height: 40px;
    border: 0;
    cursor: pointer;
    background: #f8f2f4;
    color: #73344e;
    font-size: 20px;
    font-weight: 700;
}

.cart-quantity-button:hover:not(:disabled) {
    background: #efe1e7;
}

.cart-quantity-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.cart-quantity-input {
    width: 58px;
    height: 40px;
    border: 0;
    outline: 0;
    background: #ffffff;
    color: #47323b;
    font: inherit;
    font-weight: 700;
    text-align: center;
}

.cart-quantity-input::-webkit-inner-spin-button,
.cart-quantity-input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cart-item-subtotal {
    color: #3f2c34;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.cart-remove-button {
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: #b43d52;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.cart-remove-button:hover {
    text-decoration: underline;
}

/*
|--------------------------------------------------------------------------
| RODAPÉ DA LISTA
|--------------------------------------------------------------------------
*/

.cart-products-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #eee3e7;
}

.cart-continue-link,
.cart-continue-shopping {
    color: #765f69;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.cart-continue-link:hover,
.cart-continue-shopping:hover {
    color: #8e3556;
}

.cart-update-button {
    min-width: 180px;
}

/*
|--------------------------------------------------------------------------
| RESUMO
|--------------------------------------------------------------------------
*/

.cart-summary-box h2 {
    margin-bottom: 22px;
}

.cart-summary-row,
.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cart-summary-row {
    margin: 14px 0;
    color: #74676d;
    font-size: 15px;
}

.cart-summary-row strong {
    color: #433039;
}

.cart-discount {
    color: #28784b !important;
}

.cart-summary-box hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eadfe3;
}

.cart-summary-total {
    color: #4b2938;
    font-size: 22px;
    font-weight: 800;
}

.cart-summary-total strong {
    color: #8b3153;
    font-size: 25px;
}

.cart-frete-servico {
    display: block;
    margin-top: -5px;
    color: #887a81;
    font-size: 12px;
    line-height: 1.45;
}

/*
|--------------------------------------------------------------------------
| CUPOM E FRETE
|--------------------------------------------------------------------------
*/

.cart-coupon,
.cart-frete {
    display: grid;
    gap: 11px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #eee3e7;
}

.cart-coupon label,
.cart-frete label {
    display: grid;
    gap: 7px;
    color: #5d414e;
    font-size: 13px;
    font-weight: 800;
}

.cart-coupon input,
.cart-frete input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #dccccf;
    border-radius: 11px;
    outline: 0;
    background: #ffffff;
    color: #3e3036;
    font: inherit;
}

.cart-coupon input:focus,
.cart-frete input:focus {
    border-color: #a85a76;
    box-shadow:
        0 0 0 3px rgba(168, 90, 118, 0.12);
}

.cart-coupon .btn,
.cart-frete .btn {
    width: 100%;
}

.cart-coupon-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #cde7d7;
    border-radius: 12px;
    background: #f0faf4;
}

.cart-coupon-active span {
    color: #52705e;
    font-size: 13px;
}

.cart-coupon-active strong {
    color: #277348;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| CHECKOUT E SEGURANÇA
|--------------------------------------------------------------------------
*/

.cart-checkout-button {
    width: 100%;
    min-height: 50px;
    margin-top: 26px;
    font-size: 16px;
}

.cart-continue-shopping {
    display: block;
    margin-top: 16px;
    text-align: center;
}

.cart-security {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 24px;
}

.cart-security-item {
    padding: 13px 14px;
    border: 1px solid #eee4e8;
    border-radius: 13px;
    background: #fcfafb;
}

.cart-security-item strong {
    display: block;
    margin-bottom: 4px;
    color: #553744;
    font-size: 13px;
}

.cart-security-item span {
    display: block;
    color: #81747a;
    font-size: 12px;
    line-height: 1.45;
}

/*
|--------------------------------------------------------------------------
| ALERTAS
|--------------------------------------------------------------------------
*/

.cart-alert {
    margin-bottom: 22px;
    padding: 15px 17px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
}

.cart-alert-success {
    border: 1px solid #cce8d6;
    background: #edf9f1;
    color: #246f43;
}

.cart-alert-error {
    border: 1px solid #f1cfd5;
    background: #fff1f3;
    color: #a1364d;
}

.cart-warning {
    margin-top: 20px;
    padding: 13px 14px;
    border: 1px solid #edd99f;
    border-radius: 13px;
    background: #fff9e8;
    color: #836000;
    font-size: 13px;
    line-height: 1.5;
}

/*
|--------------------------------------------------------------------------
| CARRINHO VAZIO
|--------------------------------------------------------------------------
*/

.cart-empty {
    padding: 76px 34px;
    text-align: center;
}

.cart-empty-icon {
    margin-bottom: 18px;
    font-size: 54px;
}

.cart-empty h2 {
    margin: 0 0 10px;
    color: #542b3d;
    font-size: 27px;
}

.cart-empty p {
    max-width: 520px;
    margin: 0 auto 24px;
    color: #81747a;
    line-height: 1.65;
}

/*
|--------------------------------------------------------------------------
| ESTADOS
|--------------------------------------------------------------------------
*/

.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.48;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVIDADE
|--------------------------------------------------------------------------
*/

@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 720px) {
    .cart-page {
        padding: 38px 0 60px;
    }

    .cart-products,
    .cart-summary-box {
        padding: 20px;
        border-radius: 18px;
    }

    .cart-products-top,
    .cart-products-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 270px;
    }

    .cart-item-main,
    .cart-item-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item-unit-price {
        font-size: 18px;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cart-personalization ul {
        grid-template-columns: 1fr;
    }

    .cart-update-button {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .cart-container {
        width: min(94%, 1220px);
    }

    .cart-products,
    .cart-summary-box {
        padding: 16px;
    }

    .cart-item {
        padding: 14px;
    }

    .cart-item-image {
        height: 220px;
    }

    .cart-item-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .cart-quantity {
        width: 100%;
        justify-content: space-between;
    }

    .cart-quantity-input {
        flex: 1;
    }
}