/*
 * Engelmeier Shop – Shopseiten im Design des Themes „Engelmeier Architektur“.
 * Nutzt die Theme-Variablen (--primary, --ink, --paper, --sand, --line, --muted, --width).
 * Alle Regeln sind auf body.eng-shop-page begrenzt.
 */

/* ---------- Breite: Inhalte wie die übrigen Seiten (min(1280px, 90%)) ---------- */
body.eng-shop-page .entry-content > .wp-block-woocommerce-checkout,
body.eng-shop-page .entry-content > .wp-block-woocommerce-cart,
body.eng-shop-page .entry-content > .woocommerce,
body.eng-shop-page .entry-content > .wp-block-woocommerce-order-confirmation-status,
body.eng-shop-page .entry-content > [class*="wp-block-woocommerce-order-confirmation"],
body.eng-shop-page .entry-content > .wc-block-order-confirmation-status,
body.eng-shop-page .entry-content > .woocommerce-order {
  width: min(var(--width), 90%);
  max-width: none;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}
body.eng-shop-page .entry-content > .wp-block-woocommerce-checkout,
body.eng-shop-page .entry-content > .wp-block-woocommerce-cart {
  padding-top: 56px;
  padding-bottom: 88px;
}
body.eng-shop-page .entry-content > [class*="wp-block-woocommerce-order-confirmation"] {
  margin-top: 32px;
}
body.eng-shop-page .eng-shop__body {
  border-top: 0;
  padding-top: 56px;
}

/* ---------- Schrift und Farben ---------- */
body.eng-shop-page .wc-block-components-title,
body.eng-shop-page .wc-block-checkout__form h2,
body.eng-shop-page .wc-block-components-checkout-step__title {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
body.eng-shop-page .wc-block-components-checkout-step__description,
body.eng-shop-page .wc-block-components-product-metadata,
body.eng-shop-page .wc-block-components-totals-item__description {
  color: var(--muted);
}

/* ---------- Eingabefelder ---------- */
body.eng-shop-page .wc-block-components-text-input input,
body.eng-shop-page .wc-block-components-select-input select,
body.eng-shop-page .wc-blocks-components-select__select,
body.eng-shop-page .wc-block-components-textarea,
body.eng-shop-page .woocommerce form .input-text,
body.eng-shop-page .woocommerce form select,
body.eng-shop-page .quantity .qty {
  border: 1px solid #cfc6b4 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--ink);
  font-family: var(--font);
}
body.eng-shop-page .wc-block-components-text-input input:focus,
body.eng-shop-page .wc-blocks-components-select__select:focus,
body.eng-shop-page .woocommerce form .input-text:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
  outline: none;
}
body.eng-shop-page .wc-block-components-radio-control__option,
body.eng-shop-page .wc-block-components-radio-control-accordion-option,
body.eng-shop-page .wc-block-checkout__shipping-method-option,
body.eng-shop-page .wc-block-components-address-card {
  border-radius: 0 !important;
  border-color: var(--line) !important;
  background: #fff;
}
body.eng-shop-page .wc-block-checkout__shipping-method-option--selected,
body.eng-shop-page .wc-block-components-radio-control__option-checked,
body.eng-shop-page .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  border-color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px var(--primary) !important;
}
body.eng-shop-page .wc-block-components-radio-control__input:checked,
body.eng-shop-page .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  border-color: var(--primary) !important;
  background-color: var(--primary) !important;
}
body.eng-shop-page .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
  border-radius: 0;
}

/* ---------- Buttons im Theme-Stil (wie .wp-block-button__link) ---------- */
body.eng-shop-page .wc-block-components-button:not(.is-link),
body.eng-shop-page .wc-block-cart__submit-button,
body.eng-shop-page .wc-block-components-checkout-place-order-button,
body.eng-shop-page a.button,
body.eng-shop-page button.button,
body.eng-shop-page input.button,
body.eng-shop-page .single_add_to_cart_button,
body.eng-shop-page a.added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 23px;
  background: var(--primary) !important;
  color: #fff !important;
  border: 1.5px solid transparent;
  border-radius: 0 !important;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: none;
}
body.eng-shop-page .wc-block-components-button:not(.is-link):hover,
body.eng-shop-page a.button:hover,
body.eng-shop-page button.button:hover,
body.eng-shop-page .single_add_to_cart_button:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}
body.eng-shop-page a.added_to_cart {
  margin-left: 0;
  background: transparent !important;
  color: var(--primary) !important;
  border-color: currentColor;
}
body.eng-shop-page .wc-block-components-checkout-place-order-button {
  width: 100%;
  min-height: 56px;
  font-size: 16px;
}

