/* Listing-card purchase actions and the quick cart. Colours come from the active theme tokens. */
body.sector-shell .card-add {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .4rem;
  width: 100%;
  max-width: 100%;
  margin: .35rem 0 0;
}
body.sector-shell .card-add button,
body.sector-shell .card-add .card-go {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
}
body.sector-shell .card-add button { width: 100%; }
body.sector-shell .card-add .card-buy {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
body.sector-shell[data-theme] .card-add .card-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  align-self: center;
  height: auto;
  margin: 0;
  padding: .35rem .5rem;
  position: static;
  overflow: visible;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: .18em;
  font-size: .85rem;
  font-weight: 650;
}
body.sector-shell .card-add .card-go::before { content: none; }
body.sector-shell .card-options > .card-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  max-width: 76px;
  min-height: 44px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  line-height: 1.2;
  cursor: pointer;
}
body.sector-shell .card-choice input {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
body.sector-shell .card-choice a {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
body.sector-shell .card-choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
body.sector-shell .card-choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
body.sector-shell .header-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: .35rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .75rem;
  line-height: 1;
  font-weight: 700;
}
.quick-cart { display: none; }
.quick-cart:target {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 70;
}
body:has(.quick-cart:target) { overflow: hidden; }
.quick-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 24, .45);
}
.quick-cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: min(28rem, 100%);
  max-width: 100%;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  background: var(--card);
  color: var(--ink);
  box-shadow: -12px 0 32px rgba(18, 20, 24, .16);
}
.quick-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.quick-cart-head h2 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.quick-cart-head a,
.quick-cart-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
}
.quick-cart-note { margin: 0; font-weight: 650; }
.quick-cart-alert { margin: 0; color: var(--warn); font-weight: 700; }
.quick-cart-empty { margin: 0; color: var(--muted); }
.quick-cart-lines { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.quick-cart-lines li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: .75rem;
  row-gap: .55rem;
  align-items: start;
  min-width: 0;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.quick-cart-lines li:first-child { padding-top: 0; }
.quick-cart-lines li:last-child { border-bottom: 0; padding-bottom: 0; }
.quick-cart-image {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  align-self: center;
  width: 4.5rem;
  height: 4.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: .68rem;
  text-align: center;
}
.quick-cart-image img { width: 100%; height: 100%; object-fit: contain; }
.quick-cart-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .75rem;
  align-items: start;
  min-width: 0;
}
.quick-cart-name {
  grid-column: 1;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.35;
  text-decoration: none;
}
.quick-cart-meta,
.quick-cart-unit {
  grid-column: 1;
  margin: .12rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
}
.quick-cart-line-total {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  margin: .1rem 0 0;
  font-size: .9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.quick-cart-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
  min-width: 0;
}
.quick-cart-total {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin: 0;
  font-size: 1.05rem;
}
.quick-cart-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.qty { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .5rem .55rem; margin: 0; }
.qty-cluster { display: grid; gap: .28rem; justify-items: start; }
.qty-caption {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}
.qty-stepper {
  display: inline-grid;
  grid-template-columns: 2.5rem 2.75rem 2.5rem;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.qty-stepper > form { display: flex; margin: 0; min-width: 0; }
body.sector-shell .qty-stepper button {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}
body.sector-shell .qty-stepper button:hover:not(:disabled) { background: var(--line); filter: none; }
body.sector-shell .qty-stepper button:disabled { opacity: .38; cursor: not-allowed; }
.qty-stepper input[type="number"] {
  display: block;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper input[type="number"]::-webkit-outer-spin-button,
.qty-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.sector-shell .qty-update {
  width: auto;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 .9rem;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
}
body.sector-shell .cart-remove { margin: 0; }
body.sector-shell .cart-remove button {
  width: auto;
  height: auto;
  min-height: 2rem;
  margin: 0;
  padding: .1rem 0;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: .18em;
}
body.sector-shell .cart-remove button:hover {
  background: transparent;
  color: var(--ink);
  filter: none;
}
@media (max-width: 640px) {
  .quick-cart-panel { width: 100%; }
  body.sector-shell .card-add .card-go { width: 100%; }
}

/* Quick cart, calm version: one filled action, quiet controls, a footer that stays in view. */
body.sector-shell .quick-cart-panel { gap: 0; padding: 0; }
body.sector-shell .quick-cart-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
body.sector-shell .quick-cart-head h2 { font-size: 1.05rem; font-weight: 650; }
body.sector-shell .quick-cart-count { color: var(--muted); font-weight: 500; }
body.sector-shell .quick-cart-head .quick-cart-close { width: 40px; height: 40px; min-height: 40px; border-radius: 999px; color: var(--ink); font-size: 1.6rem; line-height: 1; text-decoration: none; }
body.sector-shell .quick-cart-head .quick-cart-close:hover { background: var(--bg); }
body.sector-shell .quick-cart-note { display: flex; align-items: center; gap: 8px; margin: 12px 18px 0; padding: 10px 12px; border-radius: 10px; background: #ecfdf5; color: #047857; font-size: .9rem; font-weight: 600; }
body.sector-shell .quick-cart-alert, body.sector-shell .quick-cart-empty { margin: 12px 18px 0; }
body.sector-shell .quick-cart-lines { flex: 1 1 auto; padding: 4px 18px; overflow: auto; }
body.sector-shell .quick-cart-lines li { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; padding: 14px 0; }
body.sector-shell .quick-cart-lines li:first-child { padding-top: 14px; }
body.sector-shell .quick-cart-image { grid-row: 1 / span 2; align-self: start; width: 64px; height: 64px; background: #fff; }
body.sector-shell .quick-cart-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--ink); font-size: .9rem; font-weight: 600; line-height: 1.35; text-decoration: none; }
body.sector-shell .quick-cart-name:hover { color: var(--accent); }
body.sector-shell .quick-cart-line-total { font-size: .92rem; font-weight: 650; }
body.sector-shell .quick-cart-controls { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
body.sector-shell .quick-cart-controls .qty { gap: 0; }
body.sector-shell .quick-cart-controls .qty-caption,
body.sector-shell .quick-cart-controls .qty-update { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.sector-shell .quick-cart-controls .qty-stepper { grid-template-columns: 34px 40px 34px; border-radius: 999px; }
body.sector-shell .quick-cart-controls .qty-stepper button,
body.sector-shell .quick-cart-controls .qty-stepper input[type="number"] { height: 34px; min-height: 34px; font-size: .95rem; }
body.sector-shell .quick-cart-controls .qty-stepper button { background: transparent; }
body.sector-shell .quick-cart-controls .cart-remove { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.sector-shell .quick-cart .quick-cart-remove { min-height: 34px; padding: 0 4px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted); font-size: .82rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-transform: none; letter-spacing: 0; }
body.sector-shell .quick-cart .quick-cart-remove:hover { color: var(--warn, #b91c1c); filter: none; }
body.sector-shell .quick-cart-foot { position: sticky; bottom: 0; display: grid; gap: 8px; margin-top: auto; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--card); }
body.sector-shell .quick-cart-total { align-items: baseline; font-size: 1rem; }
body.sector-shell .quick-cart-total strong { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
body.sector-shell .quick-cart-hint { margin: 0 0 4px; color: var(--muted); font-size: .78rem; }
body.sector-shell .quick-cart-checkout { min-height: 46px; border-radius: 10px; font-size: .95rem; font-weight: 650; }
body.sector-shell .quick-cart-full { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; }
body.sector-shell .quick-cart-full:hover { border-color: var(--accent); color: var(--accent); }
body.sector-shell .quick-cart-panel > .quick-cart-full { margin: 12px 18px; }
