/* =========================================================
   PILAR ONLINE - CARRINHO GLOBAL / MULTILOJA
   Entrega e cupom dentro de cada loja
========================================================= */

.global-cart-page {
    --global-red: #C1272D;
    --global-orange: #F47016;
    --cart-text: #252A31;
    --cart-muted: #68717C;
    --cart-line: #E1E4E8;
    --cart-soft: #F7F8FA;
    background: #F6F7F9;
    color: var(--cart-text);
}

.global-cart-page .store-container {
    width: min(1260px, calc(100% - 36px));
}

/* =========================================================
   HEADER
========================================================= */

.global-cart-simple-header {
    background: #C1272D;
}

.global-cart-simple-header > div {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.global-cart-simple-header img {
    width: 190px;
    max-height: 55px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.global-cart-simple-header a:last-child {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.global-cart-heading {
    align-items: flex-end;
    margin-bottom: 20px;
}

.global-cart-heading > div > span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
}

.global-cart-heading h1 {
    margin-top: 4px;
    font-size: 32px;
    letter-spacing: -.025em;
}

.global-cart-heading p {
    max-width: 720px;
    margin-top: 6px;
    color: var(--cart-muted);
    font-size: 13px;
    line-height: 1.6;
}

.global-cart-heading > a {
    font-size: 12px;
    font-weight: 600;
}

/* =========================================================
   AVISO MULTILOJA
========================================================= */

.multi-store-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 15px 17px;
    border: 1px solid #F0D8B9;
    border-radius: 12px;
    background: #FFF9F0;
}

.multi-store-notice-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: #F47016;
    font-size: 16px;
    font-weight: 700;
}

.multi-store-notice strong {
    display: block;
    color: #533B21;
    font-size: 13px;
}

.multi-store-notice p {
    margin: 4px 0 0;
    color: #75624D;
    font-size: 11px;
    line-height: 1.55;
}

/* =========================================================
   LAYOUT
========================================================= */

.global-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 18px;
}

.global-cart-stores {
    min-width: 0;
    display: grid;
    gap: 18px;
}

/* =========================================================
   CARD DA LOJA
========================================================= */

.store-cart-card {
    overflow: hidden;
    border: 1px solid #DDE1E5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(18, 25, 35, .04);
}

.store-cart-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 17px;
    border-bottom: 1px solid #E7EAED;
    background: #FCFCFD;
}

.store-cart-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.store-cart-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #DFE3E7;
    border-radius: 10px;
    color: #C1272D;
    background: #fff;
}

.store-cart-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

.store-cart-logo strong {
    font-size: 18px;
}

.store-cart-identity > div {
    min-width: 0;
}

.store-cart-identity span,
.store-cart-identity a,
.store-cart-identity small {
    display: block;
}

.store-cart-identity span {
    color: #818A95;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.store-cart-identity > div > a {
    margin-top: 2px;
    overflow: hidden;
    color: #2D343D;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.store-cart-identity small {
    margin-top: 3px;
    color: #737C87;
    font-size: 10px;
}

.store-cart-clear {
    border: 0;
    padding: 8px 4px;
    color: #A33E44;
    background: transparent;
    font: 600 10px Poppins, sans-serif;
    cursor: pointer;
}

/* =========================================================
   ITENS
========================================================= */

.store-cart-card .cart-items-list {
    border: 0;
}

.store-cart-card .cart-item {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    padding-top: 15px;
    padding-bottom: 15px;
}

.store-cart-card .cart-item-image {
    width: 90px;
    height: 90px;
    border-radius: 10px;
}

.store-cart-card .cart-item-name {
    color: #292F37;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.store-cart-card .cart-item-variation,
.store-cart-card .cart-item-unit-price {
    color: #68717C;
    font-size: 10.5px;
    line-height: 1.45;
}

.store-cart-card .cart-item-quantity > span,
.store-cart-card .cart-item-price > span {
    color: #7A838E;
    font-size: 9.5px;
}

.store-cart-card .cart-item-price strong {
    color: #2C323A;
    font-size: 14px;
}

.store-cart-card .quantity-control {
    min-width: 112px;
}

.store-cart-update-bar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 9px 16px;
    border-top: 1px solid #ECEEF1;
    background: #FAFBFC;
}

.store-cart-update-bar span {
    color: #707985;
    font-size: 10px;
}

.store-cart-update-bar button {
    min-height: 36px;
    border: 1px solid #D7DBE0;
    border-radius: 8px;
    padding: 0 13px;
    color: #4D5661;
    background: #fff;
    font: 600 10px Poppins, sans-serif;
    cursor: pointer;
}