/* ---------- Bestellübersicht / Summen ---------- */
body.eng-shop-page .wc-block-components-sidebar .wc-block-components-panel,
body.eng-shop-page .wc-block-checkout__sidebar .wc-block-components-totals-wrapper,
body.eng-shop-page .wp-block-woocommerce-checkout-order-summary-block,
body.eng-shop-page .wc-block-cart__totals-title {
  border-color: var(--line) !important;
}
body.eng-shop-page .wp-block-woocommerce-checkout-order-summary-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
}
body.eng-shop-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.eng-shop-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-size: 22px;
  font-weight: 600;
}

/* Hinweise */
body.eng-shop-page .wc-block-components-notice-banner,
body.eng-shop-page .woocommerce-message,
body.eng-shop-page .woocommerce-info,
body.eng-shop-page .woocommerce-error {
  border-radius: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  background: var(--soft);
  color: var(--ink);
}
body.eng-shop-page .woocommerce-error,
body.eng-shop-page .wc-block-components-notice-banner.is-error {
  border-left-color: var(--terracotta);
  background: #fbefe9;
}

/* EU-Hinweis „Gesetzliche Gewährleistung“ (Germanized): kleine Vorschau, Klick öffnet den vollständigen Hinweis */
.wp-block-woocommerce-checkout .wc-gzd-legal-guarantee-label-preview .wc-gzd-popover-trigger img {
  display: block;
  width: 110px !important;
  min-width: 0 !important;
  max-width: 110px;
  height: auto;
  border: 1px solid var(--line);
}
.wp-block-woocommerce-checkout .wc-gzd-legal-guarantee-label-preview {
  margin: 8px 0 24px;
}


