/* Section: the painted board (menu) */

.wall {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s7);
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s5) var(--gutter) var(--s8);
}

@media (min-width: 1024px) {
  .wall {
    grid-template-columns: minmax(0, 1fr) 24.5rem;
    align-items: start;
    gap: var(--s6);
  }
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
  min-width: 0;
}

/* Category rail */
.rail {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: calc(var(--gutter) - var(--s3));
  background: var(--night);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1024px) {
  .rail {
    margin-inline: 0;
    padding-inline: 0;
  }
}
.rail__list {
  display: flex;
  gap: var(--s1);
  overflow-x: auto;
  scrollbar-width: none;
}
.rail__list::-webkit-scrollbar {
  display: none;
}
.rail__link {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 var(--s3);
  font-family: var(--font-paint);
  font-weight: 400;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--cream-2);
  box-shadow: inset 0 -3px 0 transparent;
  transition: color var(--dur-quick) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.rail__link:hover {
  color: var(--cream);
}
.rail__link[aria-current='true'] {
  color: var(--cream);
  box-shadow: inset 0 -3px 0 var(--red);
}

/* Panels: painted fields with an inset painted frame */
.panel {
  position: relative;
  padding: var(--s6) var(--s3) var(--s5);
  scroll-margin-top: 4.25rem;
}

.panel__head {
  display: grid;
  gap: var(--s2);
  margin: 0 var(--s2) var(--s4);
}
.panel__title {
  justify-self: start;
  position: relative;
  padding-bottom: 0.34em;
  font-size: var(--text-xl);
}
/* red brush underline, sized to the title it sits under */
.panel__stroke {
  position: absolute;
  left: -0.04em;
  bottom: 0;
  width: calc(100% + 0.08em);
  height: 0.3em;
  overflow: visible;
}
.panel__stroke path {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: round;
}
.panel__note {
  color: var(--cream-2);
  font-size: var(--text-sm);
}

/* Board lines: count | body | price | action, price column never moves */
.lines {
  display: grid;
  grid-template-columns: var(--col-count) minmax(0, 1fr) var(--col-price) var(--tap);
  column-gap: var(--s3);
  padding-inline: var(--s1);
}

.line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: auto auto auto;
  align-items: center;
  padding: var(--s3) 0;
  border-top: 1px dashed var(--rule);
  transition: background-color 1.2s var(--ease-out);
}
.line:first-child {
  border-top: 0;
}

.line__count {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 2.3rem;
  line-height: 0.85;
  letter-spacing: -0.02em;
  text-shadow: var(--shade);
  white-space: nowrap;
}
.line__count--pair {
  font-size: 1.75rem;
  letter-spacing: 0;
}
.line__count--pair b {
  font-weight: 900;
  color: var(--cream-3);
  padding-inline: 0.04em;
}

.line__name {
  grid-column: 2;
  grid-row: 1;
  align-self: baseline;
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  min-width: 0;
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: var(--shade);
}
/* the dotted leader runs from the name, through the gap, up to the price */
.line__name::after {
  content: '';
  flex: 1;
  min-width: 0.6rem;
  margin-right: calc(var(--s3) * -1);
  border-bottom: 3px dotted var(--rule-strong);
  transform: translateY(-0.32rem);
}

.line__with {
  grid-column: 2 / -1;
  grid-row: 2;
  margin-top: var(--s1);
  font-size: var(--text-sm);
  color: var(--cream-2);
  line-height: 1.35;
}
.line__tag {
  color: var(--cream);
  font-weight: 600;
}

.line__price {
  grid-column: 3;
  grid-row: 1;
  align-self: baseline;
  display: flex;
  align-items: baseline;
  min-width: 0;
}
.line__price::before {
  content: '';
  flex: 1;
  min-width: 0;
  margin-right: 0.3em;
  border-bottom: 3px dotted var(--rule-strong);
  transform: translateY(-0.32rem);
}

.line__add {
  grid-column: 4;
  grid-row: 1;
}

.line__mine {
  grid-column: 2 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s2);
  font-size: var(--text-sm);
  font-weight: 500;
}
.line__mine[hidden] {
  display: none;
}

/* Price, with the painted circle that marks it as ordered */
.price {
  position: relative;
  display: inline-block;
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: var(--shade);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.circle {
  position: absolute;
  left: -0.5em;
  top: -0.45em;
  width: calc(100% + 1em);
  height: calc(100% + 0.85em);
  overflow: visible;
  pointer-events: none;
}
.circle path {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgb(234 11 11 / 0.55));
  transition: stroke-dashoffset var(--dur-paint) var(--ease-paint);
}
.is-in .circle path {
  stroke-dashoffset: 0;
}