/* =========================================================
   ENTREGA + CUPOM DENTRO DO BLOCO DA LOJA
========================================================= */

.store-cart-tools {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
    gap: 14px;
    padding: 16px;
    border-top: 1px solid #E7EAED;
    background: #F9FAFB;
}

.store-delivery-box,
.store-coupon-box {
    min-width: 0;
    padding: 16px;
    border: 1px solid #DFE3E7;
    border-radius: 11px;
    background: #fff;
}

.store-cart-tool-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.store-cart-tool-head > div {
    min-width: 0;
}

.store-cart-tool-head > div > span {
    display: block;
    color: var(--global-red);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
}

.store-cart-tool-head > div > strong {
    display: block;
    margin-top: 4px;
    color: #2C323A;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.store-cart-tool-head p {
    margin: 5px 0 0;
    color: #68717C;
    font-size: 10.5px;
    line-height: 1.55;
}

.store-delivery-form {
    margin-top: 14px;
}

.store-delivery-form > label {
    display: block;
    margin-bottom: 7px;
    color: #3F4751;
    font-size: 10px;
    font-weight: 600;
}

.store-delivery-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 8px;
}

.store-delivery-input-row input,
.store-coupon-preview-form input {
    width: 100%;
    height: 44px;
    border: 1px solid #C9CED5;
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    color: #252A31;
    background: #fff;
    font: 500 12px Poppins, sans-serif;
}

.store-delivery-input-row input:focus {
    border-color: var(--global-red);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, .08);
}

.store-delivery-input-row button,
.store-coupon-preview-form button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--global-red);
    font: 700 10.5px Poppins, sans-serif;
    cursor: pointer;
}

.store-delivery-input-row button:hover {
    background: #A91E24;
}

.store-delivery-input-row button:disabled {
    opacity: .65;
    cursor: wait;
}

.store-delivery-status {
    display: block;
    margin-top: 8px;
    color: #747D88;
    font-size: 9.5px;
    line-height: 1.5;
}

.store-delivery-status.loading {
    color: #745D25;
}

.store-delivery-status.success {
    color: #24734F;
}

.store-delivery-status.error {
    color: #A23C42;
}

.store-delivery-results {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.store-delivery-results[hidden] {
    display: none;
}

.store-delivery-loading,
.store-delivery-empty {
    padding: 12px;
    border: 1px solid #E1E4E8;
    border-radius: 9px;
    color: #68717C;
    background: #FAFBFC;
    font-size: 10px;
    line-height: 1.5;
}

.store-delivery-empty.error {
    color: #9E3A40;
    border-color: #EECFD1;
    background: #FFF6F6;
}

.store-delivery-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 9px 10px;
    border: 1px solid #E3E6EA;
    border-radius: 9px;
    background: #fff;
}

.store-delivery-option-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--global-red);
    background: #FBEFF0;
    font-size: 8px;
    font-weight: 700;
}

.store-delivery-option-copy {
    min-width: 0;
}

.store-delivery-option-copy strong,
.store-delivery-option-copy small,
.store-delivery-option-copy em {
    display: block;
}

.store-delivery-option-copy strong {
    color: #303640;
    font-size: 11px;
}

.store-delivery-option-copy small {
    margin-top: 2px;
    color: #707985;
    font-size: 9.5px;
    line-height: 1.45;
}

.store-delivery-option-copy em {
    margin-top: 3px;
    color: #3E7459;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 600;
}

.store-delivery-option > b {
    color: #282E36;
    font-size: 12px;
    white-space: nowrap;
}

.store-delivery-warnings p {
    margin: 7px 0 0;
    padding: 8px 9px;
    border-radius: 8px;
    color: #725D2A;
    background: #FFF7E5;
    font-size: 9px;
    line-height: 1.5;
}

/* CUPOM */
.store-coming-soon {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    color: #73591B;
    background: #FFF1CD;
    font-size: 8.5px;
    font-weight: 700;
}

.store-coupon-preview-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 7px;
    margin-top: 15px;
}

.store-coupon-preview-form input:disabled,
.store-coupon-preview-form button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.store-coupon-preview-form input:disabled {
    background: #F5F6F7;
}

/* =========================================================
   RODAPÉ DA LOJA
========================================================= */

.store-cart-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: center;
    gap: 15px;
    padding: 16px 17px;
    border-top: 1px solid #E7EAED;
    background: #FCFCFD;
}

.store-cart-values {
    display: grid;
    grid-template-columns: 90px minmax(140px, 175px) minmax(180px, 1fr);
    gap: 8px;
}

