:root {
  color-scheme: light;
  --fondo: #faf7f2;
  --texto: #2b2118;
  --acento: #8c3b1b;
  --borde: #d8ccc0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

.cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--borde);
}

.marca {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--acento);
  text-decoration: none;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem;
}

.productos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
}

.producto,
.producto-detalle {
  border: 1px solid var(--borde);
  border-radius: 0.5rem;
  padding: 1rem;
  background: #fff;
}

.precio {
  font-weight: 600;
}

.agregar {
  display: flex;
  gap: 0.5rem;
  align-items: end;
  flex-wrap: wrap;
}

.agregar input {
  width: 6rem;
}

button {
  background: var(--acento);
  color: #fff;
  border: 0;
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.carrito {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(24rem, 100%);
  background: #fff;
  border-left: 1px solid var(--borde);
  padding: 1rem;
  overflow-y: auto;
  box-shadow: -0.25rem 0 1rem rgb(0 0 0 / 0.1);
}

.carrito-lineas {
  list-style: none;
  margin: 0;
  padding: 0;
}

.carrito-lineas li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--borde);
}

.carrito-total {
  font-weight: 700;
}

.nota {
  font-size: 0.875rem;
  color: #5c5044;
}

#carrito-aviso:empty {
  display: none;
}

#carrito-aviso {
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: var(--fondo);
}
