/* Página Cesta de Compras — layout limpo, escopo isolado */
.dogloja-cart {
    background: #ffffff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #111111;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 6vw, 4rem);
}

.dogloja-cart__inner {
    max-width: 1180px;
    margin: 0 auto;
}

.dogloja-cart__title {
    margin: 0 0 2rem;
    font-size: clamp(26px, 3vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #111111;
}

.dogloja-cart__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
}

@media (max-width: 991px) {
    .dogloja-cart__grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Coluna itens ---- */
.dogloja-cart__items {
    min-width: 0;
}

.dogloja-cart__thead {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(110px, 130px) minmax(100px, 120px) minmax(120px, 150px);
    gap: 0.75rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9a9a9a;
}

@media (max-width: 767px) {
    .dogloja-cart__thead {
        display: none;
    }
}

.dogloja-cart__row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(110px, 130px) minmax(100px, 120px) minmax(120px, 150px);
    gap: 0.75rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e8e8e8;
}

@media (max-width: 767px) {
    .dogloja-cart__row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem 0;
    }
}

.dogloja-cart__product {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.dogloja-cart__thumb {
    flex-shrink: 0;
    width: 100px;
    height: 132px;
    object-fit: cover;
    border-radius: 2px;
    background: #f4f4f4;
}

@media (max-width: 767px) {
    .dogloja-cart__thumb {
        width: 88px;
        height: 116px;
    }
}

.dogloja-cart__product-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.dogloja-cart__meta {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.45;
}

.dogloja-cart__qty-cell {
    justify-self: start;
}

@media (max-width: 767px) {
    .dogloja-cart__qty-cell::before {
        content: "Quantidade";
        display: block;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9a9a9a;
        margin-bottom: 0.35rem;
    }
}

.dogloja-cart__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dddddd;
    background: #f5f5f5;
    border-radius: 2px;
    overflow: hidden;
}

.dogloja-cart__qty button {
    width: 36px;
    height: 38px;
    border: none;
    background: transparent;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    color: #333333;
    transition: background 0.15s ease;
}

.dogloja-cart__qty button:hover {
    background: #eaeaea;
}

.dogloja-cart__qty span {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.dogloja-cart__price,
.dogloja-cart__line-total {
    font-size: 14px;
}

@media (min-width: 768px) {
    .dogloja-cart__thead span:nth-child(3),
    .dogloja-cart__price {
        padding-left: 1.125rem;
    }
}

@media (max-width: 767px) {
    .dogloja-cart__price::before {
        content: "Preço unitário · ";
        font-size: 12px;
        color: #9a9a9a;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        display: block;
        margin-bottom: 0.2rem;
    }
}

.dogloja-cart__total-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

@media (max-width: 767px) {
    .dogloja-cart__total-cell {
        flex-wrap: wrap;
    }
    .dogloja-cart__total-cell::before {
        content: "Total";
        width: 100%;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #9a9a9a;
    }
}

.dogloja-cart__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #888888;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.15s ease, background 0.15s ease;
}

.dogloja-cart__remove:hover {
    color: #c62828;
    background: #fcecec;
}

.dogloja-cart__remove .icon-trash {
    font-size: 17px;
}

/* Cupom */
.dogloja-cart__coupon {
    margin-top: 2rem;
    padding-top: 0.5rem;
}

.dogloja-cart__coupon-label {
    display: block;
    font-size: 13px;
    color: #444444;
    margin-bottom: 0.65rem;
}

.dogloja-cart__coupon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
}

.dogloja-cart__coupon-row input[type="text"] {
    flex: 1 1 180px;
    min-height: 44px;
    padding: 0 0.85rem;
    border: 1px solid #111111;
    border-radius: 2px;
    background: #ffffff;
    font-size: 14px;
}

.dogloja-cart__coupon-row button[type="submit"] {
    min-height: 44px;
    padding: 0 1.35rem;
    border: 1px solid #111111;
    border-radius: 2px;
    background: #ffffff;
    color: #111111;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dogloja-cart__coupon-row button[type="submit"]:hover {
    background: #111111;
    color: #ffffff;
}

.dogloja-cart__coupon--summary {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-top: 0;
}

.dogloja-cart__cupom-msg {
    font-size: 13px;
    margin: 0.45rem 0 0;
    min-height: 1.15em;
    color: #555555;
}