/* Round add button */
.add {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--cream);
  box-shadow: inset 0 0 0 2px var(--rule-strong);
  transition: background-color var(--dur-quick) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    transform var(--dur-quick) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.add:hover {
  box-shadow: inset 0 0 0 2px var(--cream-2);
}
.add:active {
  transform: scale(0.92);
}
.is-in .add {
  background: var(--red-ink);
  box-shadow: 0 0 0 1px rgb(255 120 100 / 0.3), 0 3px 14px rgb(234 11 11 / 0.55);
}

.qty-chip {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--red-ink);
  color: var(--cream);
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: 2.25rem;
  margin-left: auto;
  padding: 0 var(--s2);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--cream-2);
  font-size: var(--text-sm);
  font-weight: 600;
  position: relative;
}
.text-btn::before {
  content: '';
  position: absolute;
  inset: -0.4rem -0.2rem;
}
.text-btn:hover {
  color: var(--cream);
}
.text-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Plato del día: the feature panel */
.feature {
  display: grid;
  gap: var(--s5);
}
.feature__photo {
  margin: 0 var(--s2);
  transform: rotate(-1.2deg);
}
.feature__photo img {
  width: 100%;
  aspect-ratio: 468 / 226;
  object-fit: cover;
  border: 5px solid var(--cream);
  border-radius: 3px;
  box-shadow: 0 14px 28px -14px rgb(0 0 0 / 0.9);
}
.feature__body {
  display: grid;
  gap: var(--s3);
  padding-inline: var(--s2);
}
.feature__name {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
}
.feature__detail {
  color: var(--cream-2);
}
.feature__promo {
  justify-self: start;
  max-width: 30ch;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1.5px rgb(242 193 15 / 0.35);
  font-weight: 600;
}
.feature__promo strong {
  margin-left: 0.15em;
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: var(--shade);
}
.feature__buy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s4) var(--s5);
  margin-top: var(--s2);
}
.feature__buy .price {
  font-size: 2.4rem;
}
.feature .line__mine {
  margin-top: 0;
}

@media (min-width: 640px) {
  .feature {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
}

/* Jugos */
.juices__intro {
  display: grid;
  gap: var(--s4);
  margin: 0 var(--s2) var(--s5);
}
.juices__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 40%;
  border: 5px solid var(--cream);
  border-radius: 3px;
  transform: rotate(0.8deg);
  box-shadow: 0 14px 28px -14px rgb(0 0 0 / 0.9);
}
.juices__sealed {
  color: var(--cream-2);
  font-size: var(--text-sm);
}
.juices__sealed strong {
  color: var(--cream);
}

.juices {
  width: calc(100% - var(--s2));
  margin-inline: var(--s1);
  border-collapse: collapse;
}
.juices th,
.juices td {
  padding: var(--s2) 0;
  border-top: 1px dashed var(--rule);
}
.juices thead th {
  border-top: 0;
  padding-bottom: var(--s1);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-2);
  text-align: right;
}
.juices thead th:first-child {
  text-align: left;
}
.juices tbody th {
  text-align: left;
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: var(--shade);
}
.juices td {
  text-align: right;
  padding-left: var(--s2);
}
.juices tr.is-split th,
.juices tr.is-split td {
  border-top: 2px solid var(--rule-strong);
}

.pricebtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-height: var(--tap);
  min-width: 5.4rem;
  padding: 0 var(--s2);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--rule);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur-quick) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.pricebtn:hover {
  box-shadow: inset 0 0 0 1.5px var(--cream-3);
}
.pricebtn:active {
  background: var(--panel-2);
}
.pricebtn__plus {
  display: inline-flex;
  color: var(--cream-2);
}
.pricebtn__plus svg {
  width: 0.95rem;
  height: 0.95rem;
}
.pricebtn .price {
  font-size: 1.35rem;
}
.pricebtn .qty-chip {
  position: absolute;
  top: -0.55rem;
  right: -0.45rem;
  height: 1.4rem;
  min-width: 1.5rem;
  font-size: 0.9rem;
}
.pricebtn .qty-chip[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .panel {
    padding: var(--s6) var(--s5) var(--s5);
  }
  .juices__intro {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  :root {
    --col-count: 4.25rem;
    --col-price: 7.25rem;
  }
  .lines {
    padding-inline: var(--s2);
  }
  .line__count {
    font-size: 2.65rem;
  }
  .line__name {
    font-size: 1.4rem;
  }
  .price {
    font-size: 1.5rem;
  }
  .pricebtn {
    min-width: 6.4rem;
    padding: 0 var(--s3);
  }
  .juices tbody th {
    font-size: 1.3rem;
  }
}
