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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f3f4f6;
  color: #374151;
  line-height: 1.6;
}

/* -----------------------------------
   LOGIN Y REGISTRO (FORMULARIOS)
----------------------------------- */
#loginSection,
#registroSection {
  width: 100%;
  max-width: 360px;
  margin: 12vh auto;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  text-align: center;
}

#registroSection {
  display: none;
}

#loginSection input,
#registroSection input {
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0 20px 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#loginSection input:focus,
#registroSection input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#loginSection button,
#registroSection button {
  padding: 12px;
  width: 100%;
  background: #2563eb;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

#loginSection button:hover,
#registroSection button:hover {
  background: #1d4ed8;
}

.toggle-link {
  display: block;
  margin-top: 15px;
  color: #3b82f6;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease;
}

.toggle-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* -----------------------------------
   PRODUCTOS
----------------------------------- */
#productosSection {
  display: none;
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

.header-tienda {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-logout {
  background-color: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-logout:hover {
  background-color: #b91c1c;
}

.producto-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
  vertical-align: top;
  width: 250px;
}

.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.producto-card h3 {
  margin: 0 0 10px;
  color: #333;
}

.producto-card p {
  margin: 5px 0;
  color: #555;
}

.producto-card input {
  width: 60px;
  margin-right: 10px;
  padding: 5px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.producto-card button {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.producto-card button:hover {
  background-color: #1d4ed8;
}

/* -----------------------------------
   CARRITO DE COMPRAS
----------------------------------- */
.carrito-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.carrito-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  text-align: left;
}

.carrito-table th, .carrito-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.carrito-table th {
  background-color: #f9fafb;
  color: #374151;
}

.total-text {
  text-align: right;
  margin-top: 15px;
  font-size: 1.2rem;
  color: #111827;
}

.btn-confirmar {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 20px 0 0 auto;
  padding: 12px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.btn-confirmar:hover {
  background-color: #059669;
}
