/* ==========================================================================
   WerkstattWiesel – Verkaufshilfen: Mengenfelder, Mini-Warenkorb, Kassenleiste, Wieder bestellen
   ========================================================================== */
.ww-btn--dunkel { background: var(--anthrazit); color: #fff; border-radius: 999px; }
.ww-btn--dunkel:hover { background: #000; color: #fff; }
.ww-btn--rahmen { background: #fff; color: var(--text); border: 2px solid var(--linie); border-radius: 999px; }
.ww-btn--rahmen:hover { border-color: var(--anthrazit); color: var(--text); }

/* Karte: Menge + Knopf */
.woocommerce ul.products li.product { container-type: inline-size; }
.ww-karte-kauf { display: flex; gap: .4rem; margin-top: .75rem; }
.woocommerce ul.products li.product .ww-karte-kauf .button {
	margin-top: 0; flex: 1; min-width: 0; padding: .55rem .6rem; white-space: nowrap; border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
}
.ww-stepper { display: flex; align-items: center; flex: none; border: 1.5px solid var(--linie); border-radius: 999px; overflow: hidden; background: #fff; }
.ww-stepper button { width: 30px; min-height: 41px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); font: 600 1.15rem var(--schrift); cursor: pointer; }
.ww-stepper button:hover { background: var(--flaeche); }
.ww-stepper input { width: 2rem; padding: 0; border: 0; text-align: center; font: 600 1rem var(--schrift); color: var(--text); background: none; -moz-appearance: textfield; }
.ww-stepper input::-webkit-outer-spin-button, .ww-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
li.product .added_to_cart { display: none !important; }
@container (max-width: 16rem) {
	.ww-karte-kauf { flex-direction: column; }
	.ww-stepper { justify-content: space-between; }
	.ww-stepper input { flex: 1; }
}

/* Mini-Warenkorb von rechts */
.ww-mini-schleier { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .4); }
.ww-mini {
	position: fixed; z-index: 85; top: 0; right: 0; bottom: 0; width: min(26rem, 100vw); overflow-y: auto; background: #fff; outline: none;
	padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
	box-shadow: -10px 0 40px rgba(0, 0, 0, .2); transform: translateX(105%); transition: transform .25s;
}
.ww-mini.ist-offen { transform: none; }
html.ww-mini-offen { overflow: hidden; }
.ww-mini__kopf { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 1rem 0; border-bottom: 1px solid var(--linie); }
.ww-mini__kopf h2 { margin: 0; font-size: 1.25rem; font-style: normal; text-transform: none; }
.ww-mini__zu { width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--flaeche); color: var(--text); cursor: pointer; }
.ww-mini__zu:hover { background: var(--flaeche-2); }
.ww-mini__inhalt { display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; }
.ww-mini__leer { color: var(--text-2); }
.ww-mini__zuletzt { display: flex; gap: .9rem; align-items: center; }
.ww-mini__zuletzt img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.ww-mini__zuletzt div { display: flex; flex-direction: column; line-height: 1.35; }
.ww-mini__zuletzt span { color: var(--text-2); font-size: .9375rem; }
.ww-mini__ok { margin: 0 0 .15rem; color: var(--preis); font-weight: 700; font-size: .875rem; }
.ww-mini__frei { background: var(--flaeche); border-radius: 12px; padding: .9rem 1rem; }
.ww-mini__frei p { margin: 0 0 .6rem; font-size: .9375rem; }
.ww-mini__balken { display: block; height: 8px; background: #fff; border-radius: 4px; overflow: hidden; }
.ww-mini__balken span { display: block; height: 100%; background: var(--rot-text); border-radius: inherit; }
.ww-mini__summe { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin: 0; }
.ww-mini__summe strong { font-size: 1.375rem; color: var(--preis); }
.ww-mini__summe small { grid-column: 1 / -1; text-align: right; color: var(--text-2); font-size: .8125rem; }
.ww-mini__summe small a { color: inherit; }
.ww-mini__hinweis { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: #fff4e5; font-size: .875rem; }
.ww-mini__knoepfe { display: grid; gap: .5rem; }
.ww-mini__knoepfe .ww-btn { min-height: 50px; border-radius: 999px; }
.ww-mini__dazu-titel { margin: .5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--linie); font-size: 1rem; font-style: normal; }
.ww-mini__dazu { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.ww-mini__dazu li { display: flex; align-items: center; gap: .75rem; }
.ww-mini__dazu-bild img { width: 56px; height: 56px; object-fit: contain; }
.ww-mini__dazu li > div { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.ww-mini__dazu-name { font-size: .875rem; font-weight: 600; color: var(--text); text-decoration: none; }
.ww-mini__dazu-name:hover { color: var(--text); text-decoration: underline; }
.ww-mini__dazu-preis { font-size: .875rem; }
.ww-preis-kurz { color: var(--preis); font-weight: 600; }
.ww-mini__dazu-preis small, .ww-wieder__preis small { color: var(--text-2); font-size: .72rem; }
.ww-mini__plus { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--anthrazit); color: #fff; font: 600 1.4rem/1 var(--schrift); text-decoration: none; }
.ww-mini__plus:hover { background: var(--rot-text); color: #fff; }
.ww-mini__plus.loading { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .ww-mini { transition: none; } }

/* Kassenleiste am Handy */
.ww-kassenleiste {
	position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	background: var(--anthrazit); color: #fff; font-weight: 600;
	padding: .55rem max(16px, env(safe-area-inset-right, 0px)) calc(.55rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.ww-kassenleiste[hidden] { display: none; }
.ww-kassenleiste .amount { color: var(--preis-hell); }
.ww-kassenleiste .ww-btn { min-height: 44px; border-radius: 999px; }
@media (min-width: 64em) { .ww-kassenleiste { display: none !important; } }
@media (max-width: 63.99em) { body:has(.ww-kassenleiste:not([hidden])) { padding-bottom: 68px; } }

/* Wieder bestellen */
.ww-wieder__kopf { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.1rem; }
.ww-wieder__kopf .ww-eyebrow { margin-bottom: .3rem; }
.ww-wieder__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
@media (min-width: 56em) { .ww-wieder__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ww-wieder__liste li { display: flex; align-items: center; gap: .9rem; padding: .55rem .9rem .55rem .55rem; border: 1px solid var(--linie); border-radius: 14px; }
.ww-wieder__bild img { width: 64px; height: 64px; object-fit: contain; }
.ww-wieder__text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; font-size: .9375rem; }
.ww-wieder__text > a { font-weight: 600; color: var(--text); text-decoration: none; }
.ww-wieder__text > span { color: var(--text-2); font-size: .8125rem; }
.ww-wieder__liste .ww-btn { min-height: 42px; padding: 0 1rem; border-radius: 999px; white-space: nowrap; }
@media (max-width: 30em) { .ww-wieder__liste li { flex-wrap: wrap; } .ww-wieder__liste .ww-btn { width: 100%; } }
/* Karte hat innen keinen Rand (Bild randlos) → Kaufbereich selbst einrücken */
.woocommerce ul.products li.product .ww-karte-kauf { margin: .75rem 14px 14px; }
.woocommerce ul.products li.product .ww-karte-kauf .button { margin: 0; width: auto; }
@media (max-width: 36em) { .woocommerce ul.products li.product .ww-karte-kauf { margin: .6rem .625rem .625rem; } .ww-stepper button { width: 28px; } }

/* Kartenpreise grün (höhere Spezifität als shop.css) */
.woocommerce ul.products li.product .ww-card__preis .price { color: var(--preis); }
.woocommerce ul.products li.product .ww-card__preis .price del { color: var(--text-2); }

/* Kleine Produktbilder nie beschneiden */
.ww-wieder__bild img, .ww-mini__zuletzt img, .ww-mini__dazu-bild img { object-fit: contain; background: #fff; }
.ww-wieder__bild, .ww-mini__dazu-bild { flex: none; }
