.shop-head,
.shop-wrap {
  padding-block: clamp(2rem, 6vw, 5rem);
}
.shop-head h1,
.shop-wrap h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.065em;
  margin: 0.25em 0;
}
.shop-head .cg-lead {
  max-width: 46rem;
}
.shop-nav {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.shop-nav a {
  border: 1px solid #7296ad70;
  border-radius: 100px;
  padding: 0.6rem 1rem;
  color: #eaf3fa;
  text-decoration: none;
}
.shop-nav a:hover,
.shop-nav a:focus-visible {
  background: #1a435f;
}
.shop-nav span {
  padding-left: 0.4em;
  color: #9adffc;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.85fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  padding-block: 1.8rem 4rem;
}
.shop-section,
.teacher-card {
  margin-block: 0 2.8rem;
  scroll-margin-top: 6rem;
}
.shop-section > h2,
.basket h2,
.teacher-card h2,
.shop-receipt h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0.35em 0;
}
.shop-section > p,
.shop-card p,
.basket p,
.shop-receipt p {
  color: #c1d5e4;
  line-height: 1.62;
}
.shop-cards {
  display: grid;
  gap: 1rem;
}
.shop-card,
.basket {
  padding: clamp(1.15rem, 3vw, 1.75rem);
  border-radius: 1.25rem;
}
.shop-card {
  display: flex;
  align-items: flex-start;
  gap: 1.3rem;
  scroll-margin-top: 6rem;
}
.shop-card > div {
  min-width: 0;
  flex: 1;
}
.shop-card h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0;
}
.shop-card p {
  margin: 0.45rem 0 1rem;
}
.shop-cover {
  border: 1px solid #7895ab66;
  border-radius: 3px;
  max-width: 20%;
  height: auto;
  box-shadow: 0 8px 22px #0007;
}
.shop-card form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.shop-card label,
.basket label {
  font-size: 0.8rem;
  font-weight: 650;
  color: #c8dfed;
}
.shop-card label {
  flex-basis: 100%;
}
.shop-card select,
.basket input {
  font: inherit;
  color: #eaf3fa;
  border: 1px solid #577790;
  background: #102840;
  border-radius: 0.5rem;
  padding: 0.65rem 0.55rem;
  min-width: 0;
  max-width: 100%;
}
.shop-card select {
  flex: 1 1 12rem;
  min-height: 44px;
}
.shop-card .cg-button,
.basket .cg-button {
  white-space: normal;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.basket {
  position: sticky;
  top: 5.75rem;
  scroll-margin: 6rem;
  max-height: calc(100dvh - 6.75rem);
  overflow: auto;
}
.basket h2 {
  margin-top: 0.2rem;
}
.basket-line,
.basket dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.basket-line {
  border-bottom: 1px solid #627e934d;
  padding: 0.8rem 0;
}
.basket-line > strong {
  font-size: 0.93rem;
  flex: 1;
  min-width: 9rem;
}
.basket-controls {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.basket-controls button {
  background: #17314a;
  color: #eaf3fa;
  border: 1px solid #627e93;
  border-radius: 0.38rem;
  min-width: 2.1rem;
  min-height: 2.1rem;
  cursor: pointer;
}
.basket-controls .remove-item {
  background: transparent;
  border: 0;
  text-decoration: underline;
}
.basket dl {
  margin: 1rem 0;
}
.basket dl div {
  margin-block: 0.45rem;
}
.basket dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.basket dl div:last-child {
  border-top: 1px solid #627e93;
  padding-top: 0.65rem;
  font-weight: 700;
  font-size: 1.2rem;
}
.basket form label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}
.basket fieldset {
  padding: 0;
  border: 0;
  margin: 1rem 0;
}
.basket legend {
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.basket button:disabled {
  opacity: 0.55;
  cursor: default;
}
.shop-feedback {
  min-height: 1.3em;
}
.shop-receipt {
  max-width: 52rem;
}
.receipt-lines {
  padding-left: 1.25rem;
  line-height: 1.9;
}
.receipt-total {
  font-size: 1.4rem;
  font-weight: 700;
}
.shop-receipt button {
  margin: 0 0.7rem 0.6rem 0;
}
.shop-nav a:focus-visible,
.shop-card :focus-visible,
.basket :focus-visible {
  outline: 3px solid #9de4ff;
  outline-offset: 3px;
}
.shop-status {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #aeddff;
}
.shop-layout [hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .basket {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .shop-nav {
    gap: 0.4rem;
  }
  .shop-nav a {
    padding: 0.55rem 0.8rem;
  }
  .shop-cover {
    max-width: 17%;
  }
}
@media (max-width: 470px) {
  .shop-card {
    gap: 0.65rem;
  }
  .shop-card form {
    display: grid;
  }
  .shop-cover {
    max-width: 15%;
  }
  .shop-card select {
    width: 100%;
  }
  .shop-head,
  .shop-wrap {
    padding-top: 2rem;
  }
}

.mobile-basket-link {
  display: none;
}
@media (max-width: 800px) {
  .mobile-basket-link:not([hidden]) {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: 1rem;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 1.1rem;
    border: 1px solid #9de2ff;
    border-radius: 2rem;
    background: #a0def8;
    color: #09253d;
    text-decoration: none;
    font-weight: 750;
    box-shadow: 0 0.4rem 1.2rem #06111dcc;
  }
  .shop-layout {
    padding-bottom: 5rem;
  }
  .basket {
    scroll-margin: 5.7rem;
  }
}
