.shop-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  gap: clamp(8px, 1.6vw, 24px);
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--line);
  margin-bottom: 35px;
}
.page-shop:has(.site-header:not(.is-hidden)) .shop-controls { top: var(--header-dock-edge, 78px); }
.shop-controls .shop-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 0;
  margin: 0;
}
.shop-controls .shop-filter button {
  min-height: 48px;
  padding: 5px 4px;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 650;
  line-height: 1.2;
  border-block-end: 0;
  border-inline-end: 1px solid var(--line);
}
.shop-controls .shop-filter button:hover,
.shop-controls .shop-filter button[aria-pressed="true"] {
  background: #f6ece6;
  color: #a02028;
  box-shadow: inset 0 -2px var(--red);
}
.shop-controls .shop-filter button:focus-visible { outline-offset: -4px; }
.shop-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-actions .product-count { margin: 0; white-space: nowrap; font-size: 11px; }

.shop-cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
  font: 650 11px/1.25 var(--font-body);
  text-transform: uppercase;
}
.shop-cart-toggle svg {
  width: 19px;
  height: 19px;
}
.shop-cart-toggle [data-shop-cart-count] {
  min-width: 20px;
  padding: 3px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}
.shop-dialog {
  position: fixed;
  inset: 0;
  width: min(940px, calc(100% - 36px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px #120e0940;
}
.shop-dialog::backdrop { background: #16130eb0; }
body:has(.shop-dialog[open]) { overflow: hidden; }
.shop-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}
.shop-dialog-head > p {
  color: var(--red);
  font: 750 11px/1.3 var(--font-body);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.shop-dialog-head .icon-button {
  width: 44px;
  min-height: 44px;
  flex: none;
}
.shop-dialog h2 {
  font: 700 clamp(24px, 3vw, 44px)/1.03 var(--font-heading);
  text-transform: uppercase;
}
.shop-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.shop-product-layout figure {
  position: relative;
  margin: 0;
  min-height: 380px;
  overflow: hidden;
  background: #ebe7de;
}
.shop-product-layout figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(8px, 2.5vw, 20px);
  object-fit: contain;
  mix-blend-mode: multiply;
}
.shop-product-copy {
  display: grid;
  align-content: center;
  gap: 15px;
  padding: clamp(20px, 4vw, 44px);
}
.shop-product-price,
.shop-line-name {
  font: 700 15px/1.25 var(--font-body);
}
.shop-product-description {
  font: 400 15px/1.5 var(--font-description);
}
.shop-product-options {
  display: grid;
  gap: 15px;
}
.shop-dialog .button {
  width: 100%;
  justify-content: center;
  margin: 0;
}
.shop-dialog .button:disabled {
  color: #625c51;
  background: #eeebe4;
  border-color: #ccc5b9;
  cursor: default;
}
.shop-field,
.shop-line-quantity {
  display: grid;
  gap: 6px;
  font: 650 11px/1.4 var(--font-body);
}
.shop-field select,
.shop-line-quantity input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background-color: var(--paper);
  font: 500 15px/1.4 var(--font-body);
}
.shop-dialog [hidden],
.shop-cart-toggle[hidden] { display: none; }
.shop-cart-dialog { width: min(620px, calc(100% - 36px)); }
.shop-cart-content { padding: 8px clamp(16px, 4vw, 34px) 30px; }
.shop-cart-content [data-shop-empty] { padding: 22px 0; }
.shop-cart-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.shop-cart-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 68px auto;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.shop-cart-item > img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: #ebe7de;
  mix-blend-mode: multiply;
}
.shop-line-variant,
.shop-cart-summary #shop-checkout-status {
  color: var(--muted);
  font-size: 13px;
}
.shop-cart-item > strong { text-align: right; font-size: 13px; }
.shop-cart-item [data-shop-remove],
.shop-continue {
  min-height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shop-cart-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.shop-cart-summary > p:first-child {
  display: flex;
  justify-content: space-between;
  font: 650 15px/1.25 var(--font-body);
}
.shop-cart-summary #shop-checkout-status { text-align: center; }
.shop-continue { margin-top: 8px; }

@media (max-width: 650px) {
  .shop-controls { grid-template-columns: 1fr; gap: 0; margin-bottom: 22px; }
  .shop-controls .shop-filter { grid-template-columns: .9fr 1.25fr .95fr .9fr; }
  .shop-controls .shop-filter button:last-child { border-inline-end: 0; }
  .shop-actions { border-top: 1px solid var(--line); padding-inline-start: 8px; }
  .shop-cart-toggle { padding-inline: 9px; gap: 5px; border-block: 0; }
  .shop-cart-toggle svg { width: 15px; height: 15px; }
  .shop-product-layout { grid-template-columns: 1fr; }
  .shop-product-layout figure {
    min-height: 0;
    height: clamp(150px, 32vh, 285px);
  }
  .shop-product-copy {
    gap: 11px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .shop-cart-item { grid-template-columns: 50px minmax(0, 1fr) 62px auto; gap: 7px; }
  .shop-cart-item > img { width: 50px; height: 50px; }
  .shop-line-name { font-size: 12px; }
  .shop-line-variant { font-size: 11px; }
}
