:root {
  color-scheme: light;
  --azul: #0067b1;
  --azul-oscuro: #064979;
  --texto: #203247;
  --borde: #ccdceb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f1f6fb;
  color: var(--texto);
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}
.cabecera { background: var(--azul); color: white; padding: 22px 24px; }
.cabecera > div { max-width: 640px; margin: auto; }
.cabecera h1 { margin: 0; font-size: 30px; letter-spacing: -.6px; }
.cabecera p { margin: 2px 0 0; color: #e1effb; font-size: 14px; }
.tienda-app {
  width: min(640px, calc(100% - 28px));
  margin: 28px auto;
  padding: 26px;
  background: white;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  box-shadow: 0 4px 16px #17446a08;
}
#login, #alta_usuario, #consulta_usuario, #menu { max-width: 360px; margin: auto; }
h2 { margin: 0 0 22px; color: var(--azul-oscuro); font-size: 23px; line-height: 1.3; }
.tienda-app input, .tienda-app select, .tienda-app textarea {
  width: 100% !important;
  min-height: 44px;
  margin: 5px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 7px;
  background: white;
  color: var(--texto);
  font: inherit;
}
.tienda-app input[type="file"] { font-size: 13px; padding: 9px; }
.tienda-app textarea { min-height: 88px; resize: vertical; }
.tienda-app input:focus, .tienda-app select:focus, .tienda-app textarea:focus {
  outline: 3px solid #d8ebfc;
  border-color: var(--azul);
}
.tienda-app button {
  width: 100% !important;
  min-height: 44px;
  height: auto !important;
  padding: 10px 14px;
  border: 1px solid var(--azul);
  border-radius: 7px;
  background: var(--azul);
  color: white;
  cursor: pointer;
  font: 600 15px/1.4 "Segoe UI", Arial, sans-serif;
}
.tienda-app button:hover { background: var(--azul-oscuro); border-color: var(--azul-oscuro); }
.tienda-app button:focus-visible { outline: 3px solid #83bdf0; outline-offset: 3px; }
.tienda-app button:disabled { opacity: .55; cursor: default; }
#login button:last-of-type, #captura-regresar, #compra-regresar, #seguir-comprando,
#vaciar-carrito, #menu button:nth-of-type(n+3) {
  background: white;
  color: var(--azul-oscuro);
  border-color: var(--borde);
}
#login button:last-of-type:hover, #captura-regresar:hover, #compra-regresar:hover,
#seguir-comprando:hover, #vaciar-carrito:hover, #menu button:nth-of-type(n+3):hover { background: #eaf3fc; }
.tienda { width: 100%; margin: 0; }
.tienda label { display: block; font-weight: 600; margin-top: 12px; }
.tienda button { margin-top: 10px; }
.tienda article {
  border: 1px solid var(--borde);
  border-radius: 9px;
  margin: 16px 0;
  padding: 18px;
  background: #fbfdff;
}
.tienda article h3 { color: var(--azul-oscuro); font-size: 19px; margin: 8px 0; }
.tienda article p { margin: 5px 0; }
.tienda article h3, .tienda article p, [role="status"] { overflow-wrap: anywhere; }
.tienda img { width: 88px; height: 88px; object-fit: contain; background: white; border-radius: 7px; }
[role="status"]:not(:empty) { color: var(--azul-oscuro); margin: 14px 0; }
#total-carrito { display: block; border-top: 1px solid var(--borde); padding-top: 16px; font-size: 21px; color: var(--azul-oscuro); }
.pie { text-align: center; color: #5d738a; font-size: 13px; padding: 0 16px 24px; }
@media (max-width: 480px) {
  .cabecera { padding: 18px 20px; }
  .cabecera h1 { font-size: 27px; }
  .tienda-app { padding: 20px; margin: 18px auto; }
}