/* ---------- Shop-Übersicht: Kacheln wie Beitragskarten ---------- */
body.eng-shop-page .woocommerce ul.products,
body.eng-shop-page ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 40px;
  margin: 0;
  padding: 0;
}
body.eng-shop-page ul.products::before,
body.eng-shop-page ul.products::after {
  display: none !important;
}
body.eng-shop-page ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
body.eng-shop-page ul.products li.product a img {
  aspect-ratio: 1.15;
  object-fit: cover;
  margin: 0 0 22px;
  background: var(--sand);
}
body.eng-shop-page ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  padding: 0;
  margin: 0 0 8px;
  color: var(--ink);
}
body.eng-shop-page ul.products li.product .wc-gzd-additional-info,
body.eng-shop-page ul.products li.product p.wc-gzd-additional-info {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--muted);
}
body.eng-shop-page ul.products li.product .button {
  margin-top: 14px;
}
body.eng-shop-page ul.products li.product .price {
  display: block;
  color: var(--ink) !important;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
body.eng-shop-page ul.products li.product a:hover .woocommerce-loop-product__title {
  text-decoration: underline;
  text-underline-offset: 6px;
}
body.eng-shop-page .woocommerce-result-count,
body.eng-shop-page .woocommerce-ordering {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 15px;
}
body.eng-shop-page span.onsale {
  border-radius: 0;
  background: var(--terracotta);
  min-height: 0;
  min-width: 0;
  padding: 6px 12px;
  line-height: 1.3;
  font-size: 13px;
}

/* ---------- Produktseite ---------- */
body.eng-shop-page.single-product div.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
body.eng-shop-page.single-product div.product div.images,
body.eng-shop-page.single-product div.product div.summary {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
}
body.eng-shop-page.single-product div.product > *:not(.images):not(.summary):not(.onsale) {
  grid-column: 1 / -1;
}
body.eng-shop-page.single-product div.product div.images img {
  background: var(--sand);
}
body.eng-shop-page.single-product .product_title {
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.1;
  margin: 0 0 16px;
}
body.eng-shop-page.single-product div.product .summary p.price,
body.eng-shop-page.single-product div.product .summary span.price {
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
}
body.eng-shop-page.single-product .woocommerce-product-details__short-description {
  color: #4f5852;
  margin: 16px 0 24px;
}
body.eng-shop-page.single-product form.cart {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 24px 0 28px;
}
body.eng-shop-page.single-product form.cart .quantity .qty {
  width: 80px;
  height: 52px;
  min-height: 52px;
  padding: 0 8px;
  text-align: center;
  font-size: 16px;
}
body.eng-shop-page .eml-product-notice {
  background: var(--soft);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  margin: 8px 0 28px;
  font-size: 15px;
  line-height: 1.55;
}
body.eng-shop-page .eml-product-notice p {
  margin: 0 0 6px;
}
body.eng-shop-page .eml-product-notice p:last-child {
  margin-bottom: 0;
}
body.eng-shop-page.single-product .product_meta {
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
body.eng-shop-page .woocommerce-tabs {
  border-top: 1px solid var(--line);
  padding-top: 48px;
  margin-top: 32px;
}
body.eng-shop-page .woocommerce-tabs ul.tabs {
  padding: 0 !important;
  margin: 0 0 24px !important;
}
body.eng-shop-page .woocommerce-tabs ul.tabs::before {
  border-color: var(--line) !important;
}
body.eng-shop-page .woocommerce-tabs ul.tabs li {
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 24px 0 0 !important;
  padding: 0 !important;
}
body.eng-shop-page .woocommerce-tabs ul.tabs li::before,
body.eng-shop-page .woocommerce-tabs ul.tabs li::after {
  display: none !important;
}
body.eng-shop-page .woocommerce-tabs ul.tabs li a {
  font-weight: 600;
  padding: 0 0 10px !important;
  color: var(--muted) !important;
}
body.eng-shop-page .woocommerce-tabs ul.tabs li.active a {
  color: var(--ink) !important;
  box-shadow: inset 0 -3px 0 var(--primary);
}
body.eng-shop-page .woocommerce-tabs .panel h2:first-child {
  display: none;
}
body.eng-shop-page .related.products {
  border-top: 1px solid var(--line);
  padding-top: 56px;
  margin-top: 56px;
}
body.eng-shop-page .related.products > h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 32px;
}

/* ---------- Klassischer Warenkorb/Tabellen (falls genutzt) ---------- */
body.eng-shop-page .woocommerce table.shop_table {
  border-radius: 0;
  border-color: var(--line);
  background: #fff;
}

/* ---------- Mobil ---------- */
@media (max-width: 1000px) {
  body.eng-shop-page ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }
  body.eng-shop-page.single-product div.product {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 600px) {
  body.eng-shop-page ul.products {
    grid-template-columns: 1fr;
  }
  body.eng-shop-page .entry-content > .wp-block-woocommerce-checkout,
  body.eng-shop-page .entry-content > .wp-block-woocommerce-cart {
    padding-top: 32px;
    padding-bottom: 56px;
  }
  body.eng-shop-page.single-product form.cart {
    flex-wrap: wrap;
  }
  body.eng-shop-page.single-product form.cart .single_add_to_cart_button {
    flex: 1 1 auto;
  }
}

/* ---------- Kasse: Zahlungsart und Checkbox-Texte ---------- */
/* Mehr Luft zwischen Zahlungsauswahl und Infotext darunter */
body.eng-shop-page .wc-block-components-radio-control-accordion-content {
  padding: 14px 16px 14px 48px !important;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.4;
}
body.eng-shop-page .wc-block-components-radio-control-accordion-content p {
  margin: 0;
  padding-top: 2px;
}
/* Texte neben Radio/Checkbox optisch mittig (Hausschrift sitzt sonst etwas hoch) */
body.eng-shop-page .wc-block-components-radio-control__option {
  display: flex !important;
  align-items: center;
  min-height: 56px;
}
body.eng-shop-page .wc-block-components-radio-control__option .wc-block-components-radio-control__input {
  top: 50% !important;
  transform: translateY(-50%);
  margin-top: 0 !important;
}
body.eng-shop-page .wc-block-components-radio-control__label,
body.eng-shop-page .wc-block-components-checkbox__label {
  line-height: 1.3 !important;
  padding-top: 2px;
}
body.eng-shop-page .wc-block-components-checkbox label {
  align-items: center !important;
}

/* ---------- Produktseite: Grußkarte ---------- */
body.eng-shop-page .eml-card-option {
  flex: 1 1 100%;
  margin: 0 0 4px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
}
body.eng-shop-page form.cart:has(.eml-card-option) {
  flex-wrap: wrap;
}
body.eng-shop-page .eml-card-option__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  cursor: pointer;
}
body.eng-shop-page .eml-card-option__toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}
body.eng-shop-page .eml-card-option__price {
  font-weight: 400;
  color: var(--muted);
}
body.eng-shop-page .eml-card-option__text {
  margin-top: 14px;
}
body.eng-shop-page .eml-card-option__text label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
body.eng-shop-page .eml-card-option__text textarea {
  width: 100%;
  border: 1px solid #cfc6b4;
  border-radius: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}
