* {
  box-sizing: border-box;
}

main {
  padding: 40px 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 60vh; 
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-size: 2rem;
}

.pedido-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  width: 100%;
  transition: transform 0.2s;
}

.pedido-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.pedido-card img {
  width: 100px; 
  height: 150px;
  object-fit: contain;
  background-color: #f5f5f5;
  border-radius: 6px;
  margin-right: 25px;
  flex-shrink: 0;
  border: 1px solid #ddd;
}

.pedido-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.pedido-info h2 {
  font-size: 1.4em;
  color: #222;
  margin: 0 0 8px 0;
}

.pedido-info p {
  margin: 0;
  color: #555;
  font-size: 0.95em;
  line-height: 1.4;
}

.pedido-info b {
  color: #333;
}

.track-btn {
  margin-top: 15px;
  padding: 10px 25px;
  background-color: #ffc800;
  color: #000;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  width: fit-content;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.track-btn:hover {
  background-color: #e0b100;
}

.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.rastreamento-box {
  background: white;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 25px 0;
  text-align: left;
}

.status-list li {
  padding: 12px 15px;
  border-left: 3px solid #eee;
  color: #999;
  font-size: 0.95em;
}

.status-list li.active {
  border-left-color: #ffc800;
  color: #222;
  font-weight: bold;
  background: linear-gradient(90deg, #fffbe6 0%, #fff 100%);
}

#fecharRastreamento {
  padding: 10px 30px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
}

@media (max-width: 600px) {
  
  main {
    padding: 20px 0; 
    gap: 15px;
  }

  .pedido-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }

  .pedido-card img {
    margin-right: 0;
    margin-bottom: 20px;
    width: 120px;
    height: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  }

  .pedido-info {
    width: 100%;
    align-items: center;
  }

  .pedido-info h2 {
    font-size: 1.3em;
    margin-bottom: 10px;
  }

  .track-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px 0;
  }
}

body.dark-theme .pedido-card,
body.dark-theme .rastreamento-box {
  background-color: #1e1e1e;
  border-color: #333;
}

body.dark-theme h1,
body.dark-theme .pedido-info h2,
body.dark-theme .pedido-info b,
body.dark-theme .rastreamento-box h2 {
  color: #ffffff !important;
}

body.dark-theme .pedido-info p,
body.dark-theme .status-list li {
  color: #cccccc !important;
}

body.dark-theme .status-list li.active {
  color: #ffc800 !important;
  background: linear-gradient(90deg, #332b00 0%, #1e1e1e 100%);
}