/* netwolk Pages shop plugin – theme-friendly defaults for products, cart, checkout and thank-you page.
 * Rules sit in :where() and have no specificity, so any theme selector wins. Colours, sizes, radius and muted text
 * follow the theme through custom properties (set them on :root or body to adapt the look; switch the stylesheet off
 * in the plugin settings when the theme styles the shop itself):
 *   --nwp-shop-accent, --nwp-shop-line, --nwp-shop-muted, --nwp-shop-surface, --nwp-shop-soft, --nwp-shop-danger,
 *   --nwp-shop-ok, --nwp-shop-radius
 *   --nwp-shop-on-accent      text on the accent: main button, number in the cart badge (default #fff)
 *   --nwp-shop-button-size    font size of the buttons (default 1em = the surrounding text)
 *   --nwp-shop-button-weight  font weight of the buttons (default 600)
 *   --nwp-shop-label-size     field labels and the discount-code label (default .9375rem)
 *   --nwp-shop-grid-gap       gap of the product grid (default 1.5rem)
 *   --nwp-shop-price-size     price on the product page (default 1.375rem)
 *   --nwp-shop-card-color     text of a product card in the grid (default currentColor = the surrounding text)
 *   --nwp-shop-badge-color    cart badge link (default currentColor = the surrounding text)
 *
 * Everything sits in @layer plugins: rules of the theme (unlayered, or in a later layer such as `theme` of the basis
 * theme) win without !important. The order statement repeats the one of the basis theme: a plugin stylesheet
 * linked before basis.css (e.g. consent.css in nwp_head()) must not make `plugins` the first – weakest – layer.
 * Exception (0.44, HM #23): the colour of the three links of the shop – main button, product card, cart badge – is
 * !important, because a theme's plain `a { color: … }` would otherwise paint the "Zur Kasse" link in the accent on
 * the accent. Important declarations in a layer beat every normal rule; themes change these colours through
 * --nwp-shop-on-accent, --nwp-shop-card-color and --nwp-shop-badge-color. The new variables have no default on :root
 * (fallback in var()), so a theme may set them in any layer.
 */