.store-cart-values > div {
    padding: 10px 11px;
    border: 1px solid #E3E6EA;
    border-radius: 9px;
    background: #fff;
}

.store-cart-values span,
.store-cart-values strong {
    display: block;
}

.store-cart-values span {
    color: #747D88;
    font-size: 9px;
}

.store-cart-values strong {
    margin-top: 3px;
    color: #343B45;
    font-size: 11px;
}

.store-cart-values .delivery-line strong {
    font-size: 10px;
    line-height: 1.45;
}

.store-cart-checkout {
    display: grid;
    gap: 6px;
}

.store-checkout-button {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #fff;
    background: #C1272D;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.store-checkout-button:hover {
    background: #A91E24;
}

.store-cart-checkout > small {
    color: #707985;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   RESUMO GLOBAL - TIPOGRAFIA MAIS NÍTIDA
========================================================= */

.global-cart-summary {
    position: sticky;
    top: 14px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid #DDE1E5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(18, 25, 35, .04);
}

.global-cart-summary .cart-summary-kicker {
    color: #C1272D;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
}

.global-cart-summary h2 {
    margin: 5px 0 18px;
    color: #252A31;
    font-size: 21px;
    font-weight: 600;
}

.global-summary-row {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #ECEEF1;
}

.global-summary-row span {
    color: #636D78;
    font-size: 11px;
}

.global-summary-row strong {
    color: #303640;
    font-size: 11px;
    font-weight: 600;
}

.global-summary-delivery,
.global-summary-payment {
    margin-top: 12px;
    padding: 13px;
    border-radius: 9px;
}

.global-summary-delivery {
    color: #5E4D28;
    background: #FFF8E9;
}

.global-summary-payment {
    color: #415D87;
    background: #F0F5FC;
}

.global-summary-delivery strong,
.global-summary-payment strong {
    display: block;
    font-size: 11px;
    line-height: 1.4;
}

.global-summary-delivery p,
.global-summary-payment p {
    margin: 5px 0 0;
    font-size: 10px;
    line-height: 1.55;
}

.global-summary-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 5px 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #DFE3E7;
}

.global-summary-total span {
    color: #343B45;
    font-size: 11px;
    font-weight: 600;
}

.global-summary-total strong {
    color: #C1272D;
    font-size: 22px;
    line-height: 1;
}

.global-summary-total small {
    grid-column: 1 / -1;
    color: #747D88;
    font-size: 9.5px;
}

.global-checkout-info {
    margin-top: 13px;
    padding: 11px;
    border: 1px solid #E1E4E8;
    border-radius: 9px;
    color: #606A75;
    background: #FAFBFC;
    font-size: 9.5px;
    line-height: 1.55;
}

.cart-continue-button.global {
    min-height: 42px;
    margin-top: 12px;
    font-size: 10px;
}

