* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: auto;
}

.pagina {
  width: 735px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0 20px;
  display: block;
}

.carrito {
  width: 735px;
  min-height: 680px;
  margin: 0 auto;
  padding: 85px 28px 28px;
  position: relative;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.97),
      rgba(237, 237, 237, 0.82),
      rgba(255, 255, 255, 0.97)
    ),
    repeating-linear-gradient(
      0deg,
      rgba(170, 170, 170, 0.22) 0 1px,
      transparent 1px 8px
    );
  border: 1px solid #bdbdbd;
  box-shadow:
    inset 0 0 26px rgba(70, 70, 70, 0.22),
    0 2px 4px rgba(0, 0, 0, 0.22);
}

.carrito h1 {
  margin: 0 0 32px;
  color: #000;
  font-size: 33px;
  line-height: 1;
  text-align: left;
  font-weight: 800;
  text-decoration: none;
  text-shadow: none;
}

.formulario {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 16px;
}

.formulario label {
  white-space: nowrap;
}

select {
  width: 144px;
  height: 39px;
  padding: 0 6px;
  font-size: 16px;
  background: #fff;
  border: 3px solid #000;
}

input[type="number"] {
  width: 78px;
  height: 64px;
  padding: 4px;
  font-size: 22px;
  text-align: center;
  background: #fff;
  border: 3px solid #e6bd2c;
  outline: 3px solid #fff4bb;
}

.boton {
  border: 1px solid #255e9c;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(#79b0ee, #477fca 50%, #285b9d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 2px 4px rgba(0, 0, 0, 0.36);
}

.boton:hover {
  filter: brightness(1.07);
}

.boton:active {
  transform: translateY(1px);
}

.boton-comprar {
  width: 120px;
  height: 59px;
  margin-left: 8px;
  font-size: 17px;
}

.facturar-linea {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px 55px;
  font-size: 17px;
}

.facturar-linea input {
  width: 22px;
  height: 22px;
  accent-color: #e6bd2c;
}

.tabla-contenedor {
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  table-layout: fixed;
}

th,
td {
  border: 3px solid #282828;
  height: 43px;
  padding: 8px 9px;
  font-size: 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  height: 43px;
  font-size: 16px;
  font-weight: 800;
  background: #fff;
}

th:nth-child(1),
td:nth-child(1) {
  width: 128px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 109px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 130px;
  text-align: center;
}

th:nth-child(4),
td:nth-child(4) {
  width: 128px;
  text-align: right;
}

th:nth-child(5),
td:nth-child(5) {
  width: 103px;
  text-align: right;
}

.zona-inferior {
  width: calc(100% - 56px);
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.boton-factura {
  width: 126px;
  height: 52px;
  font-size: 15px;
  line-height: 1.05;
}

.totales {
  display: grid;
  grid-template-columns: 110px 120px;
  align-items: center;
  font-size: 16px;
}

.total-linea {
  display: contents;
}

.total-linea span {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}

.total-linea output {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  background: #fff;
  border: 3px solid #282828;
  font-size: 16px;
  font-weight: 800;
}

body > div:first-of-type {
  margin-left: auto;
  margin-right: auto;
}

main,
section,
.pagina,
.carrito {
  float: none;
  left: auto;
  right: auto;
  transform: none;
}

@media (max-width: 780px) {
  body {
    display: block;
  }

  .pagina {
    width: 100%;
    padding: 14px;
  }

  .carrito {
    width: 100%;
    min-height: 650px;
    padding: 70px 18px 18px;
  }

  .carrito h1 {
    font-size: 28px;
  }

  .formulario {
    flex-wrap: wrap;
  }

  .tabla-contenedor {
    overflow-x: auto;
  }

  table {
    min-width: 650px;
  }

  .zona-inferior {
    position: static;
    margin-top: 120px;
  }
}