@layer reset, tokens, base, layout, sections, elements, plugins, theme;
@layer plugins {
:where(:root) {
  --nwp-shop-accent: var(--accent, #a31c54);
  --nwp-shop-line: var(--line, color-mix(in srgb, currentColor 18%, transparent));
  --nwp-shop-muted: color-mix(in srgb, currentColor 66%, transparent);
  --nwp-shop-surface: var(--surface, Canvas);
  --nwp-shop-soft: color-mix(in srgb, var(--nwp-shop-accent) 8%, transparent);
  --nwp-shop-danger: var(--danger, #b42318);
  --nwp-shop-ok: var(--ok, #1f7a4d);
  --nwp-shop-radius: .625rem;
}

:where(.nwp-shop-sr) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.nwp-shop-note) { color: var(--nwp-shop-muted); font-size: .9375rem; }
:where(.nwp-shop-hp) { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- buttons ---- */
:where(.nwp-shop-button) {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit;
  font-size: var(--nwp-shop-button-size, 1em); font-weight: var(--nwp-shop-button-weight, 600);
  padding: .7rem 1.25rem; border: 1px solid var(--nwp-shop-line); border-radius: var(--nwp-shop-radius);
  background: var(--nwp-shop-surface); color: inherit; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
:where(.nwp-shop-button):hover { border-color: var(--nwp-shop-accent); }
:where(.nwp-shop-button--primary) { background: var(--nwp-shop-accent); border-color: var(--nwp-shop-accent); color: var(--nwp-shop-on-accent, #fff); }
:where(.nwp-shop-button--primary):hover { background: color-mix(in srgb, var(--nwp-shop-accent) 84%, #000); }
:where(.nwp-shop-button--wide) { width: 100%; }
:where(.nwp-shop-button):disabled { opacity: .5; cursor: not-allowed; }
:where(.nwp-shop-button, .nwp-shop-line-remove):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); outline-offset: 2px;
}
/* Link case 1 of 3 (see the head comment): the main button as a link ("Zur Kasse"). */
a.nwp-shop-button--primary { color: var(--nwp-shop-on-accent, #fff) !important; }

/* ---- fields ---- */
:where(.nwp-shop-field) { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
:where(.nwp-shop-field label) { font-weight: 600; font-size: var(--nwp-shop-label-size, .9375rem); }
:where(.nwp-shop-optional) { font-weight: 400; color: var(--nwp-shop-muted); }
:where(.nwp-shop-hint) { margin: -.1rem 0 .15rem; color: var(--nwp-shop-muted); font-size: .875rem; }
:where(.nwp-shop-field :is(input, select, textarea)) {
  font: inherit; padding: .6rem .75rem; border: 1px solid var(--nwp-shop-line); border-radius: calc(var(--nwp-shop-radius) * .8);
  background: var(--nwp-shop-surface); color: inherit; min-width: 0; width: 100%; box-sizing: border-box;
}
:where(.nwp-shop-field :is(input, select, textarea)):focus,
:where(.nwp-shop-qty-input):focus {
  outline: none; border-color: var(--nwp-shop-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nwp-shop-accent) 22%, transparent);
}
:where(.nwp-shop-field [aria-invalid="true"]) { border-color: var(--nwp-shop-danger); }
:where(.nwp-shop-error) { margin: 0; color: var(--nwp-shop-danger); font-size: .875rem; }
:where(.nwp-shop-check) { display: flex; align-items: flex-start; gap: .55rem; margin: .4rem 0 .9rem; cursor: pointer; }
:where(.nwp-shop-check input) { margin-top: .3rem; accent-color: var(--nwp-shop-accent); }

/* ---- product page, add to cart ---- */
:where(.nwp-shop-product) { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
/* Without images (F8): the buy box starts under the title and keeps a readable width; the grid keeps its width. */
:where(.nwp-shop-product--text) { justify-items: start; }
:where(.nwp-shop-product--text > .nwp-shop-product-info) { width: 100%; max-width: 44rem; }
@media (min-width: 52rem) {
  :where(.nwp-shop-product:not(.nwp-shop-product--text)) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  :where(.nwp-shop-product-content) { grid-column: 1 / -1; }
}
:where(.nwp-shop-product-media) { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
:where(.nwp-shop-product-image--main) { grid-column: 1 / -1; }
:where(.nwp-shop-product-image img) { display: block; width: 100%; height: auto; border-radius: var(--nwp-shop-radius); }
/* The main image keeps its own proportions (H-44: a voucher cut to a square read «utschein CHF 5»), capped in height. */
:where(.nwp-shop-product-image--main img) { max-height: min(80vh, 44rem); object-fit: contain; }
:where(.nwp-shop-product-title) { margin-top: 0; }
:where(.nwp-shop-product-summary) { color: var(--nwp-shop-muted); font-size: 1.0625rem; }
:where(.nwp-shop-add) { margin: 1.25rem 0; }
:where(.nwp-shop-price) { font-size: var(--nwp-shop-price-size, 1.375rem); font-weight: 700; margin: 0 0 1rem; }
:where(.nwp-shop-price-old) { color: var(--nwp-shop-muted); font-weight: 400; font-size: .85em; }
:where(.nwp-shop-options) { display: flex; flex-wrap: wrap; column-gap: .75rem; }
:where(.nwp-shop-options .nwp-shop-field) { flex: 1 1 9rem; min-width: 0; }
:where(.nwp-shop-add-row) { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
:where(.nwp-shop-add-row .nwp-shop-field) { margin-bottom: 0; }
:where(.nwp-shop-field--qty) { width: 6rem; }
:where(.nwp-shop-add-row .nwp-shop-button) { flex: 1 1 12rem; }
:where(.nwp-shop-stock) { margin: .6rem 0 0; font-size: .9375rem; color: var(--nwp-shop-ok); min-height: 1.4em; }
:where(.nwp-shop-stock--low) { color: color-mix(in srgb, var(--nwp-shop-danger) 70%, #b45309); }
:where(.nwp-shop-stock--out) { color: var(--nwp-shop-danger); }
/* Status next to a simple [data-shop-add] button of own markup. */
:where(.nwp-shop-stock--inline) { display: inline-block; margin: 0 0 0 .5rem; min-height: 0; }
:where(.nwp-shop-stock--inline[hidden]) { display: none; }
:where([data-shop-add][aria-disabled="true"]) { opacity: .5; cursor: not-allowed; }
:where(.nwp-shop-added) { margin: .5rem 0 0; padding: .6rem .8rem; border-radius: var(--nwp-shop-radius); background: var(--nwp-shop-soft); }
.nwp-shop-added a, .nwp-shop-back a, .nwp-shop-line-title, .nwp-shop-check a { color: var(--nwp-shop-accent); }
:where(.nwp-shop-added--inline) { display: inline-block; margin: .5rem 0 0 .5rem; padding: .3rem .6rem; }
:where(.nwp-shop-added-flash) { outline: 2px solid var(--nwp-shop-ok); outline-offset: 2px; }

/* ---- product grid ---- */
:where(.nwp-shop-products) { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--nwp-shop-grid-gap, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
@media (min-width: 48rem) {
  :where(.nwp-shop-products--2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(.nwp-shop-products--3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :where(.nwp-shop-products--4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* A theme's list rhythm (e.g. `.prose li + li { margin-top }`) must not shift single cards out of line (C-V05). */
:where(.nwp-shop-products > li) { margin: 0; padding: 0; min-width: 0; }
:where(.nwp-shop-products > li)::before { content: none; }
:where(.nwp-shop-card-link) { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; }
/* Link cases 2 and 3 of 3 (see the head comment): product card and cart badge (currentColor = the surrounding text). */
.nwp-shop-card-link { color: var(--nwp-shop-card-color, currentColor) !important; }
.nwp-shop-badge { color: var(--nwp-shop-badge-color, currentColor) !important; }
:where(.nwp-shop-card-media) { aspect-ratio: 1; border-radius: var(--nwp-shop-radius); overflow: hidden; background: var(--nwp-shop-soft); }
:where(.nwp-shop-card-media picture) { display: contents; }
:where(.nwp-shop-card-media img) { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
:where(.nwp-shop-card-link:hover .nwp-shop-card-media img) { transform: scale(1.03); }
:where(.nwp-shop-card-title) { font-weight: 600; margin-top: .4rem; }
:where(.nwp-shop-card-link:hover .nwp-shop-card-title) { color: var(--nwp-shop-accent); }
:where(.nwp-shop-card-price) { color: var(--nwp-shop-muted); }

/* ---- badge ---- */
:where(.nwp-shop-badge) { position: relative; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
:where(.nwp-shop-badge-count) {
  min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px; box-sizing: border-box;
  background: var(--nwp-shop-accent); color: var(--nwp-shop-on-accent, #fff); font-size: .75rem; font-weight: 700; line-height: 1.35rem; text-align: center;
}

/* Bump after an addition (F4): one short scale of the count; nothing with reduced motion (below). */
:where(.nwp-shop-badge--bump .nwp-shop-badge-count) { animation: nwp-shop-bump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nwp-shop-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---- mini cart (F4): flyout under the header on wide screens, a sheet at the bottom on phones ---- */
:where(.nwp-shop-mini) {
  position: fixed; z-index: 60; inset: auto .75rem calc(.75rem + env(safe-area-inset-bottom, 0px)) .75rem;
  display: grid; gap: .85rem; padding: 1rem 1.1rem 1.1rem; box-sizing: border-box;
  background: var(--nwp-shop-surface); color: inherit; border: 1px solid var(--nwp-shop-line); border-radius: var(--nwp-shop-radius);
  box-shadow: 0 18px 48px -12px rgb(0 0 0 / .28), 0 2px 6px rgb(0 0 0 / .08);
  opacity: 0; transform: translateY(.75rem); transition: opacity .18s ease-out, transform .22s cubic-bezier(.2, .9, .3, 1.1);
}
:where(.nwp-shop-mini[hidden]) { display: none; }
:where(.nwp-shop-mini--open) { opacity: 1; transform: none; }
:where(.nwp-shop-mini):focus { outline: none; }
:where(.nwp-shop-mini):focus-visible { outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); outline-offset: 2px; }
@media (min-width: 40rem) {
  :where(.nwp-shop-mini) { inset: 4.5rem 1.25rem auto auto; width: 22rem; transform: translateY(-.5rem); }
}
:where(.nwp-shop-mini-head) { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
:where(.nwp-shop-mini-title) { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-weight: 700; }
:where(.nwp-shop-mini-check) {
  width: 1.4rem; height: 1.4rem; border-radius: 999px; background: var(--nwp-shop-ok); flex: none;
  position: relative;
}
:where(.nwp-shop-mini-check)::after {
  content: ''; position: absolute; left: .47rem; top: .26rem; width: .35rem; height: .65rem;
  border: solid #fff; border-width: 0 .14rem .14rem 0; transform: rotate(45deg);
}
:where(.nwp-shop-mini--open .nwp-shop-mini-check) { animation: nwp-shop-pop .4s .08s both cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nwp-shop-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
:where(.nwp-shop-mini-close) {
  width: 2.25rem; height: 2.25rem; border: 0; border-radius: 999px; background: transparent; color: inherit;
  font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
:where(.nwp-shop-mini-close):hover { background: var(--nwp-shop-soft); }
:where(.nwp-shop-mini-close):focus-visible { outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); }
:where(.nwp-shop-mini-item) { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-block: 1px solid var(--nwp-shop-line); }
:where(.nwp-shop-mini-image) { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: calc(var(--nwp-shop-radius) * .7); flex: none; }
:where(.nwp-shop-mini-text) { flex: 1; min-width: 0; }
/* The name has the full width; long compounds break at syllables («Schreibtisch-leuchte»), never mid-letter (C-V06). */
:where(.nwp-shop-mini-name) { margin: 0; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; hyphens: auto; }
:where(.nwp-shop-mini-row) { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-top: .2rem; }
:where(.nwp-shop-mini-meta) { margin: 0; min-width: 0; color: var(--nwp-shop-muted); font-size: .875rem; }
:where(.nwp-shop-mini-price) { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
:where(.nwp-shop-mini-total[hidden]) { display: none; }
:where(.nwp-shop-mini-sums) { display: grid; gap: .3rem; margin: 0; }
:where(.nwp-shop-mini-sums > div) { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
:where(.nwp-shop-mini-sums dt) { color: var(--nwp-shop-muted); font-size: .9375rem; }
:where(.nwp-shop-mini-sums dd) { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
:where(.nwp-shop-mini-sums .nwp-shop-totals-row--discount dd) { color: var(--nwp-shop-ok); }
:where(.nwp-shop-mini-sum--total) { margin-top: .2rem; padding-top: .45rem; border-top: 1px dashed var(--nwp-shop-line); }
:where(.nwp-shop-mini-sum--total:first-child) { margin-top: 0; padding-top: 0; border-top: 0; }
:where(.nwp-shop-mini-sum--total dt) { color: inherit; font-weight: 600; }
:where(.nwp-shop-mini-sum--total dd) { font-weight: 700; font-size: 1.0625rem; }
:where(.nwp-shop-mini-note) { margin: .35rem 0 0; color: var(--nwp-shop-muted); font-size: .8125rem; }
:where(.nwp-shop-mini-actions) { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
:where(.nwp-shop-mini-actions .nwp-shop-button) { padding-inline: .75rem; }
:where(.nwp-shop-mini-cart) { justify-self: center; font-size: .875rem; color: var(--nwp-shop-accent); }

/* ---- notices ---- */
:where(.nwp-shop-alert, .nwp-shop-notice, .nwp-shop-issues) {
  margin: 0 0 1.25rem; padding: .8rem 1rem; border-radius: var(--nwp-shop-radius);
  border: 1px solid color-mix(in srgb, var(--nwp-shop-danger) 35%, transparent); background: color-mix(in srgb, var(--nwp-shop-danger) 7%, transparent);
}
:where(.nwp-shop-alert--info, .nwp-shop-notice, .nwp-shop-issues) { border-color: color-mix(in srgb, var(--nwp-shop-accent) 30%, transparent); background: var(--nwp-shop-soft); }
:where(.nwp-shop-issues) { list-style: none; }
:where(.nwp-shop-alert:focus) { outline: 2px solid var(--nwp-shop-accent); outline-offset: 2px; }
:where(.nwp-shop-alert p) { margin: 0; }
:where(.nwp-shop-alert-list) { margin: .4rem 0 0; padding-left: 1.1rem; }
:where(.nwp-shop-alert-list li + li) { margin-top: .2rem; }
:where(.nwp-shop-notice--test) { font-weight: 600; }
:where(.nwp-shop-issues li + li) { margin-top: .3rem; }
/* No payment method (E2): the notice instead of «In den Warenkorb», the cart and the checkout form. */
:where(.nwp-shop-closed .nwp-shop-notice p) { margin: 0; }
:where(.nwp-shop-closed .nwp-shop-notice p + p) { margin-top: .25rem; }
:where(.nwp-shop-closed-title) { font-weight: 600; }
:where(.nwp-shop-closed-team) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; }
:where(.nwp-shop-closed-team .nwp-shop-note) { flex: 1 1 16rem; margin: 0; }

/* ---- cart ---- */
:where(.nwp-shop-lines) { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--nwp-shop-line); }
:where(.nwp-shop-line) {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto auto; grid-template-areas: "media info qty remove" "media info total total";
  gap: .5rem 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--nwp-shop-line);
}
@media (min-width: 40rem) {
  :where(.nwp-shop-line) { grid-template-columns: 5rem minmax(0, 1fr) 6rem 7rem 2.5rem; grid-template-areas: "media info qty total remove"; }
}
:where(.nwp-shop-line-media) { grid-area: media; }
:where(.nwp-shop-line-media:empty) { aspect-ratio: 1; border-radius: calc(var(--nwp-shop-radius) * .8); background: var(--nwp-shop-soft); }
:where(.nwp-shop-line-media img) { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--nwp-shop-radius) * .8); }
:where(.nwp-shop-line-info) { grid-area: info; display: flex; flex-direction: column; gap: .15rem; }
:where(.nwp-shop-line-title) { font-weight: 600; text-decoration: none; }
:where(.nwp-shop-line-variant, .nwp-shop-line-unit) { color: var(--nwp-shop-muted); font-size: .9375rem; }
:where(.nwp-shop-line-qty) { grid-area: qty; }
:where(.nwp-shop-qty-input) {
  width: 4.5rem; font: inherit; padding: .45rem .5rem; border: 1px solid var(--nwp-shop-line); border-radius: calc(var(--nwp-shop-radius) * .8);
  background: var(--nwp-shop-surface); color: inherit;
}
:where(.nwp-shop-line-total) { grid-area: total; text-align: right; font-weight: 600; white-space: nowrap; }
:where(.nwp-shop-line-remove) {
  grid-area: remove; justify-self: end; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 999px; background: transparent;
  color: var(--nwp-shop-muted); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
:where(.nwp-shop-line-remove):hover { background: var(--nwp-shop-soft); color: var(--nwp-shop-danger); }

/* ---- totals ---- */
:where(.nwp-shop-totals) { margin: 0 0 1rem; }
:where(.nwp-shop-totals-row) { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
:where(.nwp-shop-totals-row dt) { color: var(--nwp-shop-muted); }
:where(.nwp-shop-totals-row dd) { margin: 0; white-space: nowrap; }
:where(.nwp-shop-totals-row--total) { margin-top: .4rem; padding-top: .7rem; border-top: 1px solid var(--nwp-shop-line); font-size: 1.125rem; font-weight: 700; }
:where(.nwp-shop-totals-row--total dt) { color: inherit; }
:where(.nwp-shop-totals-row--discount dd) { color: var(--nwp-shop-ok); }

/* ---- discount code ---- */
:where(.nwp-shop-code) { margin: 0 0 1rem; }
:where(.nwp-shop-code-label) { display: block; font-weight: 600; font-size: var(--nwp-shop-label-size, .9375rem); margin-bottom: .3rem; }
:where(.nwp-shop-code-row) { display: flex; gap: .5rem; }
/* Setting discount_field "auto": the field sits collapsed behind "Rabattcode eingeben". */
:where(.nwp-shop-code-toggle) { width: fit-content; color: var(--nwp-shop-accent); text-decoration: underline; cursor: pointer; }
:where(.nwp-shop-code-toggle):focus-visible { outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); outline-offset: 2px; }
:where(.nwp-shop-code-details[open] > .nwp-shop-code-toggle) { margin-bottom: .5rem; }
:where(.nwp-shop-code-input) {
  font: inherit; padding: .6rem .75rem; border: 1px solid var(--nwp-shop-line); border-radius: calc(var(--nwp-shop-radius) * .8);
  background: var(--nwp-shop-surface); color: inherit; min-width: 0; flex: 1 1 10rem; text-transform: uppercase;
}
:where(.nwp-shop-code-input):focus { outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); outline-offset: 1px; }
:where(.nwp-shop-code-applied) { margin: 0; color: var(--nwp-shop-ok); }
:where(.nwp-shop-link) { font: inherit; padding: 0; border: 0; background: none; color: var(--nwp-shop-accent); text-decoration: underline; cursor: pointer; }
:where(.nwp-shop-link):focus-visible { outline: 3px solid color-mix(in srgb, var(--nwp-shop-accent) 45%, transparent); outline-offset: 2px; }
:where(.nwp-shop-tax) { margin: .2rem 0 0; text-align: right; color: var(--nwp-shop-muted); font-size: .875rem; }
:where(.nwp-shop-actions) { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---- checkout ---- */
:where(.nwp-shop-checkout) { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
/* Phones: what is being ordered comes first, the form below. */
:where(.nwp-shop-summary) { order: -1; }
/* The summary keeps a readable width (C-V07: «Versand Schweiz» wrapped at about 130 px): at least 18rem, at most 40 %. */
@media (min-width: 56rem) {
  :where(.nwp-shop-checkout) { grid-template-columns: minmax(0, 1.4fr) minmax(min(18rem, 40%), 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
  :where(.nwp-shop-summary) { order: 0; position: sticky; top: 1.5rem; }
}
:where(.nwp-shop-checkout-empty) { grid-column: 1 / -1; }
/* The total once more right above the order button – phones only, the summary is beside the form on wide screens. */
:where(.nwp-shop-pay-total) { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 .75rem; padding: .75rem 0 0; border-top: 1px solid var(--nwp-shop-line); font-size: 1.125rem; }
:where(.nwp-shop-pay-total[hidden]) { display: none; }
@media (min-width: 56rem) { :where(.nwp-shop-pay-total) { display: none; } }
:where(.nwp-shop-fieldset) { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; column-gap: .75rem; }
:where(.nwp-shop-fieldset[hidden]) { display: none; }
:where(.nwp-shop-fieldset > *) { flex: 1 1 100%; }
:where(.nwp-shop-fieldset > .nwp-shop-field--small) { flex: 0 1 8rem; }
:where(.nwp-shop-fieldset > .nwp-shop-field--large) { flex: 1 1 12rem; }
:where(.nwp-shop-fieldset legend) { font-size: 1.125rem; font-weight: 700; margin-bottom: .75rem; padding: 0; }
:where(.nwp-shop-option) {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .15rem .65rem; align-items: center; padding: .75rem .9rem;
  border: 1px solid var(--nwp-shop-line); border-radius: var(--nwp-shop-radius); margin-bottom: .5rem; cursor: pointer;
}
:where(.nwp-shop-option:has(input:checked)) { border-color: var(--nwp-shop-accent); background: var(--nwp-shop-soft); }
:where(.nwp-shop-option input) { accent-color: var(--nwp-shop-accent); margin: 0; }
:where(.nwp-shop-option-title) { font-weight: 600; }
:where(.nwp-shop-option-price) { white-space: nowrap; }
:where(.nwp-shop-option-note) { grid-column: 2 / -1; color: var(--nwp-shop-muted); font-size: .875rem; }
:where(.nwp-shop-summary) { padding: 1.25rem; border: 1px solid var(--nwp-shop-line); border-radius: var(--nwp-shop-radius); background: var(--nwp-shop-surface); }
:where(.nwp-shop-summary-lines) { list-style: none; margin: 0 0 1rem; padding: 0; }
:where(.nwp-shop-summary-line) { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--nwp-shop-line); }
:where(.nwp-shop-summary-title) { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
:where(.nwp-shop-summary-price) { white-space: nowrap; }
:where(.nwp-shop-back) { margin: .75rem 0 0; font-size: .9375rem; }
:where(.nwp-shop-checkout-form .nwp-shop-note) { margin: 0 0 1rem; }

/* ---- thank-you page ---- */
:where(.nwp-shop-order) { max-width: 40rem; }
:where(.nwp-shop-order-title) { margin-top: 0; }
:where(.nwp-shop-order-state) { font-size: 1.0625rem; padding: .8rem 1rem; border-radius: var(--nwp-shop-radius); background: var(--nwp-shop-soft); }
:where(.nwp-shop-order-state p) { margin: 0; }
:where(.nwp-shop-order-state--done) {
  position: relative; padding: 1rem 1.1rem 1rem 3.4rem;
  background: color-mix(in srgb, var(--nwp-shop-ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--nwp-shop-ok) 28%, transparent);
}
/* The check of the mini cart, once more: the order went through. */
:where(.nwp-shop-order-state--done)::before {
  content: ''; position: absolute; left: 1rem; top: 1.05rem; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--nwp-shop-ok);
  animation: nwp-shop-pop .45s .1s both cubic-bezier(.3, 1.6, .5, 1);
}
:where(.nwp-shop-order-state--done)::after {
  content: ''; position: absolute; left: 1.56rem; top: 1.33rem; width: .38rem; height: .72rem;
  border: solid #fff; border-width: 0 .15rem .15rem 0; transform: rotate(45deg);
}
:where(.nwp-shop-order-state-text) { font-weight: 600; }
:where(.nwp-shop-order-sent) { margin-top: .2rem; font-size: .9375rem; }
:where(p.nwp-shop-order-state .nwp-shop-order-sent) { display: block; }
:where(.nwp-shop-next) { margin: 1.25rem 0; padding: 1rem 1.1rem; border: 1px solid var(--nwp-shop-line); border-radius: var(--nwp-shop-radius); }
:where(.nwp-shop-next-title) { margin: 0 0 .5rem; font-size: 1rem; }
:where(.nwp-shop-next-list) { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
:where(.nwp-shop-next-list li) { position: relative; margin: 0; padding-left: 1.4rem; }
:where(.nwp-shop-next-list li)::before {
  content: ''; position: absolute; left: .1rem; top: .5em; width: .55rem; height: .55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--nwp-shop-accent) 70%, transparent);
}
:where(.nwp-shop-order-actions) { margin: 1.5rem 0 0; }

/* ---- plugin pages inside the theme layout (product fallback, order page without thank-you page; E05) ---- */
:where(.nwp-shop-page) { box-sizing: border-box; width: min(72rem, 100%); margin: clamp(1.5rem, 4vw, 3rem) auto; padding-inline: 1rem; }
:where(.nwp-shop-order-page) { max-width: 44rem; }
:where(.nwp-shop-order-table) { width: 100%; border-collapse: collapse; margin: 1rem 0; }
:where(.nwp-shop-order-table td) { padding: .5rem 0; border-bottom: 1px solid var(--nwp-shop-line); vertical-align: top; }
:where(.nwp-shop-order-table td.num) { text-align: right; white-space: nowrap; padding-left: .75rem; }
:where(.nwp-shop-order-table tr.total td) { font-weight: 700; border-bottom: 0; }

/* ---- stand-in while the page is edited (E19) ---- */
:where(.nwp-shop-placeholder) { padding: 1.25rem 1.5rem; border: 1px dashed var(--nwp-shop-line); border-radius: var(--nwp-shop-radius); background: var(--nwp-shop-soft); }
:where(.nwp-shop-placeholder p) { margin: 0; }
:where(.nwp-shop-placeholder p + p) { margin-top: .25rem; }
:where(.nwp-shop-placeholder-title) { font-weight: 600; }
:where(.nwp-shop-placeholder-visitor) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .9rem; }
:where(.nwp-shop-placeholder-visitor .nwp-shop-note) { flex: 1 1 16rem; margin: 0; }

:where(.nwp-shop-cart, .nwp-shop-summary, .nwp-shop-checkout-form)[aria-busy="true"] { opacity: .65; transition: opacity .2s; }

@media (prefers-reduced-motion: reduce) {
  :where(.nwp-shop-button, .nwp-shop-card-media img, .nwp-shop-cart, .nwp-shop-summary, .nwp-shop-checkout-form, .nwp-shop-mini) { transition: none; }
  :where(.nwp-shop-mini) { transform: none; }
  :where(.nwp-shop-badge--bump .nwp-shop-badge-count, .nwp-shop-mini--open .nwp-shop-mini-check) { animation: none; }
  :where(.nwp-shop-order-state--done)::before { animation: none; }
  :where(.nwp-shop-card-link:hover .nwp-shop-card-media img) { transform: none; }
}

/* ---- downloads (thank-you page) ---- */
:where(.nwp-shop-downloads-title) { margin: 1.25rem 0 .5rem; font-size: 1.125rem; }
:where(.nwp-shop-downloads) { margin: 0 0 .5rem; padding-left: 1.25rem; }
:where(.nwp-shop-downloads li) { padding: .2rem 0; }
:where(.nwp-shop-downloads a) { color: var(--nwp-shop-accent); font-weight: 600; }
} /* @layer plugins */