.cart-security-note p {
    color: #68717C;
    font-size: 9px;
    line-height: 1.5;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 1080px) {
    .store-cart-tools {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .global-cart-layout {
        grid-template-columns: 1fr;
    }

    .global-cart-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .global-cart-page .store-container {
        width: min(100% - 22px, 1260px);
    }

    .global-cart-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .global-cart-heading h1 {
        font-size: 27px;
    }

    .multi-store-notice {
        align-items: flex-start;
    }

    .store-cart-header {
        align-items: flex-start;
    }

    .store-cart-footer {
        grid-template-columns: 1fr;
    }

    .store-cart-values {
        grid-template-columns: repeat(2, 1fr);
    }

    .store-cart-values .delivery-line {
        grid-column: 1 / -1;
    }

    .store-checkout-button {
        min-height: 47px;
        font-size: 11.5px;
    }
}

@media (max-width: 560px) {
    .store-cart-header {
        flex-direction: column;
    }

    .store-cart-header form,
    .store-cart-clear {
        width: 100%;
    }

    .store-cart-clear {
        min-height: 36px;
        border: 1px solid #E1E4E8;
        border-radius: 8px;
    }

    .store-cart-tools {
        padding: 11px;
    }

    .store-delivery-box,
    .store-coupon-box {
        padding: 14px;
    }

    .store-delivery-input-row {
        grid-template-columns: 1fr;
    }

    .store-delivery-input-row button {
        width: 100%;
    }

    .store-coupon-preview-form {
        grid-template-columns: 1fr;
    }

    .store-delivery-option {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .store-delivery-option > b {
        grid-column: 2;
        justify-self: start;
    }

    .store-cart-values {
        grid-template-columns: 1fr 1fr;
    }

    .global-cart-summary {
        padding: 16px;
    }

    .store-cart-card .cart-item-image {
        width: 74px;
        height: 74px;
    }
}


/* =========================================================
   CUPONS · NOVA EXPERIÊNCIA DE APLICAÇÃO POR LOJA
   Padrão Pilar Online, legível e responsivo.
========================================================= */
.store-coupon-input-label {
    display:block;
    margin:15px 0 7px;
    color:#414A56;
    font-size:12px;
    font-weight:600;
}
.store-coupon-preview-form {display:block; margin-top:0}
.store-coupon-input-row {
    display:grid;
    grid-template-columns:minmax(0,1fr) 112px;
    gap:9px;
}
.store-coupon-input-row input {
    width:100%; min-width:0; height:49px;
    padding:0 12px; border:1px solid #CCD2D9;
    border-radius:9px; outline:none;
    background:#fff; color:#242C36;
    font:600 13px Poppins,sans-serif;
    letter-spacing:.045em;
}
.store-coupon-input-row input:focus {
    border-color:var(--global-red);
    box-shadow:0 0 0 3px rgba(193,39,45,.09);
}
.store-coupon-input-row button {
    min-height:49px; border:0; border-radius:9px;
    color:#fff; background:var(--global-red);
    font:700 12px Poppins,sans-serif;
    cursor:pointer;
}
.store-coupon-input-row button:hover:not(:disabled){background:#A91E24}
.store-coupon-input-row button:disabled,
.store-coupon-applied button:disabled {opacity:.55;cursor:wait}
.store-coupon-feedback {
    margin-top:10px; padding:10px 12px;
    border:1px solid #E9D7A8; border-radius:9px;
    background:#FFF9E9; color:#785E28;
    font-size:11px; line-height:1.5;
}
.store-coupon-feedback[hidden], .store-coupon-applied[hidden],
.store-coupon-discount-line[hidden] {display:none!important}
.store-coupon-feedback.success {
    border-color:#C8E7D5; background:#F1FAF5; color:#14693D;
}
.store-coupon-feedback.error {
    border-color:#ECC3C7; background:#FFF3F4; color:#9B252B;
}
.store-coupon-applied {
    display:flex; justify-content:space-between; align-items:center;
    gap:10px; margin-top:12px; padding:12px;
    border:1px solid #CDE6D6; border-radius:11px;
    background:#F3FAF6;
}
.store-coupon-applied > div{min-width:0}
.store-coupon-applied span, .store-coupon-applied strong,
.store-coupon-applied small{display:block}
.store-coupon-applied span{font-size:9px;color:#538066;font-weight:700;letter-spacing:.07em}
.store-coupon-applied strong {margin-top:2px;font-size:15px;color:#155B35;overflow-wrap:anywhere}
.store-coupon-applied small {margin-top:3px;font-size:11px;color:#226C45}
.store-coupon-applied button {
    flex:0 0 auto; min-height:38px; padding:0 12px;
    border:1px solid #B6D9C6; border-radius:8px;
    background:#fff;color:#286444;
    font:600 11px Poppins,sans-serif;cursor:pointer;
}
.store-coupon-applied button:hover:not(:disabled){background:#E9F5EE}
.store-coupon-disclaimer {
    display:block; margin-top:12px;
    font-size:10px; line-height:1.55;
    color:#69737F;
}
.store-coupon-discount-line strong{color:#18734C!important}
.store-coupon-total-line{
    border-color:#EAD9D9!important; background:#FFF9F9!important;
}
.store-coupon-total-line strong {color:#C1272D!important;font-size:15px!important}
.global-summary-discount strong {color:#19744C}
.global-summary-discounted {background:#F8FAFC;padding-inline:8px;border-radius:7px}
.global-summary-discounted strong {font-weight:700}
@media(max-width:560px){
    .store-coupon-input-row {grid-template-columns:minmax(0,1fr) 100px}
    .store-coupon-input-row button,.store-coupon-input-row input{height:49px;font-size:12px}
    .store-coupon-applied strong{font-size:14px}
    .store-coupon-feedback{font-size:11px}
}
@media(max-width:370px){
    .store-coupon-input-row{grid-template-columns:1fr}
    .store-coupon-input-row button{width:100%}
}

/* Totais da loja organizados em duas colunas mesmo com desconto. */
.store-cart-values {grid-template-columns:repeat(2,minmax(0,1fr));}
.store-cart-values .delivery-line {grid-column:1/-1;}
.store-coupon-discount-line strong, .store-coupon-total-line strong{overflow-wrap:anywhere;}
@media(max-width:440px){
 .store-cart-values{grid-template-columns:minmax(0,1fr);}
 .store-cart-values .delivery-line{grid-column:auto;}
}
