.product-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(9, 10, 8, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.product-cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.product-cart {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 21;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: -25px 0 70px rgba(0, 0, 0, 0.22);
  visibility: hidden;
  pointer-events: none;
  transform: translateX(105%);
  transition: transform 0.28s ease, visibility 0s 0.28s;
}

.product-cart.open { transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.product-cart > header {
  min-height: 76px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.product-cart h2 { margin: 0; }
.product-cart > header button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}
.product-cart-body { padding: 18px 20px; overflow: auto; flex: 1; }
.product-cart-line {
  padding: 15px 0;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}
.product-cart-line > span {
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--swatch);
  font-weight: 900;
}
.product-cart-line small { display: block; margin-top: 3px; color: var(--muted); }
.product-cart-line div div { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.product-cart-line button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.product-cart-empty { padding: 80px 0; color: var(--muted); text-align: center; }
.product-cart > footer {
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.product-cart > footer > div { display: flex; justify-content: space-between; }
.product-cart > footer > button {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-weight: 900;
}
.product-cart > footer > button:disabled { opacity: 0.45; cursor: default; }
.product-cart > footer small { display: block; margin-top: 9px; color: var(--muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .product-cart,
  .product-cart-backdrop { transition: none; }
}

.product-cart-error { margin: 10px 0 0; color: #9b2d21; font-size: 12px; line-height: 1.4; }

.product-cart-line > span.has-photo { background:#eee9dc; overflow:hidden; padding:4px; }
.product-cart-line > span img { width:100%;height:100%;object-fit:contain;display:block; }
