/**
 * WooCommerce Blocks purchase-path skin.
 * Tokens match the existing site (IBM Plex, 55px pills, 64px / radius-40 primary actions).
 * Selectors stay inside cart, checkout and account so corporate pages are untouched.
 */

.theme-shop-purchase .wc-block-components-text-input,
.theme-shop-purchase .wc-block-components-combobox,
.theme-shop-purchase .wc-block-components-country-input,
.theme-shop-purchase .wc-block-components-state-input,
.theme-shop-purchase .wc-block-components-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-shop-purchase .wc-block-components-text-input label,
.theme-shop-purchase .wc-block-components-combobox label,
.theme-shop-purchase .wc-block-components-country-input label,
.theme-shop-purchase .wc-block-components-state-input label,
.theme-shop-purchase .wc-block-components-select label {
  order: -1;
  white-space: normal;
  overflow-wrap: anywhere;
}

.theme-shop-purchase .wc-block-components-text-input label,
.theme-shop-purchase .wc-block-components-combobox label,
.theme-shop-purchase .wc-block-components-country-input label,
.theme-shop-purchase .wc-block-components-state-input label,
.theme-shop-purchase .wc-block-components-select label,
.theme-shop-purchase .wc-block-components-checkbox__label {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  font-family: var(--theme-text-ff);
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 400;
  color: var(--theme-base-light);
}