.dogloja-cart__cupom-remove {
    margin-top: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    color: #666666;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.dogloja-cart__cupom-remove:hover {
    color: #111111;
}

.dogloja-cart__summary-row--discount span:last-child {
    color: #2e7d32;
    font-weight: 600;
}

/* ---- Resumo ---- */
.dogloja-cart__summary {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 1.75rem 1.5rem 1.5rem;
}

.dogloja-cart__summary-title {
    margin: 0 0 1.35rem;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #a67c52;
    text-align: center;
}

.dogloja-cart__summary-rows {
    font-size: 14px;
}

.dogloja-cart__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dogloja-cart__summary-row--shipping .dogloja-cart__summary-left {
    flex: 1;
    min-width: 0;
}

.dogloja-cart__frete-input-wrap label {
    display: block;
    font-size: 12px;
    color: #555555;
    margin-bottom: 0.35rem;
}

.dogloja-cart__frete-input-wrap input {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 0 0.65rem;
    border: 1px solid #cccccc;
    border-radius: 2px;
    font-size: 13px;
    background: #ffffff;
}

.dogloja-cart__frete-hint {
    margin: 0.35rem 0 0;
    font-size: 13px;
    color: #888888;
}

.dogloja-cart__frete-free,
.dogloja-cart__frete-valor {
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    white-space: nowrap;
}

.dogloja-cart__checkout-note {
    font-size: 12px;
    color: #777777;
    text-align: right;
    margin: -0.35rem 0 1rem;
}

.dogloja-cart__divider {
    height: 1px;
    background: #e8e8e8;
    margin: 1rem 0 1.15rem;
    border: none;
}

.dogloja-cart__summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dogloja-cart__summary-total span:first-child {
    font-weight: 700;
    font-size: 14px;
}

.dogloja-cart__summary-total span:last-child {
    font-weight: 700;
    font-size: 17px;
}

.dogloja-cart__btn-primary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 2px;
    background: #f06292;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dogloja-cart__btn-primary:hover {
    background: #ec407a;
    color: #ffffff !important;
}

.dogloja-cart__btn-secondary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 0.65rem;
    padding: 0.95rem 1.25rem;
    border: 1px solid #111111;
    border-radius: 2px;
    background: #ffffff;
    color: #111111 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.dogloja-cart__btn-secondary:hover {
    background: #111111;
    color: #ffffff !important;
}

/* Segurança */
.dogloja-cart__trust {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #efefef;
}

.dogloja-cart__trust-label {
    font-size: 12px;
    color: #555555;
    margin-bottom: 0.65rem;
}

.dogloja-cart__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.dogloja-cart__card-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.55rem;
    border-radius: 3px;
    border: 1px solid #ddd;
    background: #fafafa;
    color: #333333;
}

.dogloja-cart__card-badge--visa {
    color: #1a1f71;
}

.dogloja-cart__card-badge--mc {
    color: #eb001b;
}

.dogloja-cart__trust-lines {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dogloja-cart__trust-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    color: #444444;
}

.dogloja-cart__trust-line svg {
    flex-shrink: 0;
}

/* Estoque — linha indisponível */
.dogloja-cart__row {
    position: relative;
}

.dogloja-cart__row-overlay {
    position: absolute;
    inset: 0;
    background: rgba(240, 240, 240, 0.72);
    pointer-events: none;
    z-index: 2;
    border-radius: 2px;
}

.dogloja-cart__row--sem-estoque .dogloja-cart__product-link {
    position: relative;
    z-index: 3;
}

.dogloja-cart__row--sem-estoque .dogloja-cart__remove,
.dogloja-cart__row--sem-estoque .dogloja-cart__qty-cell {
    position: relative;
    z-index: 3;
}

.dogloja-cart__estoque-alerta {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    background: #fff8e6;
    border: 1px solid #f0d78c;
    border-radius: 4px;
    font-size: 14px;
    color: #5c4a00;
}

.dogloja-cart__estoque-linha-msg {
    margin: 0.35rem 0 0;
    font-size: 13px;
    color: #b45309;
    font-weight: 500;
}

.dogloja-cart__product-link {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
}

.dogloja-cart__product-link:hover {
    text-decoration: underline;
}

.dogloja-cart__btn-primary--disabled,
.dogloja-cart__btn-primary[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}