body.eng-shop-page .eml-card-option__text textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Liefergebühr – Erklärung in Warenkorb und Kasse (0.6.0) */
.eml-fee-info {
	margin: 12px 0 28px;
	padding: 10px 14px;
	border-left: 3px solid #1b6f6a;
	background: rgba(27, 111, 106, 0.06);
	font-size: 0.875rem;
	line-height: 1.45;
}
.wc-block-components-radio-control__description { font-size: 0.8125rem; line-height: 1.4; }

/* Bestellübersicht wandert beim Scrollen mit (Desktop, 0.6.1) */
@media (min-width: 1000px) {
	body.eng-shop-page .wc-block-checkout__sidebar,
	body.eng-shop-page .wc-block-cart__sidebar {
		position: sticky;
		/* Abstand = mitlaufender Seitenkopf (inkl. Infoleiste) + 16 px */
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--eml-sticky-offset, 160px));
		align-self: flex-start !important; /* Germanized streckt die Spalte sonst auf volle Höhe */
	}
}

/* Produktübersicht: „In den Warenkorb“ und „Warenkorb anzeigen“ bündig untereinander, gleich breit (0.6.3) */
body.eng-shop-page ul.products li.product .button,
body.eng-shop-page ul.products li.product a.added_to_cart {
  min-width: 216px;
}
body.eng-shop-page ul.products li.product a.added_to_cart {
  display: flex;
  width: fit-content;
  min-width: 216px;
  margin: 8px 0 0 !important;
}

/* Schaltfläche „Warenkorb anzeigen“ – Übersicht und Produktseite */
.eml-cart-link[hidden] { display: none !important; }
body.eng-shop-page .eml-cart-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 24px;
}
body.eng-shop-page a.eml-cart-link__btn {
  gap: 10px;
  background: transparent !important;
  color: var(--primary) !important;
  border-color: currentColor;
}
body.eng-shop-page a.eml-cart-link__btn:hover {
  background: var(--primary) !important;
  color: #fff !important;
}
.eml-cart-link__meta {
  font-weight: 400;
  opacity: 0.85;
}
.eml-cart-link__meta::before { content: "("; }
.eml-cart-link__meta::after { content: ")"; }
body.eng-shop-page.single-product .summary .eml-cart-link {
  margin: 12px 0 20px;
}
@media (max-width: 600px) {
  body.eng-shop-page .eml-cart-bar { justify-content: stretch; }
  body.eng-shop-page .eml-cart-bar a.eml-cart-link__btn,
  body.eng-shop-page.single-product .summary a.eml-cart-link__btn { width: 100%; flex-wrap: wrap; }
}

/* Kasse: Hinweis unter „Ablageort“ (0.8.1) */
.eml-ablage-hint{font-size:.875em;line-height:1.45;color:#5b5b55;margin:6px 0 18px;max-width:62ch}
.eml-ablage-hint[hidden]{display:none}
