.shop-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  color: white;
}
.shop-cart-button svg { width: 23px; height: 23px; }
.shop-cart-button span {
  min-width: 19px;
  padding: 2px 4px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: 700 11px/1.3 Arial, sans-serif;
  text-align: center;
}
.shop-choose, .shop-primary {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid #222;
  border-radius: 8px;
  font-family: inherit;
  line-height: 1.4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.shop-choose {
  --shop-split: 84%;
  isolation: isolate;
  margin-bottom: 22px;
  background: #101010;
  border-color: #777;
  color: white;
  transition: --shop-split .28s ease, border-color .28s ease;
}
@property --shop-split {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 84%;
}
.shop-choose {
  background: linear-gradient(108deg, #101010 var(--shop-split), white var(--shop-split));
}
.shop-choose span { color: white; mix-blend-mode: difference; }
.shop-choose:hover, .shop-choose:focus-visible { --shop-split: 12%; border-color: #fff; }
.shop-open { overflow: hidden; }
.shop-dialog {
  position: fixed;
  max-width: none;
  width: min(870px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #131313;
  box-shadow: 0 16px 76px #0006;
  line-height: 1.5;
}
.shop-dialog::backdrop { background: #090909ad; }
.shop-dialog[open] { animation: shop-appear .2s ease-out both; }
.shop-dialog[data-view="cart"], .shop-dialog[data-view="checkout"] {
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100%);
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.shop-dialog[data-view="cart"][open], .shop-dialog[data-view="checkout"][open] {
  animation: shop-slide .22s ease-out both;
}
@keyframes shop-appear { from { opacity: 0; transform: translateY(8px); } }
@keyframes shop-slide { from { transform: translateX(100%); } }
.shop-close {
  position: sticky;
  top: 10px;
  z-index: 1;
  display: block;
  width: 44px;
  height: 44px;
  margin: 10px 10px -45px auto;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: white;
  color: #111;
  font-size: 25px;
}
.shop-content { padding: 32px; overflow-wrap: anywhere; }
.shop-content h2 {
  margin: 0 42px 16px 0;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.08;
}
.shop-product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
.shop-product form { padding-top: 16px; }
.shop-photo {
  display: block;
  width: 100%;
  height: clamp(210px, 55vh, 460px);
  object-fit: contain;
  background: #eee;
  border-radius: 9px;
}
.shop-category { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.shop-description { color: #4d4d4d; white-space: pre-line; }
.shop-price { margin: 14px 0; font-size: 19px; font-weight: 800; }
.shop-dialog fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.shop-dialog legend, .shop-dialog label { font-size: 13px; font-weight: 700; }
.shop-dialog legend { padding: 0; margin-bottom: 7px; }
.shop-options, .shop-line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.shop-views { margin-top: 8px; }
.shop-options button, .shop-line-actions button {
  min-width: 44px;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: white;
  color: #111;
}
.shop-options button[aria-pressed="true"], .shop-primary { background: #141414; color: white; }
.shop-primary:hover:not(:disabled) { background: #383838; }
.shop-dialog button:disabled { opacity: .5; cursor: not-allowed; }
.shop-dialog :focus-visible, .shop-choose:focus-visible, .shop-cart-button:focus-visible {
  outline: 2px solid #777;
  outline-offset: 3px;
}
.shop-dialog input:not([type="radio"]), .shop-dialog select, .shop-dialog textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #aaa;
  border-radius: 6px;
  background: white;
  color: #111;
  font: inherit;
  font-size: 16px;
}
.shop-dialog input[type="number"] { max-width: 100px; }
.shop-dialog input[type="radio"] { accent-color: #111; }
.shop-dialog textarea { resize: vertical; }
.shop-note { font-size: 13px; color: #555; }
.shop-lines { margin: 18px 0; padding: 0; list-style: none; }
.shop-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid #ddd;
}
.shop-line img, .shop-placeholder { width: 72px; height: 82px; object-fit: contain; background: #eee; border-radius: 6px; }
.shop-line p { margin: 5px 0; font-size: 13px; }
.shop-line .shop-subtotal { font-weight: 700; }
.shop-summary { margin-top: 18px; padding-top: 12px; border-top: 1px solid #ccc; }
.shop-summary strong { display: block; }
.shop-back {
  min-height: 42px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #222;
  text-decoration: underline;
}
#shopCheckoutForm > label, .shop-address label, #shopMessage label { display: block; margin-bottom: 12px; }
#shopMessage { margin-top: 14px; }
.shop-dialog[data-view="confirmation"] {
  width: min(560px, calc(100% - 28px));
  background: #101010;
  color: #fff;
}
.shop-dialog[data-view="confirmation"] .shop-close {
  border-color: #555;
  background: #171717;
  color: #fff;
}
.shop-confirmation {
  padding: clamp(20px, 5vw, 38px) 0 8px;
  text-align: center;
}
.shop-confirm-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border: 1px solid #c8c8c8;
  border-radius: 50%;
  animation: shop-confirm-in .4s ease-out both;
}
.shop-confirm-icon svg { width: 34px; height: 34px; }
.shop-confirm-icon path {
  stroke-dasharray: 28;
  animation: shop-check-in .4s .12s ease-out both;
}
@keyframes shop-confirm-in {
  from { opacity: 0; transform: scale(.84); }
}
@keyframes shop-check-in {
  from { stroke-dashoffset: 28; }
  to { stroke-dashoffset: 0; }
}
.shop-confirmation h2 { margin: 0 0 16px; }
.shop-confirmation p { max-width: 380px; margin: 0 auto 14px; color: #d3d3d3; }
.shop-confirmation .shop-thanks { color: #fff; font-weight: 700; }
.shop-confirmation .shop-send {
  margin-top: 12px;
  border-color: #fff;
  background: #fff;
  color: #111;
  transition: background .2s ease;
}
.shop-confirmation .shop-send:hover { background: #ddd; }
.shop-confirmation .shop-back { margin-top: 10px; color: #fff; }
@media (max-width: 640px) {
  .nav .nav-actions { gap: 4px; }
  .shop-content { padding: 24px 17px; }
  .shop-product { grid-template-columns: 1fr; gap: 10px; }
  .shop-photo { height: clamp(175px, 37vh, 290px); }
  .shop-close { margin-bottom: -38px; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-dialog[open], .shop-dialog[data-view][open], .shop-confirm-icon, .shop-confirm-icon path { animation: none; }
  .shop-choose, .shop-confirmation .shop-send { transition: none; }
}