.theme-shop-purchase .wc-block-components-text-input input,
.theme-shop-purchase .wc-block-components-combobox input,
.theme-shop-purchase .wc-block-components-combobox .wc-blocks-components-select,
.theme-shop-purchase .wc-block-components-country-input input,
.theme-shop-purchase .wc-block-components-country-input select,
.theme-shop-purchase .wc-block-components-state-input input,
.theme-shop-purchase .wc-block-components-state-input select,
.theme-shop-purchase .wc-block-components-text-input textarea,
.theme-shop-purchase .wc-block-components-select select,
.theme-shop-purchase .wc-blocks-components-select__select {
  box-sizing: border-box;
  appearance: none;
  width: 100%;
  min-height: 3.4375rem !important;
  padding: 0.75rem 1.25rem !important;
  border: 2px solid var(--theme-base-light) !important;
  border-radius: 1.875rem !important;
  background-color: var(--theme-shop-field-bg, #d2d6dd) !important;
  color: #282a2b !important;
  font-family: var(--theme-text-ff);
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  /* Long emails (measured scrollWidth 369 in a 356 box) paint through the pill. */
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-shop-purchase .wc-blocks-components-select,
.theme-shop-purchase .wc-blocks-components-select__container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.theme-shop-purchase .wc-block-components-combobox .components-form-token-field__input-container,
.theme-shop-purchase .wc-block-components-combobox .wc-block-components-combobox-control,
.theme-shop-purchase .wc-block-components-combobox .wc-block-components-combobox-control__wrapper {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* F-09: Safari Tab on checkout email/VAT/website was outline none.
   The pill shorthand is `border: 2px solid var(--theme-base-light)
   !important`, so a 3px primary border-color never paints. Tab is
   :focus. Keep the same cyan 2px ring as qty, coupon and Place Order. */
body .theme-shop-purchase .wc-block-components-text-input input:focus,
body .theme-shop-purchase .wc-block-components-text-input input:focus-visible,
body .theme-shop-purchase .wc-block-components-combobox input:focus,
body .theme-shop-purchase .wc-block-components-combobox input:focus-visible,
body .theme-shop-purchase .wc-block-components-country-input input:focus,
body .theme-shop-purchase .wc-block-components-country-input input:focus-visible,
body .theme-shop-purchase .wc-block-components-country-input select:focus,
body .theme-shop-purchase .wc-block-components-country-input select:focus-visible,
body .theme-shop-purchase .wc-block-components-state-input input:focus,
body .theme-shop-purchase .wc-block-components-state-input input:focus-visible,
body .theme-shop-purchase .wc-block-components-state-input select:focus,
body .theme-shop-purchase .wc-block-components-state-input select:focus-visible,
body .theme-shop-purchase .wc-block-components-select select:focus,
body .theme-shop-purchase .wc-block-components-select select:focus-visible,
body .theme-shop-purchase .wc-block-components-text-input textarea:focus,
body .theme-shop-purchase .wc-block-components-text-input textarea:focus-visible,
body .theme-shop-purchase .wc-block-components-textarea:focus,
body .theme-shop-purchase .wc-block-components-textarea:focus-visible,
body .theme-shop-purchase .wc-blocks-components-select__select:focus,
body .theme-shop-purchase .wc-blocks-components-select__select:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* The pill shorthand is `border: 2px solid var(--theme-base-light) !important`,
   so a plain border-color never paints. Woo's validation text is #cc1818,
   2.9:1 on the dark purchase band; Figma error-on-dark is --theme-error-bright. */
.theme-shop-purchase .wc-block-components-text-input.has-error input,
.theme-shop-purchase .wc-block-components-text-input input[aria-invalid="true"],
.theme-shop-purchase .wc-block-components-combobox.has-error input,
.theme-shop-purchase .wc-block-components-combobox input[aria-invalid="true"],
.theme-shop-purchase .wc-block-components-select.has-error select,
.theme-shop-purchase .wc-block-components-select select[aria-invalid="true"] {
  border-color: var(--theme-error-bright) !important;
}

.theme-shop-purchase .wc-block-components-validation-error,
.theme-shop-purchase .wc-block-components-validation-error p {
  color: var(--theme-error-bright);
  white-space: normal;
  overflow-wrap: anywhere;
}

.theme-shop-purchase .wc-block-components-validation-error svg {
  fill: var(--theme-error-bright);
}

/* Woo paints `.has-error label` as #cc1818. Pill + validation copy
   already use --theme-error-bright; the label sat leftover-admin on
   the dark purchase band (2.9:1 on #0b0e10). Contact email is
   outside `.wc-block-components-form`, so 0,3,1 beat Woo's lone
   `.text-input.has-error label`. Address fields (PLZ / Vorname /
   Adresse) sit in the form; Woo's
   `.wc-block-components-form .text-input.has-error label` ties
   0,3,1 and loads later. Scope through the form so those labels
   also use --theme-error-bright. */
.theme-shop-purchase .wc-block-components-form .wc-block-components-text-input.has-error label,
.theme-shop-purchase .wc-block-components-form .wc-block-components-combobox.has-error label,
.theme-shop-purchase .wc-block-components-form .wc-block-components-country-input.has-error label,
.theme-shop-purchase .wc-block-components-form .wc-block-components-state-input.has-error label,
.theme-shop-purchase .wc-block-components-form .wc-block-components-select.has-error label,
.theme-shop-purchase .wc-block-components-text-input.has-error label,
.theme-shop-purchase .wc-block-components-combobox.has-error label,
.theme-shop-purchase .wc-block-components-country-input.has-error label,
.theme-shop-purchase .wc-block-components-state-input.has-error label,
.theme-shop-purchase .wc-block-components-select.has-error label {
  color: var(--theme-error-bright);
}

/* Classic address rows (account edit-address / checkout form-row).
   Woo paints --wc-red (#a00) on invalid labels and input borders;
   2.9:1 on the dark purchase band. The select2 pill shorthand is
   `border: 2px solid var(--theme-base-light) !important`, so a
   plain border-color never paints. Same token as blocks validation. */
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid label {
  color: var(--theme-error-bright);
}

/* Woo paints .required as --wc-red (#a00) for a white admin page.
   2.9:1 on the dark purchase band, and it sits next to labels that
   already use --theme-error-bright. shop.scss asks for that token
   at (0,2,0) and loses to `.woocommerce form .form-row .required`
   (0,3,1). Lost-password / guest login / account share this mark. */
.theme-shop-purchase .woocommerce form .form-row .required,
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid .required {
  color: var(--theme-error-bright);
}

.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid input.input-text,
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid input[type="text"],
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid input[type="email"],
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid input[type="tel"],
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid select,
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid textarea {
  /* shop.css restates `border: 2px solid var(--theme-base-light)` after
     this file; a border-color longhand loses to that shorthand. */
  border: 2px solid var(--theme-error-bright) !important;
}

.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid .select2-container .select2-selection--single,
.theme-shop-purchase .woocommerce form .form-row.woocommerce-invalid .select2-container:not(.select2-container--open) .select2-selection {
  border-color: var(--theme-error-bright) !important;
}

/* Woo hides .--sticky at ≥783px. Blocks still apply that class on desktop, which
 * removes the only checkout control. Keep the in-flow action visible. */
.theme-shop-purchase .wc-block-cart__submit {
  height: auto !important;
}

@media (min-width: 783px) {
  .theme-shop-purchase .wc-block-cart .wc-block-cart__submit-container--sticky {
    display: block !important;
    position: static;
    background: transparent;
  }
}

@media (max-width: 782px) {
  .theme-shop-purchase .wc-block-cart .wc-block-cart__submit-container--sticky {
    background-color: #ffffff !important;
    border-top: 1px solid #dfe5ec !important;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08) !important;
    padding: 0.75rem 1rem !important;
  }

  .theme-shop-purchase .wc-block-cart .wc-block-cart__submit-container--sticky::before {
    display: none !important;
  }

  .theme-shop-purchase .wc-block-cart .wc-block-cart__submit-container--sticky .wc-block-cart__submit-button {
    min-height: 3.25rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
}

.theme-shop-purchase .wc-block-cart__submit-button,
.theme-shop-purchase .wc-block-components-checkout-place-order-button,
.theme-shop-purchase .wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button,
.theme-shop-purchase a.wc-block-cart__submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4rem;
  padding: 1rem 1.5rem;
  border-radius: 2.5rem;
  border: 1px solid var(--theme-base-light);
  background-color: var(--theme-base-light);
  color: var(--theme-base-dark);
  font-family: var(--theme-text-ff);
  font-size: var(--theme-button-fs, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
}

.theme-shop-purchase .wc-block-cart__submit-button:hover,
.theme-shop-purchase .wc-block-components-checkout-place-order-button:hover,
.theme-shop-purchase .wc-block-cart__submit-button:focus-visible,
.theme-shop-purchase .wc-block-components-checkout-place-order-button:focus-visible {
  background-color: transparent;
  color: var(--theme-base-light);
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
}

/* Woo packages-style / checkout.css :focus is 0,4,1 and paints a
   WP-admin blue box-shadow plus a transparent outline. Tab focus is
   :focus, so the theme cyan ring never showed. Beat that selector. */
body .theme-shop-purchase .wc-block-components-button.wc-block-cart__submit-button:not(.is-link):focus,
body .theme-shop-purchase .wc-block-components-button.wc-block-cart__submit-button:not(.is-link):focus-visible,
body .theme-shop-purchase .wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link):focus,
body .theme-shop-purchase .wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link):focus-visible {
  background-color: transparent;
  color: var(--theme-base-light);
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

.theme-shop-purchase .wc-block-components-checkout-place-order-button:disabled,
.theme-shop-purchase .wc-block-components-checkout-place-order-button[aria-disabled="true"],
.theme-shop-purchase .wc-block-cart__submit-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.theme-shop-purchase .theme-shop-quote-total-note {
  margin: 0.5rem 0 0;
  color: var(--theme-base-light);
  font-size: var(--theme-small-fs, 1rem);
  line-height: var(--theme-text-lh, 1.5);
}

/* Quote shipping is cost 0 internally so Woo stamps a secondary FREE /
   KOSTENLOS chip. Hide that chip on shop checkout only. */
.theme-shop-purchase--checkout .wc-block-checkout__shipping-option--free,
.theme-shop-purchase--checkout [class*="shipping-option--free"] {
  display: none;
}

.theme-shop-purchase .wc-block-components-product-image img,
.theme-shop-purchase .wc-block-cart-items__row img,
.theme-shop-purchase .wc-block-mini-cart-items img {
  max-width: 5rem;
  max-height: 5rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.theme-shop-purchase .wc-block-cart-items__row .wc-block-cart-item__image,
.theme-shop-purchase .wc-block-components-product-image {
  flex: 0 0 5rem;
}

/* Block cart qty inherits the global 55px / 20px-pad number input, so a "4"
 * collapses to a 5px slash inside the 45px stepper. Own the stepper.
 * Flex-wrap (not a container query): Safari CSS zoom=2 leaves the
 * viewport at 1440 so ≤781 never fires, but the wrap shrinks to ~235px
 * and a side-by-side pill leaves ~60px for the name. 12rem name floor
 * drops qty onto the next line so 122-350-014 stays intact. 1440@100%
 * wrap is ~477px and keeps qty on the right. */
.theme-shop-purchase .wc-block-cart-item__wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
}

.theme-shop-purchase .wc-block-cart-item__wrap > .wc-block-components-product-name {
  order: 1;
  flex: 1 1 12rem;
  min-width: min(12rem, 100%);
  max-width: calc(100% - 12.5rem) !important;
}

.theme-shop-purchase .wc-block-cart-item__wrap > .wc-block-cart-item__prices {
  order: 3;
  flex: 1 1 100%;
}

.theme-shop-purchase .wc-block-cart-item__wrap > .wc-block-components-product-metadata {
  order: 4;
  flex: 1 1 100%;
}

.theme-shop-purchase .wc-block-cart-item__quantity {
  order: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Woo cart.css (0,4,1) locks the remove control at 24×24. The qty
   stepper is already 44px; enlarge only the hit area and keep the
   24×24 glyph centered so the qty/trash row stays one line. */
.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  flex: 0 0 2.75rem;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Safari :focus on the trash control is 5px auto rgb(0, 103, 244).
   Tab focus is :focus, so :focus-visible alone never replaced it. */
body .theme-shop-purchase button.wc-block-cart-item__remove-link:focus,
body .theme-shop-purchase button.wc-block-cart-item__remove-link:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

.theme-shop-purchase .wc-block-components-quantity-selector {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: max-content !important;
  min-width: 0;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  overflow: visible;
  border: 2px solid var(--theme-base-light);
  border-radius: 2.5rem;
  background-color: var(--theme-shop-field-bg, #d2d6dd);
}

.theme-shop-purchase .wc-block-components-quantity-selector__input,
.theme-shop-purchase .wc-block-components-quantity-selector input[type="number"] {
  box-sizing: border-box;
  width: 2.625rem !important;
  min-width: 2.625rem !important;
  max-width: 3rem;
  height: 2.25rem !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #282a2b !important;
  -webkit-text-fill-color: #282a2b !important;
  font-family: var(--theme-text-ff);
  font-size: 1.25rem !important;
  font-weight: 600;
  line-height: 1 !important;
  text-align: center;
  appearance: textfield;
}

.theme-shop-purchase .wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.theme-shop-purchase .wc-block-components-quantity-selector__input::-webkit-inner-spin-button,
.theme-shop-purchase .wc-block-components-quantity-selector input[type="number"]::-webkit-outer-spin-button,
.theme-shop-purchase .wc-block-components-quantity-selector input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.theme-shop-purchase .wc-block-components-quantity-selector__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #282a2b !important;
  font-size: 1.375rem !important;
  font-weight: 500;
  line-height: 1;
}

/* WMH-301: Woo's cart.css gives the outer corners `inherit` (the shell's 40px) through
   `> .__button--plus` / `--minus`, which out-ranks the 999px above. On a 32px button 999 + 40
   overflows, every radius is scaled down by 32 / 1039, and the outer two corners came out
   ~1px — the cyan focus ring around + had square upper-right and lower-right corners. */
.theme-shop-purchase .wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button {
  border-radius: 50%;
}

/* F-08: Safari Tab on the qty field was 1px dark inset, not the cyan
   2px ring used on remove and coupon. Tab is :focus, so both. */
body .theme-shop-purchase .wc-block-components-quantity-selector__input:focus,
body .theme-shop-purchase .wc-block-components-quantity-selector__input:focus-visible,
body .theme-shop-purchase .wc-block-components-quantity-selector input[type="number"]:focus,
body .theme-shop-purchase .wc-block-components-quantity-selector input[type="number"]:focus-visible,
body .theme-shop-purchase .wc-block-components-quantity-selector__button:focus,
body .theme-shop-purchase .wc-block-components-quantity-selector__button:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

.theme-shop-purchase .wp-block-woocommerce-product-collection img,
.theme-shop-purchase .wc-block-grid__product-image img,
.theme-shop-purchase .wc-block-cart__empty-cart img {
  max-height: 10rem;
  width: auto;
  object-fit: contain;
}

@media (max-width: 781px) {
  /* Name keeps the full text column so 122-350-014 stays intact.
     Qty sits on the right of a second row, beside the line total. */
  .theme-shop-purchase .wc-block-cart-items__row {
    display: grid !important;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
  }

  .theme-shop-purchase .wc-block-cart-item__image {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
  }

  .theme-shop-purchase .wc-block-cart-item__product,
  .theme-shop-purchase .wc-block-cart-item__wrap {
    display: contents !important;
  }

  .theme-shop-purchase .wc-block-cart-item__wrap > .wc-block-components-product-name,
  .theme-shop-purchase .wc-block-cart-items__row .wc-block-components-product-name {
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
    /* Desktop wrap>name uses max-width: calc(100% - 12.5rem) !important
       so qty can sit beside the title. At ≤781 wrap is display:contents
       and that leftover cap squeezed the name to 72px at 390. */
    max-width: none !important;
    width: auto;
  }

  .theme-shop-purchase .wc-block-cart-items__row .wc-block-cart-item__prices {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .theme-shop-purchase .wc-block-cart-items__row .wc-block-components-product-metadata {
    grid-column: 2 / 4;
    grid-row: 3;
    min-width: 0;
  }

  .theme-shop-purchase .wc-block-cart-item__total {
    grid-column: 2 !important;
    grid-row: 4 !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    align-self: center;
    justify-self: start;
    padding-top: 0.5rem;
  }

  .theme-shop-purchase .wc-block-cart-item__quantity {
    grid-column: 3 !important;
    grid-row: 4 !important;
    align-self: center;
    justify-self: end;
    padding-top: 0.5rem;
  }

  /* F-06: inner ± were 32px inside the 44px shell. On the stacked cart
     they must meet the same 44px hit area as the remove control. */
  .theme-shop-purchase .wc-block-components-quantity-selector {
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0 0.125rem;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-components-quantity-selector__button {
    box-sizing: border-box;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    flex: 0 0 2.75rem;
  }

  .theme-shop-purchase .wc-block-components-text-input label,
  .theme-shop-purchase .wc-block-components-combobox label,
  .theme-shop-purchase .wc-block-components-country-input label {
    font-size: 1rem;
  }

  .theme-shop-purchase .wc-block-cart__submit-button,
  .theme-shop-purchase .wc-block-components-checkout-place-order-button {
    font-size: 1.125rem;
  }

  .theme-shop-purchase {
    padding-block: 1.5rem;
  }

  .theme-shop-purchase__inner,
  .theme-shop-purchase .woocommerce {
    gap: 1.25rem;
  }
}

.theme-shop-purchase .wc-block-cart-item__product,
.theme-shop-purchase .wc-block-cart-item__wrap,
.theme-shop-purchase .wc-block-components-product-name,
.theme-shop-purchase .wc-block-components-product-metadata,
.theme-shop-purchase .wc-block-components-product-details,
.theme-shop-purchase .wc-block-cart-item__prices,
.theme-shop-purchase .wc-block-cart-item__quantity {
  text-align: left;
  max-width: none;
  margin-inline: 0;
}

.theme-shop-purchase a.wc-block-components-product-name,
.theme-shop-purchase .wc-block-components-product-name {
  text-decoration: none;
  /* Safari CSS zoom=2 keeps the 1440 viewport, so the checkout sidebar
     description is ~184px. break-word hyphen-splits schrägverzahnt and
     122-350-014. Wrap at spaces only; the SKU span stays nowrap. */
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.theme-shop-purchase .theme-shop-sku {
  white-space: nowrap;
  hyphens: none;
}

/* Thank-you / view-order table puts the Bestell-Nr in the same <a>
   as the name. overflow-wrap: break-word hyphen-splits 112-350-015
   in the 173px product column at Safari 336. Wrap at spaces; the
   SKU span stays nowrap. */
.theme-shop-purchase td.woocommerce-table__product-name,
.theme-shop-purchase td.product-name,
.theme-shop-purchase td.woocommerce-table__product-name a,
.theme-shop-purchase td.product-name a {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

/* Safari :focus on thank-you / view-order product names is 5px auto
   rgb(0, 103, 244). Tab focus is :focus. Cart names already use cyan;
   these classic table links were left on the leftover admin ring. */
body .theme-shop-purchase td.woocommerce-table__product-name a:focus,
body .theme-shop-purchase td.product-name a:focus,
body .theme-shop-purchase td.woocommerce-table__product-name a:focus-visible,
body .theme-shop-purchase td.product-name a:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Checkout summary uses <h3 class="wc-block-components-product-name">, so the
   purchase-band heading rule was shouting SKUs and wrapping 122-350-014. */
.theme-shop-purchase h2.wc-block-components-product-name,
.theme-shop-purchase h3.wc-block-components-product-name {
  text-transform: none;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  margin: 0;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.theme-shop-purchase .wc-block-components-order-summary-item .wc-block-components-product-name {
  width: 100%;
  max-width: 100% !important;
}

/* Safari CSS zoom=2 leaves the viewport at 1440, so Woo keeps is-medium
   and a ~92px description. Flex-wrap (not a breakpoint) stacks the
   sidebar once main+sidebar cannot share ~44rem, so 122-350-014 stays
   on one line. 1440@100% still fits two columns. */
.theme-shop-purchase .wc-block-components-sidebar-layout.wc-block-checkout {
  flex-wrap: wrap;
}

.theme-shop-purchase .wc-block-checkout .wc-block-checkout__main {
  flex: 1 1 32rem;
  min-width: min(32rem, 100%);
}

.theme-shop-purchase .wc-block-checkout .wc-block-checkout__sidebar {
  flex: 1 1 16rem;
  min-width: min(16rem, 100%);
}

.theme-shop-purchase a.wc-block-components-product-name:hover,
.theme-shop-purchase a.wc-block-components-product-name:focus,
.theme-shop-purchase a.wc-block-components-product-name:focus-visible {
  text-decoration: underline;
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
}

.theme-shop-purchase .wc-block-components-product-details {
  display: block;
  width: 100%;
}

/* WMH-305: a cart line reads name → price → specs → the customer's discounts.
   It used to clamp the WHOLE metadata box (description AND discounts) to two
   lines at 14/12px with a 3.25em max-height, so "Ihr Rabatt −5 % /
   Mengenrabatt −7 %" was cut in half. Now only the description is clamped,
   and the discounts are pills that are never cut.
   Woo's cart.css sizes name and prices with `table.wc-block-cart-items
   .wc-block-cart-items__row …` (0,3,1) at 14px, so these carry the table too. */
.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
  font-size: 1rem;
  line-height: 1.5;
}

.theme-shop-purchase .wc-block-components-product-metadata {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: visible;
  max-height: none;
  margin-top: 0.25rem;
}

/* The short description: two whole lines. Its <br>s are the spec sheet's line
   breaks; flowing them lets two lines carry the specs instead of repeating
   the name ("Flanschritzel / geradverzahnt"). */
.theme-shop-purchase .wc-block-components-product-metadata__description,
.theme-shop-purchase .wc-block-cart-item__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: none;
  color: var(--theme-grey-color, #9aa3b2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.theme-shop-purchase .wc-block-components-product-metadata__description p {
  display: inline;
  margin: 0;
}

.theme-shop-purchase .wc-block-components-product-metadata__description br {
  display: none;
}

/* Item data (Ihr Rabatt, Mengenrabatt): one pill each, wrapping. */
.theme-shop-purchase .wc-block-components-product-metadata .wc-block-components-product-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.5rem;
  overflow: visible;
  max-height: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.theme-shop-purchase .wc-block-components-product-details > span,
.theme-shop-purchase .wc-block-components-product-details > li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  margin: 0;
  padding: 0.25rem 0.625rem;
  border: 1px solid color-mix(in oklab, var(--theme-secondary-color, #4cc7cf) 35%, transparent);
  border-radius: 999px;
  background-color: color-mix(in oklab, var(--theme-secondary-color, #4cc7cf) 10%, transparent);
  color: var(--theme-secondary-color, #4cc7cf);
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
}

/* Woo's " / " between details: the pills separate them now. */
.theme-shop-purchase .wc-block-components-product-details > span > span[aria-hidden="true"] {
  display: none;
}

.theme-shop-purchase .wc-block-components-product-details__name,
.theme-shop-purchase .wc-block-components-product-details__value,
.theme-shop-purchase .wc-block-components-product-details dt,
.theme-shop-purchase .wc-block-components-product-details dd {
  display: inline;
  margin: 0;
  text-align: left;
}

.theme-shop-purchase .wc-block-components-product-details__name {
  font-weight: 500;
}

/* Checkout sidebar is ~175px: no spec lines there, but the discounts stay
   (they explain the price beside them). */
.theme-shop-purchase .wc-block-components-order-summary-item .wc-block-components-product-metadata__description {
  display: none;
}

.theme-shop-purchase .wc-block-components-order-summary-item__image {
  align-self: flex-start;
}

/* Sidebar is ~329px. Image + name + line-total in one row wraps
   122-350-014 after the hyphen. Stack the total under the title. */
.theme-shop-purchase .wc-block-components-order-summary-item {
  display: grid !important;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: start;
  column-gap: 0.75rem;
  row-gap: 0.375rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--theme-dark-grey-color, #eef1f4);
}

.theme-shop-purchase .wc-block-components-order-summary-item:first-child {
  padding-top: 0.25rem;
}

.theme-shop-purchase .wc-block-components-order-summary-item:last-child {
  padding-bottom: 0.25rem;
  border-bottom: 0;
}

.theme-shop-purchase .wc-block-components-order-summary-item > .screen-reader-text {
  position: absolute;
}

.theme-shop-purchase .wc-block-components-order-summary-item__image {
  grid-column: 1;
  grid-row: 1 / span 2;
  overflow: visible;
}

.theme-shop-purchase .wc-block-components-order-summary-item__description {
  grid-column: 2;
  width: auto !important;
  min-width: 0;
}

.theme-shop-purchase .wc-block-components-order-summary-item__total-price {
  grid-column: 2;
  height: auto !important;
  width: auto !important;
  margin-left: 0 !important;
  justify-self: end !important;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.theme-shop-purchase .woocommerce-MyAccount-navigation ul,
.theme-shop-purchase .woocommerce-MyAccount-navigation ul > li {
  list-style: none;
  margin: 0;
  padding: 0;
  position: static;
}

.theme-shop-purchase .woocommerce-MyAccount-navigation ul > li::before,
.theme-shop-purchase .woocommerce-MyAccount-navigation ul > li::after {
  content: none !important;
  display: none !important;
}

.theme-shop-purchase .woocommerce-MyAccount-navigation ul > li a {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.theme-shop-purchase .wc-block-components-order-summary-item__quantity,
.theme-shop-purchase .wc-block-components-product-badge,
.theme-shop-purchase .wc-block-components-order-summary-item .wc-block-components-product-badge {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
  height: 1.5rem !important;
  padding: 0 0.35rem !important;
  overflow: visible;
  border-radius: 999px;
  background-color: #f4f6f8 !important;
  color: #0b0e10 !important;
  border: 1px solid #0b0e10;
  font-family: var(--theme-text-ff);
  font-size: 0.875rem !important;
  font-weight: 600;
  line-height: 1 !important;
  z-index: 2;
}

/* WMH-301: the badge is a flex box, so the space after "Ersparnis:" is trailing white space of
   an anonymous flex item and collapses — it read "Spare563,86 €". The gap puts it back. */
.theme-shop-purchase .wc-block-components-sale-badge {
  gap: 0.3em;
}

.theme-shop-purchase .wc-block-components-order-summary-item__quantity > [aria-hidden="true"],
.theme-shop-purchase .wc-block-components-product-badge > [aria-hidden="true"] {
  color: #0b0e10 !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
}

.theme-shop-purchase .wc-block-components-order-summary-item__quantity .screen-reader-text,
.theme-shop-purchase .wc-block-components-product-badge .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.theme-shop-purchase .wc-block-components-checkbox {
  display: flex;
  align-items: flex-start;
}

.theme-shop-purchase .wc-block-components-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.theme-shop-purchase .wc-block-components-checkbox .wc-block-components-checkbox__input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  border: 2px solid var(--theme-shop-check-border, #f4f6f8) !important;
  border-radius: 0.25rem;
  background-color: #f4f6f8 !important;
}

.theme-shop-purchase .wc-block-components-checkbox .wc-block-components-checkbox__mark {
  fill: #0b0e10 !important;
  color: #0b0e10 !important;
}

.theme-shop-purchase .wc-block-components-checkbox .wc-block-components-checkbox__label {
  margin: 0;
  padding: 0;
}

/* Implicit-consent terms are a label + AGB/privacy links, no checkbox.
   Safari :focus on those links is 5px auto rgb(0, 103, 244). Tab focus
   is :focus, so :focus-visible alone never replaced it. */
.theme-shop-purchase .wc-block-checkout__terms a,
.theme-shop-purchase .wp-block-woocommerce-checkout-terms-block a {
  color: var(--theme-base-light);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.theme-shop-purchase .wc-block-checkout__terms a:hover,
.theme-shop-purchase .wp-block-woocommerce-checkout-terms-block a:hover,
.theme-shop-purchase .wc-block-checkout__terms a:focus,
.theme-shop-purchase .wp-block-woocommerce-checkout-terms-block a:focus,
.theme-shop-purchase .wc-block-checkout__terms a:focus-visible,
.theme-shop-purchase .wp-block-woocommerce-checkout-terms-block a:focus-visible {
  color: var(--theme-secondary-color);
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
}

.theme-shop-purchase .woocommerce-orders-table tbody th,
.theme-shop-purchase .woocommerce-orders-table tbody td,
.theme-shop-purchase table.shop_table_responsive tbody th,
.theme-shop-purchase table.shop_table_responsive tbody td {
  vertical-align: middle;
}

.theme-shop-purchase table.shop_table_responsive tbody th.woocommerce-orders-table__cell-order-number,
.theme-shop-purchase table.shop_table_responsive tbody th.order-number,
.theme-shop-purchase .woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
  display: table-cell;
  width: auto;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  font-size: var(--theme-menu-fs, 1.125rem);
  font-weight: 600;
  vertical-align: middle;
}

@media (max-width: 991.98px) {
  .theme-shop-purchase table.shop_table_responsive tbody th.woocommerce-orders-table__cell-order-number,
  .theme-shop-purchase table.shop_table_responsive tbody th.order-number,
  .theme-shop-purchase .woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
    display: block !important;
    width: 100%;
    padding: 0.5rem 1rem;
    white-space: normal;
  }
}

/* My Account Orders action pills (BEZAHLEN / ANZEIGEN / ABBRECHEN): compact spacing so stacked
   actions never collide, with primary brand teal emphasis on pending-payment Pay action. */
.theme-shop-purchase .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button {
  min-height: 2.375rem;
  margin: 0.25rem 0.5rem 0.25rem 0 !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.25;
  white-space: nowrap;
}

.theme-shop-purchase .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button.pay {
  border-color: var(--theme-primary-color, #0a5263);
  background-color: var(--theme-primary-color, #0a5263);
  color: #ffffff;
}

.theme-shop-purchase .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button.pay:hover,
.theme-shop-purchase .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button.pay:focus-visible {
  border-color: #077f9c;
  background-color: #077f9c;
  color: #ffffff;
}

@media (max-width: 781px) {
  .theme-shop-purchase .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button {
    width: auto !important;
    margin: 0.25rem 0 0.25rem 0.5rem !important;
  }
}

@media (max-width: 781px) {
  .theme-shop-purchase .wc-block-checkout .wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-cart-items-block,
  .theme-shop-purchase .wc-block-checkout .wc-block-components-sidebar .wc-block-components-order-summary {
    display: none;
  }
}

/* Hero already prints the page H1. shop.css still opens the purchase band with
   32–64px, so Warenkorb / Kasse sit in a large empty well. */
.theme-shop-hero:has(+ .theme-shop-purchase) {
  padding-block-end: 1.25rem;
}

.theme-shop-hero + .theme-shop-purchase {
  padding-block-start: 0 !important;
}

/* Global h2 is 51/77 — a page title. Inside the purchase band it wraps
   Rechnungsadresse mid-word and dwarfs the order table. */
.theme-shop-purchase h2,
.theme-shop-purchase h3,
.theme-shop-purchase .woocommerce-order-details__title,
.theme-shop-purchase .woocommerce-column__title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: var(--theme-h4-fs, 1.5rem);
  line-height: var(--theme-h4-lh, 1.3);
  font-weight: 500;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

/* Order view / thank-you repeat the page title as AKTUALISIERUNGEN ZUR
   BESTELLUNG and RECHNUNGSADRESSE. Checkout block section labels stay
   uppercase via the rule above. */
.theme-shop-purchase .woocommerce-MyAccount-content h2,
.theme-shop-purchase .woocommerce-order h2,
.theme-shop-purchase .woocommerce-order-details__title,
.theme-shop-purchase .woocommerce-column__title {
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 500;
  text-transform: none;
}

/* Address cards inherited the purchase h2 shout, so Rechnungsadresse became
   RECHNUNGSADRESSE and the edit link sat alone on the right. */
.theme-shop-purchase .woocommerce-Address-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  /* F-10: space-between + wrap sent a lone heading to the right when the
     German edit label could not fit (measured 1024, 299px columns). */
  justify-content: flex-start;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
}

.theme-shop-purchase .woocommerce-Address-title h2,
.theme-shop-purchase .woocommerce-Address-title h3 {
  margin: 0;
  width: auto;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 500;
  text-transform: none;
}

.theme-shop-purchase .woocommerce-Address-title a,
.theme-shop-purchase .woocommerce-Address-title .edit {
  margin: 0;
  margin-inline-start: auto;
  font-size: var(--theme-small-fs, 1rem);
}

@media (max-width: 781px) {
  .theme-shop-purchase .woocommerce-Address-title {
    justify-content: flex-start;
  }

  .theme-shop-purchase .woocommerce-Address-title a,
  .theme-shop-purchase .woocommerce-Address-title .edit {
    margin-inline-start: 0;
  }
}

/* Woo wraps half the dashboard sentence as one link, so the underline
   reads as a 732px rule through the paragraph. */
.theme-shop-purchase .woocommerce-MyAccount-content > p a {
  color: var(--theme-secondary-color);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.theme-shop-purchase .woocommerce-MyAccount-content > p a:hover,
.theme-shop-purchase .woocommerce-MyAccount-content > p a:focus-visible {
  text-decoration: underline;
}

/* Safari :focus on dashboard sentence links is 5px auto
   rgb(0, 103, 244). Tab focus is :focus. The rule above only
   underlines :focus-visible and leaves the leftover-blue ring. */
body .theme-shop-purchase .woocommerce-MyAccount-content > p a:focus,
body .theme-shop-purchase .woocommerce-MyAccount-content > p a:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Login/register sit under the page H1, so ANMELDEN / REGISTRIEREN at h4
   uppercase is a second title. */
.theme-shop-purchase #customer_login > .u-column1 > h2,
.theme-shop-purchase #customer_login > .u-column2 > h2,
.theme-shop-purchase .woocommerce-ResetPassword h2,
.theme-shop-purchase .lost_reset_password h2 {
  margin-bottom: 1rem;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 500;
  text-transform: none;
}

/* selectWoo replaces the country/state <select>. shop.css already asks for a
   55px pill; the live bundle still leaves it 47px and white. */
.theme-shop-purchase .select2-container {
  width: 100% !important;
}

.theme-shop-purchase .select2-container .select2-selection--single {
  box-sizing: border-box;
  height: 3.4375rem !important;
  border: 2px solid var(--theme-base-light) !important;
  border-radius: 1.875rem !important;
  background-color: var(--theme-shop-field-bg, #d2d6dd) !important;
}

.theme-shop-purchase .select2-container .select2-selection--single:focus,
.theme-shop-purchase .select2-container--focus .select2-selection--single,
.theme-shop-purchase .select2-container--open .select2-selection--single {
  outline: none;
}

.theme-shop-purchase .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0 1.25rem !important;
  color: #282a2b !important;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: 3.1875rem !important;
}

.theme-shop-purchase .select2-container .select2-selection--single .select2-selection__arrow {
  height: 3.1875rem !important;
  right: 0.75rem;
}

/* Select2 portals the list onto body, so .theme-shop-purchase never wraps it.
   This file is purchase-surface only. Safari :focus on the active option is
   5px auto rgb(0, 103, 244); the search field keeps select2's 1px #aaa. */
.select2-dropdown {
  background-color: var(--theme-shop-field-bg, #d2d6dd) !important;
  border: 2px solid #f4f6f8 !important;
  border-radius: 1rem !important;
  color: #282a2b !important;
}

.select2-search--dropdown .select2-search__field {
  border: 2px solid var(--theme-base-light) !important;
  background-color: var(--theme-shop-field-bg, #d2d6dd) !important;
  color: #282a2b !important;
}

.select2-search--dropdown .select2-search__field:focus {
  outline: none;
  border-color: var(--theme-primary-color) !important;
}

.select2-results__option {
  color: #282a2b !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

.select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #0b0e10 !important;
  color: #f4f6f8 !important;
  outline: none;
}

/* Woo marks the only field form-row-first, so the email box is 47% of the card. */
.theme-shop-purchase .lost_reset_password {
  width: 100%;
  max-width: 40rem;
}

.theme-shop-purchase .lost_reset_password .form-row-first,
.theme-shop-purchase .woocommerce-ResetPassword .form-row-first {
  float: none !important;
  width: 100% !important;
}

/* Account details still floats Vorname/Nachname to 47%, so the pills
   become 163px empty wells on a 390 phone. */
@media (max-width: 781px) {
  .theme-shop-purchase .woocommerce-EditAccountForm .form-row-first,
  .theme-shop-purchase .woocommerce-EditAccountForm .form-row-last,
  .theme-shop-purchase form.edit-account .form-row-first,
  .theme-shop-purchase form.edit-account .form-row-last {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }
}

.theme-shop-purchase .lost_reset_password input.input-text,
.theme-shop-purchase .woocommerce-ResetPassword input.input-text {
  width: 100% !important;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Address/account emails paint through the 30px pill at 390 (measured
   scrollWidth 410 in a 356 box). Same treatment as the checkout pills. */
.theme-shop-purchase input.input-text,
.theme-shop-purchase input.woocommerce-Input--text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Woo ships radio options as inline-block, so “Versandkosten auf Anfrage”
   shrink-wraps into a stub next to the full-width payment card. */
.theme-shop-purchase .wc-block-components-radio-control__option,
.theme-shop-purchase .wc-block-components-radio-control-accordion-option {
  display: block !important;
  width: 100%;
  box-sizing: border-box;
}

/* Safari :focus on address-card edit and the coupon-panel toggle is
   5px auto rgb(0, 103, 244). Tab focus is :focus, so :focus-visible
   alone never replaced it. */
body .theme-shop-purchase .wc-block-components-address-card__edit:focus,
body .theme-shop-purchase .wc-block-components-address-card__edit:focus-visible,
body .theme-shop-purchase .wc-block-components-panel__button:focus,
body .theme-shop-purchase .wc-block-components-panel__button:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Safari :focus on the 22px show-password eye and the account save
   pill is 5px auto rgb(0, 103, 244). Tab focus is :focus. Do not grow
   the eye next to the password pill. */
body .theme-shop-purchase .show-password-input:focus,
body .theme-shop-purchase .show-password-input:focus-visible,
body .theme-shop-purchase .woocommerce-EditAccountForm button.woocommerce-Button:focus,
body .theme-shop-purchase .woocommerce-EditAccountForm button.woocommerce-Button:focus-visible,
body .theme-shop-purchase form.edit-account button.woocommerce-Button:focus,
body .theme-shop-purchase form.edit-account button.woocommerce-Button:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Safari :focus on billing/shipping Adresse speichern is 5px auto
   rgb(0, 103, 244). Tab focus is :focus. Account-details save
   already uses cyan; this classic address submit stayed on the
   leftover admin ring. The form has no edit-address class. */
body .theme-shop-purchase .woocommerce-MyAccount-content button[name="save_address"]:focus,
body .theme-shop-purchase .woocommerce-MyAccount-content button[name="save_address"]:focus-visible,
body .theme-shop-purchase .woocommerce-MyAccount-content button.button[type="submit"]:focus,
body .theme-shop-purchase .woocommerce-MyAccount-content button.button[type="submit"]:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Guest Anmelden / Registrieren sit on #customer_login, not inside
   .woocommerce-MyAccount-content, so the account-save rule above
   never reached them. Shop buttons ship outline:0; Tab focus is
   :focus. Keep the same cyan ring as lost-password and address save. */
body .theme-shop-purchase .woocommerce-form-login button[name="login"]:focus,
body .theme-shop-purchase .woocommerce-form-login button[name="login"]:focus-visible,
body .theme-shop-purchase .woocommerce-form-register button[name="register"]:focus,
body .theme-shop-purchase .woocommerce-form-register button[name="register"]:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Safari :focus on account nav pills, order ANZEIGEN, the orders-table
   order-number link, address Bearbeiten, and lost-password submit is
   5px auto rgb(0, 103, 244). Tab focus is :focus, so :focus-visible
   alone never replaced it. */
body .theme-shop-purchase .woocommerce-MyAccount-navigation a:focus,
body .theme-shop-purchase .woocommerce-MyAccount-navigation a:focus-visible,
body .theme-shop-purchase .woocommerce-MyAccount-content a.button:focus,
body .theme-shop-purchase .woocommerce-MyAccount-content a.button:focus-visible,
body .theme-shop-purchase .woocommerce-MyAccount-content a.woocommerce-button:focus,
body .theme-shop-purchase .woocommerce-MyAccount-content a.woocommerce-button:focus-visible,
body .theme-shop-purchase .woocommerce-orders-table a.button:focus,
body .theme-shop-purchase .woocommerce-orders-table a.button:focus-visible,
body .theme-shop-purchase .woocommerce-orders-table a.woocommerce-button:focus,
body .theme-shop-purchase .woocommerce-orders-table a.woocommerce-button:focus-visible,
body .theme-shop-purchase .woocommerce-orders-table__cell-order-number a:focus,
body .theme-shop-purchase .woocommerce-orders-table__cell-order-number a:focus-visible,
body .theme-shop-purchase .woocommerce-Address-title a:focus,
body .theme-shop-purchase .woocommerce-Address-title a:focus-visible,
body .theme-shop-purchase .woocommerce-Address a.edit:focus,
body .theme-shop-purchase .woocommerce-Address a.edit:focus-visible,
body .theme-shop-purchase .lost_reset_password button:focus,
body .theme-shop-purchase .lost_reset_password button:focus-visible,
body .theme-shop-purchase .woocommerce-ResetPassword button:focus,
body .theme-shop-purchase .woocommerce-ResetPassword button:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Coupon apply matches the 55px field. Center alignment sat on the
   label+input column (89px) so Anwenden was 17px above the pill. */
.theme-shop-purchase .wc-block-components-totals-coupon__form {
  align-items: flex-end;
}

.theme-shop-purchase .wc-block-components-totals-coupon__button,
.theme-shop-purchase .wc-block-components-totals-coupon .wc-block-components-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 3.4375rem !important;
  height: 3.4375rem !important;
  padding: 0 1.25rem !important;
  border: 2px solid var(--theme-base-light) !important;
  border-radius: 1.875rem !important;
  background: transparent !important;
  color: var(--theme-base-light) !important;
  font-family: var(--theme-text-ff);
  font-size: 1rem !important;
  font-weight: 500;
  line-height: 1 !important;
  text-transform: uppercase;
}

.theme-shop-purchase .wc-block-components-totals-coupon__button:disabled,
.theme-shop-purchase .wc-block-components-totals-coupon .wc-block-components-button:disabled {
  opacity: 0.45;
}

/* Woo packages-style :focus paints WP-admin blue box-shadow
   (rgb(6, 117, 196)) plus a transparent outline. Tab focus is :focus,
   so :focus-visible alone never replaced it. */
body .theme-shop-purchase .wc-block-components-button.wc-block-components-totals-coupon__button:not(.is-link):focus,
body .theme-shop-purchase .wc-block-components-button.wc-block-components-totals-coupon__button:not(.is-link):focus-visible,
body .theme-shop-purchase .wc-block-components-totals-coupon .wc-block-components-button:not(.is-link):focus,
body .theme-shop-purchase .wc-block-components-totals-coupon .wc-block-components-button:not(.is-link):focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Order-note textarea is not a .text-input, so it stayed white-on-white. */
.theme-shop-purchase .wc-block-components-textarea,
.theme-shop-purchase .wc-block-checkout__add-note textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 7.5rem;
  padding: 0.75rem 1.25rem !important;
  border: 2px solid var(--theme-base-light) !important;
  border-radius: 1.5rem !important;
  background-color: var(--theme-shop-field-bg, #d2d6dd) !important;
  color: #282a2b !important;
  font-family: var(--theme-text-ff);
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
}

.theme-shop-purchase .wc-block-components-textarea::placeholder,
.theme-shop-purchase .wc-block-checkout__add-note textarea::placeholder {
  color: #5c6166;
  opacity: 1;
}

/* Woo sizes the empty-cart glyph in ems of the page h2, so it becomes a 137px
   sad face over a shouted sentence that repeats the H1. */
.theme-shop-purchase .wc-block-cart__empty-cart__title,
.theme-shop-purchase h2.with-empty-cart-icon {
  text-transform: none;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 400;
}

.theme-shop-purchase .with-empty-cart-icon::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}

/* Empty-cart "Neu im Shop" is Woo's 4-column product-new grid. Theme list
   resets left those cards at full band width; a 4-col grid on the ul plus
   Woo's own 25% float then compounded to ~65px cells, so SKUs wrapped,
   prices split off the euro, and "IN DEN WARENKORB" stacked letter by
   letter. Cards fill the track. One column at the cart's 781 phone break. */
.theme-shop-purchase .wp-block-woocommerce-empty-cart-block > h2.wp-block-heading:not(.wc-block-cart__empty-cart__title) {
  margin-top: 1.5rem;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: var(--theme-text-lh, 1.5);
  font-weight: 500;
  text-transform: none;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__product {
  float: none !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  /* Woo's .wc-block-grid { text-align: center } centers the short price
     in the card while the thumbnail and name start at the left. */
  text-align: left;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
  /* SKU lives in the same text node as the name (122-350-014). Theme
     overflow-wrap: break-word splits those hyphens in a tight cell. */
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price,
.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price .amount {
  white-space: nowrap;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart {
  width: 100%;
  max-width: 100%;
}

.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link,
.theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .add_to_cart_button {
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 3.4375rem;
  padding: 0.75rem 1rem;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: normal;
  font-size: var(--theme-menu-fs, 1.125rem);
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

/* Safari :focus on empty-cart Neu-im-Shop card links is 5px auto
   rgb(0, 103, 244). The ATC pills ship outline:none, so Tab has
   neither leftover-blue nor a cyan ring. Scope to the empty-cart
   block only — do not restyle catalogue cards. */
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link:focus,
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link:focus-visible,
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link:focus,
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .add_to_cart_button:focus,
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link:focus-visible,
body .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .add_to_cart_button:focus-visible {
  outline: 2px solid var(--theme-secondary-color);
  outline-offset: 2px;
  box-shadow: none;
}

@media (max-width: 781px) {
  .theme-shop-purchase .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__products {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* View-order additional fields use Woo's 1fr/max-content grid. At Safari
   336, Umsatzsteuer-Identifikationsnummer + DE199999999 is 345px in a
   306 content box, so the VAT <dd> paints past the viewport (right 361).
   Match Woo's 3-class selector so this wins. Stack below 781 so the
   label wraps at the compound hyphen instead of mid-word. */
.theme-shop-purchase .woocommerce .wc-block-order-confirmation-additional-fields-wrapper .wc-block-components-additional-fields-list {
  grid-template-columns: minmax(0, 1fr) max-content;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.theme-shop-purchase .woocommerce .wc-block-order-confirmation-additional-fields-wrapper .wc-block-components-additional-fields-list dt,
.theme-shop-purchase .woocommerce .wc-block-order-confirmation-additional-fields-wrapper .wc-block-components-additional-fields-list dd {
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 781px) {
  .theme-shop-purchase .woocommerce .wc-block-order-confirmation-additional-fields-wrapper .wc-block-components-additional-fields-list {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
}

/* ==========================================================================
   CART REDESIGN — every line a card, the summary a sticky card beside it.

   The theme's own card language (dark-grey rule, --theme-radius, the teal
   wash the shop hero and the Mein Konto cards use). Desktop (≥782, Woo's own
   cart breakpoint): image tile | name → price → specs → discount pills →
   quantity | line total with "Ersparnis" as a teal pill like the discount
   pills. ≤781 keeps the stacked grid above and only gains the card.
   Comes last and carries !important where the earlier rules here do.
   ========================================================================== */

/* The column headings say nothing a card does not; kept for screen readers. */
.theme-shop-purchase table.wc-block-cart-items thead {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-shop-purchase table.wc-block-cart-items {
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.theme-shop-purchase table.wc-block-cart-items tbody {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--theme-dark-grey-color, #33373e);
  border-radius: var(--theme-radius, 1.25rem);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--theme-teal-dark, #003745) 50%, transparent) 0%, color-mix(in oklab, var(--theme-teal-dark, #003745) 0%, transparent) 10rem),
    var(--theme-base-dark, #0b0e10);
  transition: border-color var(--theme-transition, 0.2s);
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row:hover {
  border-color: color-mix(in oklab, var(--theme-secondary-color, #4cc7cf) 45%, transparent);
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row > td {
  padding: 0 !important;
  border: 0 !important;
  background: none;
  vertical-align: top;
}

/* Image: a framed tile, the photo contained, never cropped. */
.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__image a {
  display: block;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__image img {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 1;
  height: auto;
  padding: 0.375rem;
  border-radius: 0.75rem;
  background-color: color-mix(in oklab, var(--theme-base-light, #fff) 6%, transparent);
  object-fit: contain;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__prices del {
  opacity: 0.55;
  font-weight: 400;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__prices ins {
  font-weight: 600;
}

/* Line total + savings, right-aligned. */
.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__total-price-and-sale-badge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__total .wc-block-components-product-price {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

/* "Ersparnis" in the language of the discount pills, not a white sticker. */
.theme-shop-purchase .wc-block-components-product-badge.wc-block-components-sale-badge {
  height: auto !important;
  min-height: 0 !important;
  padding: 0.25rem 0.625rem !important;
  border: 1px solid color-mix(in oklab, var(--theme-secondary-color, #4cc7cf) 35%, transparent);
  border-radius: 999px;
  background-color: color-mix(in oklab, var(--theme-secondary-color, #4cc7cf) 10%, transparent) !important;
  color: var(--theme-secondary-color, #4cc7cf) !important;
  font-size: 0.8125rem !important;
  font-weight: 600;
  line-height: 1.4 !important;
  white-space: nowrap;
}

.theme-shop-purchase .wc-block-components-sale-badge .wc-block-components-formatted-money-amount,
.theme-shop-purchase .wc-block-components-sale-badge bdi {
  color: inherit !important;
}

@media (min-width: 782px) {
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row {
    display: grid !important;
    grid-template-columns: 6rem minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    align-items: start;
    padding: 1.5rem;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__image {
    width: 6rem !important;
  }

  /* The product cell and its wrap dissolve into the card's grid (the same
     trick the ≤781 layout uses), so the quantity can leave the info column:
       image | name                 | line total
             | price                | Ersparnis
             | specs + pills        | quantity  remove
     Quantity and remove sit right under the savings, right-aligned. */
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row {
    grid-template-rows: auto auto auto 1fr;
    row-gap: 0.5rem;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__product,
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__wrap {
    display: contents !important;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__image {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__wrap > .wc-block-components-product-name {
    grid-column: 2;
    grid-row: 1;
    max-width: none !important;
    min-width: 0 !important;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__wrap > .wc-block-cart-item__prices {
    grid-column: 2;
    grid-row: 2;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__wrap > .wc-block-components-product-metadata {
    grid-column: 2;
    grid-row: 3 / span 2;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__total {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: start;
    min-width: 9rem;
    text-align: right;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__wrap > .wc-block-cart-item__quantity {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: start;
    margin-top: 0.25rem;
  }

  /* Summary: the same card, kept in view while a long cart scrolls. */
  .theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar {
    position: sticky;
    top: calc(var(--header-offset, 6rem) + 1.5rem);
    align-self: flex-start;
  }
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar {
  padding: 1.5rem !important;
  border: 1px solid var(--theme-dark-grey-color, #33373e);
  border-radius: var(--theme-radius, 1.25rem);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--theme-teal-dark, #003745) 55%, transparent) 0%, color-mix(in oklab, var(--theme-teal-dark, #003745) 0%, transparent) 12rem),
    var(--theme-base-dark, #0b0e10);
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__totals-title {
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  color: var(--theme-base-light, #fff) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0;
  text-transform: uppercase;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
  padding: 1rem 0 !important;
  border-top: 1px solid var(--theme-dark-grey-color, #33373e) !important;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: baseline !important;
  column-gap: 0.75rem !important;
  row-gap: 0.25rem !important;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  grid-column: 1;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  color: color-mix(in oklab, var(--theme-base-light, #fff) 85%, transparent);
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-transform: none;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item-tax-value {
  grid-column: 2;
  justify-self: end;
  width: auto !important;
  margin: 0 !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__description {
  grid-column: 1 / -1;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__description:empty {
  display: none !important;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__sidebar .theme-shop-quote-total-note {
  margin: 0 0 1.25rem !important;
  color: var(--theme-grey-color, #9aa3b2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.theme-shop-purchase .wc-block-cart .wc-block-cart__submit {
  margin: 0 !important;
}

/* Woo stacks the summary under the items whenever the cart block is narrow
   (is-medium / is-small / is-mobile — up to ~900px). The two cards touched;
   the same gap as between the item cards separates them. */
.theme-shop-purchase .wc-block-components-sidebar-layout.wc-block-cart.is-medium .wc-block-cart__sidebar,
.theme-shop-purchase .wc-block-components-sidebar-layout.wc-block-cart.is-small .wc-block-cart__sidebar,
.theme-shop-purchase .wc-block-components-sidebar-layout.wc-block-cart.is-mobile .wc-block-cart__sidebar {
  margin-top: 1rem;
}

/* ≤781: the existing stacked grid stays; the line becomes the same card. */
@media (max-width: 781px) {
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row {
    padding: 1rem !important;
  }

  /* Line total (left) and quantity + remove (right) share row 4 on one aligned baseline. */
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
    justify-self: end !important;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__total {
    justify-self: start;
    align-self: center;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

/* ≤575: let row 4 span full card width under the thumbnail so price and stepper never collide. */
@media (max-width: 575px) {
  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
    grid-row: 1 / span 3 !important;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
    grid-column: 1 / 3 !important;
    margin-top: 0.25rem;
  }

  .theme-shop-purchase table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
    margin-top: 0.25rem;
  }
}

.theme-shop-purchase .theme-empty-cart-cta {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 2rem !important;
  text-align: center;
}

.theme-shop-purchase .theme-empty-cart-cta a.wc-block-cart__submit-button {
  width: auto !important;
  min-width: 13rem;
  min-height: 3.25rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--theme-button-color, #0e7c86);
  background-color: var(--theme-button-color, #0e7c86);
  color: #ffffff;
}

.theme-shop-purchase .theme-empty-cart-cta a.wc-block-cart__submit-button:hover,
.theme-shop-purchase .theme-empty-cart-cta a.wc-block-cart__submit-button:focus-visible {
  background-color: transparent;
  color: var(--theme-button-color, #0e7c86);
  border-color: var(--theme-button-color, #0e7c86);
}

/* ── UI/UX Polish Pass: Checkout, Order-Pay, Order-Received & View-Order ── */

/* Order-details / order-pay tfoot: keep value column roomy on tablet/desktop. */
@media (min-width: 576px) {
  .theme-shop-purchase .woocommerce table.shop_table.order_details tfoot td,
  .theme-shop-purchase .woocommerce #order_review table.shop_table tfoot td {
    min-width: 15rem;
    padding-left: 1.5rem;
  }
}

/* View-order "Erneut bestellen" CTA: clear breathing room below order table. */
.theme-shop-purchase p.order-again {
  margin: 1.5rem 0 2rem !important;
}

/* Side-by-side Rechnungsadresse & Lieferadresse cards: match heights cleanly. */
.theme-shop-purchase .woocommerce-customer-details .woocommerce-columns--addresses {
  align-items: stretch;
}

.theme-shop-purchase .woocommerce-customer-details .woocommerce-columns--addresses > .woocommerce-column {
  display: flex;
  flex-direction: column;
}

.theme-shop-purchase .woocommerce-customer-details .woocommerce-columns--addresses > .woocommerce-column address {
  flex: 1 1 auto;
  box-sizing: border-box;
}

/* Order-Pay classic payment methods: vertically center radio with label and
   separate options cleanly without the -7px radio baseline shift. */
.theme-shop-purchase #payment ul.wc_payment_methods {
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.625rem;
  row-gap: 0;
  margin: 0;
  padding: 0.75rem 0;
  line-height: 1.4;
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method + li.wc_payment_method {
  border-top: 1px solid var(--theme-dark-grey-color, #dfe5ec);
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method > input.input-radio {
  flex: 0 0 auto;
  margin: 0 !important;
  vertical-align: middle;
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method > label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  margin: 0 !important;
  cursor: pointer;
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method > label img {
  margin: 0 !important;
  max-height: 1.5rem;
  width: auto;
}

.theme-shop-purchase #payment ul.wc_payment_methods li.wc_payment_method > div.payment_box {
  flex: 1 0 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0.75rem 0 0 !important;
}

/* Order-Pay Hosted Card Fields: prevent mobile Expiry/CVV label-wrap stagger
   by stacking expiry and CVV full-width on narrow viewports. */
@media (max-width: 575px) {
  .theme-shop-purchase #payment .payment_box.payment_method_ppcp-credit-card-gateway .form-row-first,
  .theme-shop-purchase #payment .payment_box.payment_method_ppcp-credit-card-gateway .form-row-last,
  .theme-shop-purchase #payment .payment_box.payment_method_ppcp-credit-card-gateway [class*="ppcp-credit-card-gateway-card-"] {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    clear: both;
  }

  .theme-shop-purchase #payment .payment_box.payment_method_ppcp-credit-card-gateway .ppcp-credit-card-gateway-form-fields,
  .theme-shop-purchase #payment .payment_box.payment_method_ppcp-credit-card-gateway .wc-credit-card-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Checkout block PayPal description: keep both paragraphs consistently left-aligned. */
.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content,
.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content p {
  text-align: left !important;
}

/* Checkout block Trustly (and any icon-only payment method): place the logo
   neatly inline on the option row instead of rendering an empty white panel. */
.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-option {
  position: relative;
}

.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content:has(> .wc-block-components-payment-method-icons:only-child),
.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content:has(> div:empty + .wc-block-components-payment-method-icons) {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content:has(> .wc-block-components-payment-method-icons:only-child) .wc-block-components-payment-method-icons,
.theme-shop-purchase .wc-block-checkout .wc-block-components-radio-control-accordion-content:has(> div:empty + .wc-block-components-payment-method-icons) .wc-block-components-payment-method-icons {
  margin: 0 !important;
}

/* PayPal Pay Later messaging: add clean vertical breathing room against cards and tables. */
.theme-shop-purchase .ppcp-messages,
.theme-shop-purchase .ppcp-message-wrapper,
.theme-shop-purchase [id^="ppcp-messages"] {
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}
