* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background-color: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.5;
}

/* ========== HEADER FIXO ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e0e0e0;
  z-index: 1000;
  padding: 12px 24px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #000;
  text-decoration: none;
}

.logo:hover {
  opacity: 0.8;
}

.search-bar {
  flex: 1;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  transition: all 0.2s;
}

.search-bar:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.cart-icon {
  position: relative;
  text-decoration: none;
  font-size: 24px;
  color: #1d1d1f;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #ff3b30;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

/* ========== MAIN ========== */
main {
  padding-top: 80px;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  min-height: calc(100vh - 200px);
}

/* Cabeçalho do carrinho */
.carrinho-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.carrinho-header h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1d1d1f;
}

.btn-continuar-comprando {
  color: #007aff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.btn-continuar-comprando:hover {
  opacity: 0.7;
}

/* Container do carrinho */
.carrinho-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 32px;
}

/* Lista de itens */
.carrinho-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  gap: 20px;
  flex-wrap: wrap;
}

.carrinho-item:last-child {
  border-bottom: none;
}

/* Imagem do item */
.item-imagem {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #f9f9fb;
  overflow: hidden;
  flex-shrink: 0;
}

.item-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Informações do item */
.item-info {
  flex: 2;
  min-width: 150px;
}

.item-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1d1d1f;
}

.item-preco {
  font-size: 15px;
  font-weight: 500;
  color: #6e6e73;
}

/* Quantidade */
.item-quantidade {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f5f7;
  padding: 6px 12px;
  border-radius: 30px;
}

.btn-qtd {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 600;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #007aff;
  border-radius: 20px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-qtd:hover {
  background: #e0e0e0;
}

.qtd-valor {
  font-size: 16px;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
}

/* Subtotal do item */
.item-subtotal {
  min-width: 100px;
  text-align: right;
  font-weight: 600;
  font-size: 17px;
  color: #1d1d1f;
}

/* Botão remover - sem emoji */
.btn-remover {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #ff3b30;
  padding: 8px 12px;
  border-radius: 20px;
  transition: background 0.2s;
  font-weight: 500;
  flex-shrink: 0;
}

.btn-remover:hover {
  background: #ffe5e5;
}

/* Resumo do pedido */
.carrinho-resumo {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.resumo-linha {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  color: #1d1d1f;
}

.resumo-linha:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 20px;
  padding-top: 16px;
  margin-top: 8px;
}

.btn-finalizar {
  display: block;
  width: 100%;
  background: #007aff;
  color: white;
  text-align: center;
  text-decoration: none;
  padding: 16px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 18px;
  margin-top: 24px;
  transition: background 0.2s;
}

.btn-finalizar:hover {
  background: #0051b3;
}

/* Carrinho vazio - sem emoji */
.carrinho-vazio {
  text-align: center;
  padding: 60px 24px;
  background: white;
  border-radius: 20px;
}

.carrinho-vazio p {
  margin-bottom: 20px;
  color: #6e6e73;
  font-size: 18px;
}

.btn-ir-para-loja {
  display: inline-block;
  background: #007aff;
  color: white;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 980px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-ir-para-loja:hover {
  background: #0051b3;
}

/* ========== FOOTER ========== */
.footer {
  background: #f5f5f7;
  border-top: 1px solid #e0e0e0;
  padding: 32px 24px;
  text-align: center;
  color: #6e6e73;
  font-size: 14px;
  margin-top: 48px;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
  .carrinho-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .carrinho-header h1 {
    font-size: 28px;
  }
  
  .carrinho-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .item-info {
    flex: 1;
    min-width: 120px;
  }
  
  .item-subtotal {
    text-align: left;
    min-width: auto;
  }
  
  .item-quantidade {
    order: 1;
  }
  
  .btn-remover {
    order: 2;
  }
  
  .logo {
    font-size: 22px;
  }
  
  .search-bar {
    max-width: 160px;
    font-size: 14px;
    padding: 8px 12px;
  }
}

@media (max-width: 550px) {
  .carrinho-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .item-subtotal {
    text-align: left;
  }
  
  .item-quantidade {
    margin-top: 8px;
  }
  
  .btn-remover {
    align-self: flex-end;
    margin-top: -40px;
  }
}

@media (max-width: 480px) {
  .carrinho-header h1 {
    font-size: 24px;
  }
  
  .resumo-linha:last-child {
    font-size: 18px;
  }
  
  .btn-finalizar {
    font-size: 16px;
    padding: 14px;
  }
}