/* ======================================================
   RESET GLOBAL
====================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
    --primaria: #7b2cbf;
    --primaria-dark: #5a189a;

    --texto: #111;
    --texto-suave: #555;

    --bg: #ffffff;
    --cinza: #f5f5f5;

    --radius: 4px;
}


/* ======================================================
   CONTAINER PRINCIPAL
====================================================== */

.carrinho-main {
  max-width: 1100px;
  min-height: 85vh;
  margin: 40px auto;
  padding: 20px;
}


/* ======================================================
   TÍTULO
====================================================== */

.carrinho-titulo {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primaria);
  font-size: 1.9rem;
}


/* ======================================================
   CARRINHO VAZIO
====================================================== */

.carrinho-vazio {
  text-align: center;
  margin: 50px 0;
  color: var(--texto-suave);
  font-size: 1rem;
}


/* ======================================================
   TABELA DO CARRINHO — Desktop
====================================================== */

.carrinho-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.carrinho-tabela th {
  background: var(--primaria);
  color: #fff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.carrinho-tabela td {
  padding: 14px 10px;
  border-bottom: 1px solid #e0e0e0;
}


/* ======================================================
   IMAGEM NA TABELA
====================================================== */

.produto-info-td {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carrinho-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
}


/* ======================================================
   QUANTIDADE
====================================================== */

input[type="number"] {
  width: 70px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
}


/* ======================================================
   REMOVER ITEM
====================================================== */

.remove-btn {
  color: #c70000;
  font-size: 1.2rem;
  cursor: pointer;
}

.remove-btn:hover {
  color: #900;
}


/* ======================================================
   TOTAL
====================================================== */

.carrinho-total {
  text-align: right;
  margin: 25px 0;
  font-size: 1.1rem;
}

.carrinho-total strong {
  color: var(--primaria);
  font-size: 1.3rem;
}


/* ======================================================
   BOTÕES
====================================================== */

.carrinho-botoes {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primaria);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn:hover {
  background: var(--primaria-dark);
}

.btn.atualizar {
  background: #444;
}

.btn.atualizar:hover {
  background: #000;
}

.btn.finalizar {
  background: var(--primaria);
}


/* ======================================================
   MOBILE — A TABELA VIRA LISTA (UX muito melhor!)
====================================================== */

/* ======================================================
   MOBILE — tabela vira lista sem linhas duplicadas
====================================================== */

@media (max-width: 760px) {

  /* Remove TODAS as bordas */
  .carrinho-tabela,
  .carrinho-tabela tr,
  .carrinho-tabela td {
    border: none !important;
  }

  .carrinho-tabela,
  .carrinho-tabela thead,
  .carrinho-tabela tbody,
  .carrinho-tabela th,
  .carrinho-tabela td,
  .carrinho-tabela tr {
    display: block;
    width: 100%;
  }

  .carrinho-tabela thead {
    display: none; /* escondemos o cabeçalho */
  }

  /* Cada produto vira um bloco */
  .carrinho-tabela tr {
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e6e6e6; /* 1 linha limpo */
  }

  /* Remove linhas duplas dentro do bloco */
  .carrinho-tabela td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
  }

  .carrinho-tabela td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--texto-suave);
  }

  .produto-info-td {
    flex-direction: row;
    gap: 10px;
  }

  .carrinho-img {
    width: 55px;
    height: 55px;
  }

  input[type="number"] {
    width: 60px;
  }

  .carrinho-total {
    font-size: 1rem;
    text-align: center;
    margin-top: 10px;
  }

  .carrinho-botoes {
    justify-content: center;
    margin-top: 25px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}


/* ======================================================
   FOOTER — protegido
====================================================== */

footer,
.footer,
#footer {
  background: #1a1423 !important;
  color: #fff !important;
}
body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}
