/* Shopping desk */
body[data-view="home"] {
  padding: 0;
  background: #f3f5f6;
}
.shop-container,
.market-home.wrap {
  width: min(1216px, calc(100% - clamp(32px, 7vw, 96px)));
  margin-inline: auto;
}
.shop-header {
  color: #fff;
  background: #172d51;
  border-bottom: 3px solid #f5cd48;
}
.shop-bar, #shop-nav, .shop-header .brand {
  display: flex;
  align-items: center;
}
.shop-bar {
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
}
.shop-header .brand {
  gap: .62rem;
  font-size: 1.58rem;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 8px;
  background: var(--yellow);
  color: #192d4c;
}
.brand-mark svg { width: 25px; height: 25px; }
#shop-nav { flex-wrap: wrap; gap: .3rem clamp(.8rem, 1.7vw, 1.5rem); }
#shop-nav a {
  font-size: .95rem;
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none;
}
#shop-nav a:hover { text-decoration: underline; }
#shop-nav .full-calculator {
  padding: .4rem .9rem;
  border: 1px solid #8fa2be;
  border-radius: 5px;
}
.shop-header :focus-visible { outline-color: var(--yellow); }
.desk-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  margin: clamp(1.4rem, 3.1vw, 3rem) 0 clamp(1.1rem, 2vw, 1.7rem);
}
.desk-heading h1 {
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -.065em;
}
.desk-heading p, .panel-intro { color: #4a5c6a; }
.desk-heading p { font-size: 1.04rem; }
.market-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  gap: clamp(.8rem, 1.75vw, 1.5rem);
  align-items: stretch;
}
.pack-panel, .checkout {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1rem, 2.25vw, 2rem);
  border-radius: 12px;
}
.pack-panel {
  border: 1px solid #ced6dd;
  background: #fff;
}
.checkout {
  color: #352c17;
  background: #ffdf70;
  border: 1px solid #e8c14f;
}
.market-desk h2 {
  font-size: clamp(1.55rem, 2.35vw, 2.3rem);
  letter-spacing: -.052em;
  line-height: 1.1;
}
.panel-intro { margin-top: .4rem; line-height: 1.42; }
.checkout .panel-intro { color: #554728; }
.pack-table {
  width: 100%;
  margin: 1.12rem 0 .82rem;
  border-collapse: collapse;
  table-layout: fixed;
}
.measure-col { width: 24%; }
.pack-table th { text-align: left; line-height: 1.2; }
.pack-table thead th { padding: 0 0 .55rem .6rem; }
.bag-marker {
  display: inline-grid;
  width: 1.45rem;
  height: 1.45rem;
  margin-right: .45rem;
  place-items: center;
  border-radius: 4px;
  color: white;
  background: #244caf;
  font: 700 .9rem/1 var(--mono);
}
.marker-b { color: #203b51; background: #c1dae9; }
.pack-table tbody td { padding: .3rem 0 .3rem .6rem; }
.pack-table th small {
  display: block;
  margin-top: .12rem;
  color: #536475;
  font-size: .86rem;
  font-weight: 500;
}
.pack-table input, .ticket-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: .4rem .65rem;
  border: 1px solid #aab9c7;
  border-radius: 5px;
  background: white;
  color: #142b46;
  font: 600 1.08rem/1.3 var(--mono);
}
.pack-table tbody tr:nth-child(2) > * { padding-bottom: .78rem; }
.pack-table .unit-row { background: #edf2fa; }
.unit-row th, .unit-row td { border-block: 1px solid #cbd6e4; }
.pack-table .unit-row th { padding: .55rem .45rem; }
.pack-table .unit-row td { padding: .55rem .6rem; }
.unit-row strong {
  color: #1a438d;
  font: 700 clamp(1.42rem, 2.2vw, 2.1rem)/1 var(--mono);
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
#quickresult {
  display: grid;
  gap: .15rem;
  margin: 0 0 1rem;
  padding: .58rem 0 .58rem .8rem;
  border-left: 3px solid #2862b5;
  line-height: 1.42;
}
#quickresult strong { color: #183c73; font-size: 1.05rem; }
#quickresult span { color: #455465; }
#pack-cost:empty { display: none; }
.panel-link {
  align-self: flex-start;
  margin-top: auto;
  font-size: .98rem;
  font-weight: 650;
  color: #214587;
}
.checkout .panel-link { color: #46371b; }
.ticket {
  position: relative;
  margin: 1rem 0 1.35rem;
  padding: .9rem clamp(.85rem, 1.6vw, 1.5rem) 1rem;
  background: #fffdf3;
  color: #2e2d26;
  box-shadow: 0 2px 5px #664e1815;
}
.ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 7px;
  background: linear-gradient(135deg,#fffdf3 25%,transparent 26%) 0 0/14px 14px,
              linear-gradient(225deg,#fffdf3 25%,transparent 26%) 0 0/14px 14px;
}
.ticket-line, .ticket-due {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
}
.ticket-line { min-height: 2rem; margin-bottom: .32rem; }
.ticket-line strong, #postage { font: 600 1rem/1.3 var(--mono); }
.ticket-field { display: flex; align-items: center; gap: .4rem; font: .92rem/1 var(--mono); }
.ticket-field input { width: 5.3rem; height: 38px; }
#cart-out {
  display: block;
  border-top: 1px dashed #a29979;
  padding-top: .65rem;
  margin-top: .45rem;
}
.ticket-due { align-items: baseline; font-weight: 650; }
#cart-total {
  font: 700 clamp(1.3rem, 2.1vw, 2.05rem)/1.25 var(--mono);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
#cart-change { display: block; color: #635634; margin-top: .32rem; font-size: .95rem; line-height: 1.4; }

.market-home #topics { margin-top: clamp(1.6rem, 3vw, 3rem); }
.market-home .case-cover {
  border-block: 1px solid #aebbc8;
  grid-template-columns: minmax(0,1fr) minmax(0,.85fr);
  padding: 1.2rem 0;
}
.case-cover h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.case-cover .photo img { height: 132px; border-radius: 6px; }
.case-shortcuts { display: grid; gap: .15rem; margin: .7rem 0; padding-left: 1.15rem; }
.case-shortcuts a { color: #214587; }
@media (min-width: 701px) and (max-width: 950px) {
  .shop-container, .market-home.wrap { width: calc(100% - 32px); }
  .market-desk { grid-template-columns: minmax(0,1.17fr) minmax(0,1fr); }
  #shop-nav { gap: .85rem; }
  .pack-panel, .checkout { padding: 1.12rem; }
  .measure-col { width: 27%; }
  .pack-table .unit-row th { white-space: nowrap; padding-inline: .25rem; }
}
@media (max-width: 850px) {
  .desk-heading { display: block; }
  .desk-heading p { margin-top: .4rem; }
}
@media (max-width: 1024px) {
  .shop-bar { min-height: 56px; gap: .4rem .7rem; flex-wrap: wrap; padding-block: .45rem; }
  #shop-nav { width: 100%; flex-wrap: wrap; gap: .1rem .95rem; border-top: 1px solid #536784; padding-block: .5rem .25rem; }
  #shop-nav a { padding-block: .25rem; }
  #shop-nav .full-calculator { padding: .25rem 0; border: 0; color: #ffe493; }
}
@media (max-width: 700px) {
  .shop-container, .market-home.wrap { width: calc(100% - 28px); }
  .market-desk { grid-template-columns: minmax(0,1fr); }
  .desk-heading { margin: 1.15rem 0 .85rem; }
  .desk-heading h1 { font-size: clamp(2rem, 7.5vw, 2.8rem); }
  .desk-heading p { line-height: 1.35; font-size: 1rem; }
  .market-desk h2 { font-size: 1.65rem; }
  .pack-table { margin-block: .85rem .65rem; }
  .pack-table thead th, .pack-table tbody td { padding-left: .4rem; }
  .bag-marker { display: none; }
  .market-home .case-cover { display: grid; grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .market-home .case-cover figure { margin-top: 0; }
}
@media (max-width: 420px) {
  .measure-col { width: 28%; }
  .pack-table .unit-row th { padding-inline: .25rem; white-space: nowrap; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .desk-heading { margin: .7rem 0; }
  .market-desk h2 { font-size: 1.45rem; }
  .pack-panel, .checkout { padding: .85rem; }
  .pack-table { margin-block: .6rem .45rem; }
  #quickresult { padding-block: .35rem; margin-bottom: .65rem; }
  .ticket { margin-block: .7rem 1.1rem; }
}
@media (max-width: 360px) and (max-height: 620px) {
  .desk-heading h1 { font-size: 1.7rem; }
  .desk-heading { margin-block: .5rem; }
  .pack-table thead th { padding-bottom: .25rem; }
  .pack-table tbody tr:nth-child(2) > * { padding-bottom: .4rem; }
  .pack-table .unit-row th, .pack-table .unit-row td { padding-block: .35rem; }
}
@media print {
  .shop-header { display: none; }
}

.panel-link[aria-disabled=true], .full-calculator[aria-disabled=true] { opacity: .65; cursor: default; }
