/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  /* Layout general para sticky footer */
html, body {
  height: 100%;
  margin: 0;
}
  /* Tipografía y fondo */
  body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f7faf7;
    color: #333;
    display: flex;
    flex-direction: column;
  }
  /* El main crecerá y empujará al footer hacia abajo */
main.container {
  flex: 1;
}
  /* Contenedor central */
  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* Header */
  .site-header {
    background-color: #38a169;
    color: #fff;
    padding: 1rem 0;
  }
  .site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
  }
  .site-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
  }
  .site-header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
  }
  .site-header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
  }
  .site-header nav ul li a:hover {
    text-decoration: underline;
  }
  
  /* Main */
  main {
    padding: 2rem 0;
  }
  
  /* Catálogo */
  .catalog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  .product-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  .product-card .card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .product-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
  }
  .product-card p.price {
    margin-bottom: 1rem;
    color: #2f855a;
    font-weight: bold;
  }
  
  /* Botones */
  .btn {
    display: inline-block;
    background-color: #38a169;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .btn:hover {
    background-color: #2f855a;
  }
  /* Botones ya tienen .btn, pero para el enlace de volver: */
.btn-link {
  display: inline-block;
  text-decoration: none;
  color: #3182ce;
  margin-left: 1rem;
}
  /* Carrito */
  .cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
  }
  .cart-table th,
  .cart-table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
  }
  .cart-summary {
    text-align: right;
    margin-bottom: 1rem;
  }
  .cart-actions {
    display: flex;
    gap:1rem;
    margin-top:1rem;
  }
/* Carrito: contenedor con fondo blanco y sombra */
.cart-container {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin: 2rem 0;
}
/* Pedido vista*/
.order-card {
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
.order-card summary {
  cursor: pointer;
  font-weight: bold;
}

/* Checkout: lista de resumen de pedido */
.order-summary {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.order-summary li {
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  padding: 0.75rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 0.5rem;
}

  /* Formularios */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
  }
  input[type="radio"] {
    margin-right: 0.5rem;
  }
  
  /* Formulario auth (login / register) */
.auth-container{
  max-width:400px;
  margin:2rem auto;
  background:#fff;
  padding:2rem;
  border-radius:.5rem;
  box-shadow:0 2px 5px rgba(0,0,0,.1);
}
.auth-container h2{margin-bottom:1rem;text-align:center;}
.auth-container .error{color:#e53e3e;margin-bottom:1rem;}
.auth-container label{display:block;margin-bottom:.75rem;}
.auth-container button{width:100%;}

  
  /* Footer */
  .site-footer {
    background-color: #edf2f7;
    color: #4a5568;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
  }
  
  @media (max-width:640px){
  .container{
    width:100%;
    padding:0 1rem;   /* un pequeño respiro */
  }
}
  