.cart-page {
    width: 100%;
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 20px;
}

.cart-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* ---- LISTA DE PRODUTOS ---- */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item {
    display: flex;
    background: #1b1b1b;
    border: 1px solid #333;
    padding: 14px;
    border-radius: 10px;
    gap: 15px;
}

.cart-img {
    width: 120px;
    border-radius: 8px;
}

.cart-info h3 {
    font-size: 18px;
    margin: 0;
}

.cart-price {
    font-size: 17px;
    color: #ff9900;
    margin-top: 3px;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qtd-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: #3a3a3a;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.remove-btn {
    color: #ff4444;
    margin-left: 10px;
    font-size: 13px;
}

/* ---- RESUMO ---- */

.cart-summary {
    background: #1b1b1b;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
}

.cart-summary h2 {
    margin-top: 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.total-line strong {
    font-size: 20px;
    color: #ff9900;
}

/* cupom */
.cupom-form {
    margin-top: 15px;
}

.cupom-box {
    display: flex;
    gap: 8px;
}

.cupom-box input {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: #2b2b2b;
    color: white;
}

.cupom-box button {
    background: #ff9900;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* botão checkout */
.checkout-btn {
    width: 100%;
    background: #ff9900;
    border: none;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

/* frete */

.frete-box {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.frete-box input {
    padding: 6px 10px;
    background: #2b2b2b;
    color: white;
    border: none;
    border-radius: 6px;
}

.pix-btn {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    background: #ff9900;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.summary-group {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-group label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.summary-group input {
    padding: 10px;
    border-radius: 6px;
    border: none;
    outline: none;
    background: #1e1e1e;
    color: #fff;
    font-size: 14px;
}

.field-inline {
    display: flex;
    gap: 6px;
}

.field-inline input {
    flex: 1;
}

.field-inline button,
.frete-btn {
    background: #ff9800;
    color: #000;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.field-inline button:hover,
.frete-btn:hover {
    background: #ffa726;
}

.frete-opcoes {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frete-btn {
    width: 100%;
    text-align: center;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.total-line strong {
    color: #ff9800;
    font-size: 18px;
}
/* ===========================================
   FIX RESPONSIVO – ESTRUTURA DO CARRINHO
   NÃO ALTERA DESIGN
=========================================== */

/* GRID DESKTOP */
.cart-grid{
    display:grid;
    grid-template-columns: 1fr 380px;
    gap:32px;
    align-items:flex-start;
}

/* Impede o resumo de estourar */
.cart-summary{
    max-width:100%;
    width:100%;
}

/* Produtos ocupam todo o espaço */
.cart-items{
    width:100%;
}

/* ===========================================
   MOBILE
=========================================== */
@media (max-width: 900px){

    /* vira coluna */
    .cart-grid{
        display:flex !important;
        flex-direction:column !important;
        gap:24px;
    }

    /* produtos primeiro */
    .cart-items{
        order:1;
    }

    /* resumo depois */
    .cart-summary{
        order:2;
        width:100% !important;
        max-width:100% !important;
        position:relative !important;
        top:0 !important;
    }

    /* impede inputs de sumirem */
    .summary-group input,
    .field-inline input{
        width:100% !important;
        max-width:100%;
        box-sizing:border-box;
    }

    /* botão não quebra */
    .field-inline{
        flex-direction:column;
        gap:10px;
    }

    .field-inline button,
    .frete-btn,
    .checkout-btn{
        width:100%;
    }

    /* cards não estouram */
    .cart-item{
        width:100%;
        max-width:100%;
    }
}

/* ===========================================
   MOBILE PEQUENO
=========================================== */
@media (max-width: 480px){

    .cart-page{
        padding-left:12px;
        padding-right:12px;
    }

    .cart-summary{
        padding:18px;
    }
}
/* =========================================
   MOBILE COMPACTO — CARRINHO
   (somente telas pequenas)
========================================= */
@media (max-width: 480px) {

  /* título */
  .cart-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  /* cards dos produtos */
  .cart-item {
    padding: 12px;
    border-radius: 12px;
    gap: 12px;
  }

  .cart-img {
    max-width: 120px;
  }

  .cart-info h3 {
    font-size: 14px;
  }

  .cart-size {
    font-size: 12px;
  }

  .cart-price {
    font-size: 14px;
  }

  .cart-actions {
    margin-top: 6px;
    gap: 8px;
  }

  .qtd {
    font-size: 12px;
  }

  /* resumo */
  .cart-summary {
    padding: 14px;
    border-radius: 12px;
  }

  .cart-summary h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  /* inputs mais compactos */
  .summary-group {
    margin: 10px 0;
    gap: 6px;
  }

  .summary-group input {
    min-height: 38px;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 7px;
  }

  .field-inline {
    gap: 8px;
  }

  .field-inline button {
    min-height: 38px;
    font-size: 13px;
    padding: 0 12px;
  }

  /* botões de frete */
  .frete-btn {
    min-height: 38px;
    font-size: 13px;
    padding: 8px;
  }

  /* totais */
  .summary-line {
    font-size: 13px;
    margin: 6px 0;
  }

  .total-line strong {
    font-size: 16px;
  }

  /* botão finalizar */
  .checkout-btn {
    min-height: 42px;
    font-size: 14px;
    margin-top: 12px;
  }

}
