/* Smarttec Warenkorb – Layout "Business" v1.1.0 */
.stw-cart.stw-b {
	--stw-b-accent: #2a62e8;
	--stw-b-bg: #f4f5f7;
	--stw-b-text: #2b3340;
	--stw-b-strong: #111827;
	--stw-b-muted: #6b7280;
	--stw-b-line: #d7dbe2;
	--stw-b-btnline: #cdd5e3;
	--stw-b-soft: #eef0f7;
	--stw-b-width: 1600px;
	/* Breiter als der Theme-/Bricks-Container, mittig – Schrift & Elemente bleiben gleich groß */
	width: min(var(--stw-b-width), calc(100vw - 40px));
	max-width: none;
	margin-left: calc(50% - min(var(--stw-b-width), calc(100vw - 40px)) / 2);
	margin-right: 0;
	padding: 28px 24px 40px;
	background: var(--stw-b-bg);
	/* Grauer Hintergrund über die komplette Bildschirmbreite (ohne horizontales Scrollen) */
	box-shadow: 0 0 0 100vmax var(--stw-b-bg);
	clip-path: inset(0 -100vmax);
	color: var(--stw-b-text);
	font-size: 14px;
	line-height: 1.4;
}
.stw-cart.stw-b a { color: inherit; }

.stw-cart__notice.is-success { background: #e9f7ef; color: #14532d; border-color: #bfe5cd; }

/* Raster */
.stw-b__grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; transition: opacity .18s ease; }
.stw-b.is-empty .stw-b__grid { grid-template-columns: minmax(0, 1fr); }
.stw-cart.stw-b.is-loading .stw-b__grid { opacity: .55; pointer-events: none; }
.stw-b__main, .stw-b__side { display: grid; gap: 18px; min-width: 0; align-content: start; }
.stw-b__side { gap: 16px; }

.stw-b__box { background: #fff; border: 1px solid var(--stw-b-line); border-radius: 4px; }

/* Kopf */
.stw-b__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin-bottom: 2px; }
.stw-cart .stw-b__title { font-size: 29px; font-weight: 300; line-height: 1.15; color: var(--stw-b-text); margin: 0; letter-spacing: -.005em; }
.stw-b__tools { display: flex; gap: 9px; flex: none; }

/* Rahmen-Buttons (CSV, Drucken, Notiz, Löschen) */
.stw-cart .stw-b__btn {
	width: 46px; height: 44px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; border: 2px solid var(--stw-b-btnline); border-radius: 6px; color: var(--stw-b-strong);
	transition: border-color .15s, color .15s, background .15s;
}
.stw-cart .stw-b__btn svg { width: 22px; height: 22px; stroke-width: 1.9; }
.stw-cart .stw-b__btn:hover { border-color: var(--stw-b-accent); color: var(--stw-b-accent); }
.stw-cart .stw-b__btn.has-note { border-color: var(--stw-b-accent); color: var(--stw-b-accent); }
.stw-cart .stw-b__del:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }

/* Artikel */
.stw-b__item {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 216px;
	padding: 12px 0;
}
.stw-b__media { display: flex; justify-content: center; padding: 0 12px; }
.stw-b__media a { display: block; }
.stw-cart .stw-b__img { width: 100px !important; height: 100px !important; object-fit: contain; display: block; max-width: none; }
.stw-b__info { min-width: 0; padding: 0 12px 0 2px; }
.stw-cart .stw-b__name { font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--stw-b-text); margin: 0 0 12px; }
.stw-b__name a { text-decoration: none; }
.stw-b__name a:hover { text-decoration: underline; }
.stw-cart .stw-b__meta { font-size: 12px; line-height: 1.45; color: var(--stw-b-text); }
.stw-b__meta a, .stw-b__link { color: var(--stw-b-accent) !important; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.stw-b__link { margin-left: 0; font-size: 12px; display: inline-block; }
.stw-b__meta span { margin-left: 4px; }
.stw-cart .stw-b__stock { font-size: 12px; margin-top: 12px; }
.stw-b__delivery { margin-top: 5px; padding: 6px 7px; background: #e2f5ec; color: #14532d; font-weight: 700; font-size: 13.5px; border-radius: 2px; }
.stw-b__energy-wrap { margin-top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stw-cart .stw-b__energy { height: 26px !important; width: auto !important; display: block; }
.stw-cart .stw-b__sku { font-size: 12px; margin-top: 12px; }

.stw-b__actions { display: flex; align-items: center; gap: 15px; margin-top: 10px; }
.stw-b__actions .stw-b__del { margin-left: auto; }

.stw-b__qty { display: flex; align-items: center; justify-content: space-between; width: 148px; height: 44px; border: 1.5px solid var(--stw-b-strong); border-radius: 4px; padding: 0 6px; background: #fff; }
.stw-cart .stw-b__qbtn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--stw-b-accent); border-radius: 4px; }
.stw-cart .stw-b__qbtn svg { width: 22px; height: 22px; stroke-width: 3; }
.stw-cart .stw-b__qbtn:not(:disabled):hover { background: var(--stw-b-soft); }
.stw-cart .stw-b__qbtn:disabled { color: #aab4c8; }
.stw-b__qlabel { display: flex; flex-direction: column; align-items: center; line-height: 1; margin: 0; }
.stw-b__qlabel span { font-size: 11px; color: var(--stw-b-text); margin-bottom: 2px; }
.stw-cart .stw-b__qinput {
	width: 44px; height: 18px; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none;
	text-align: center; font: inherit; font-size: 14px; font-weight: 700; color: var(--stw-b-strong);
	-moz-appearance: textfield; appearance: textfield;
}
.stw-cart .stw-b__qinput::-webkit-outer-spin-button, .stw-cart .stw-b__qinput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stw-cart .stw-b__notetext { margin-top: 10px; font-size: 12.5px; color: var(--stw-b-text); background: #f8fafc; border-left: 3px solid var(--stw-b-accent); padding: 6px 9px; word-break: break-word; }
.stw-b__note { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.stw-b__note[hidden] { display: none; }
.stw-cart .stw-b__note textarea { flex: 1; min-height: 44px; resize: vertical; border: 1.5px solid var(--stw-b-text); border-radius: 3px; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--stw-b-strong); background: #fff; box-shadow: none; margin: 0; }

.stw-b__price { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; padding: 0 14px 0 12px; text-align: right; }
.stw-b__price strong { font-size: 24px; font-weight: 400; color: var(--stw-b-text); line-height: 1.15; white-space: nowrap; }
.stw-b__price strong .woocommerce-Price-amount { font-weight: 400; }
.stw-b__price > span { font-size: 11.5px; color: var(--stw-b-text); margin-top: 1px; }

/* Klapp-Boxen */
.stw-b__fold { padding: 0; }
.stw-cart .stw-b__foldhead {
	width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 18px 16px; font-size: 18px; font-weight: 500; color: var(--stw-b-text); text-align: left; line-height: 1.25;
}
.stw-cart .stw-b__foldhead svg { width: 22px; height: 22px; color: var(--stw-b-accent); stroke-width: 2.2; transition: transform .2s ease; }
.stw-b__fold.is-closed .stw-b__foldhead svg { transform: rotate(180deg); }
.stw-b__foldbody { padding: 0 18px 18px; display: grid; gap: 12px; }
.stw-b__fold.is-closed .stw-b__foldbody { display: none; }
.stw-b__main .stw-b__foldhead { padding: 18px 15px 16px; }
.stw-b__main .stw-b__foldbody { padding: 0 15px 15px; }

/* Tabs */
.stw-b__tabs { display: inline-flex; width: max-content; max-width: 100%; padding: 3px; border: 1.5px solid var(--stw-b-line); border-radius: 999px; gap: 2px; }
.stw-cart .stw-b__tabs button { height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: var(--stw-b-strong); border: 2px solid transparent; white-space: nowrap; }
.stw-cart .stw-b__tabs button.is-active { border-color: var(--stw-b-accent); color: var(--stw-b-accent); }
.stw-b__panel[hidden] { display: none !important; }

/* Eingaben */
.stw-b__inline { display: flex; gap: 14px; align-items: stretch; }
.stw-cart .stw-b__input {
	height: 44px; width: 100%; min-width: 0; margin: 0;
	border: 1.5px solid var(--stw-b-text); border-radius: 3px; background: #fff; box-shadow: none;
	padding: 0 15px; font: inherit; font-size: 15px; color: var(--stw-b-strong);
}
.stw-cart .stw-b__input::placeholder { color: var(--stw-b-text); opacity: 1; }
.stw-cart .stw-b__input:focus { border-color: var(--stw-b-accent); outline: 0; box-shadow: 0 0 0 3px rgba(42, 98, 232, .15); }
.stw-cart .stw-b__input--sku { max-width: 270px; }
.stw-cart .stw-b__input--qty { width: 70px; flex: none; padding: 0 6px; text-align: center; }

.stw-cart .stw-b__soft {
	flex: none; height: 44px; padding: 0 15px; border-radius: 4px;
	background: var(--stw-b-soft); color: var(--stw-b-strong); font-size: 15px; font-weight: 700;
	transition: background .15s, color .15s;
}
.stw-cart .stw-b__soft:hover { background: #e1e5f2; color: var(--stw-b-accent); }

.stw-b__file { position: relative; flex: 1; max-width: 340px; height: 44px; margin: 0; display: flex; align-items: center; padding: 0 15px; border: 1.5px dashed var(--stw-b-text); border-radius: 3px; background: #fff; cursor: pointer; font-size: 15px; overflow: hidden; }
.stw-b__file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stw-b__file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.stw-b__file:focus-within { border-color: var(--stw-b-accent); }
.stw-cart .stw-b__hint { font-size: 12px; color: var(--stw-b-muted); }

.stw-b__gc { display: grid; gap: 16px; }
.stw-b__withinfo { position: relative; }
.stw-b__withinfo .stw-b__input { padding-right: 46px; }
.stw-b__info-ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--stw-b-accent); cursor: help; outline: 0; }
.stw-b__info-ico svg { width: 20px; height: 20px; }
.stw-b__tip { position: absolute; right: -8px; bottom: calc(100% + 10px); width: 240px; padding: 9px 11px; background: var(--stw-b-strong); color: #fff; font-size: 12.5px; line-height: 1.4; border-radius: 6px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s; z-index: 10; pointer-events: none; }
.stw-b__tip::after { content: ""; position: absolute; right: 14px; top: 100%; border: 6px solid transparent; border-top-color: var(--stw-b-strong); }
.stw-b__info-ico:hover .stw-b__tip, .stw-b__info-ico:focus .stw-b__tip { opacity: 1; visibility: visible; transform: none; }

.stw-b__applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f3f6fd; border-radius: 4px; font-size: 13.5px; font-weight: 600; }
.stw-b__applied em { font-style: normal; font-weight: 400; color: #15803d; margin-left: 6px; }
.stw-cart .stw-b__applied button { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--stw-b-muted); }
.stw-cart .stw-b__applied button:hover { background: #fee2e2; color: #dc2626; }
.stw-cart .stw-b__applied svg { width: 15px; height: 15px; }

/* Zusammenfassung */
.stw-b__summary { padding: 18px 22px 22px; }
.stw-b__row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.stw-b__row--lg { font-size: 18px; font-weight: 500; color: var(--stw-b-strong); padding: 2px 0; }
.stw-b__row--gap { margin-top: 18px; }
.stw-b__row--sm { font-size: 14.5px; color: var(--stw-b-strong); margin-top: 8px; }
.stw-b__row--sm + .stw-b__row--sm { margin-top: 10px; }
.stw-b__row--lg + .stw-b__row--sm { margin-top: 12px; }
.stw-b__row--muted { color: var(--stw-b-muted); }
.stw-b__row--disc span:last-child { color: #15803d; }
.stw-b__row span:last-child { text-align: right; white-space: nowrap; }
.stw-b__total { margin: 18px -8px 0; padding: 22px 8px 0; border-top: 1.5px solid var(--stw-b-text); }
.stw-b__total strong { font-size: 24px; font-weight: 700; color: var(--stw-b-strong); line-height: 1.1; }
.stw-b__total strong .woocommerce-Price-amount { font-weight: 700; }
.stw-b__total small { display: block; font-size: 13px; color: var(--stw-b-text); margin-top: 3px; }

.stw-cart .stw-b__cta {
	margin-top: 42px; height: 46px; width: 100%;
	display: flex; align-items: center; justify-content: center; gap: 10px;
	background: var(--stw-b-accent); color: #fff !important; border-radius: 4px;
	font-size: 15.5px; font-weight: 700; text-decoration: none;
	transition: filter .15s, transform .1s;
}
.stw-cart .stw-b__cta svg { width: 18px; height: 18px; stroke-width: 2.4; }
.stw-cart .stw-b__cta:hover { filter: brightness(1.08); }
.stw-cart .stw-b__cta:active { transform: scale(.99); }
.stw-cart .stw-b__cta--inline { display: inline-flex; width: auto; padding: 0 22px; margin-top: 14px; }

/* Zahlungsarten unter dem Button */
.stw-cart .stw-b__pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.stw-cart .stw-b__pay li { height: 30px; min-width: 0; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 0; box-shadow: none; }
.stw-b__pay li svg { width: 38px; height: 24px; }
.stw-cart .stw-b__pay img { display: block; height: 26px !important; width: auto !important; max-width: 70px; object-fit: contain; border: 0 !important; outline: 0; box-shadow: none !important; border-radius: 0; padding: 0; background: none; }

.stw-b__empty { padding: 34px 24px; text-align: center; font-size: 16px; font-weight: 600; }

/* Tablet */
@media (max-width: 1100px) {
	.stw-b__grid { grid-template-columns: minmax(0, 1fr) 360px; }
	.stw-b__item { grid-template-columns: 120px minmax(0, 1fr) 170px; }
	.stw-b__price strong { font-size: 21px; }
}
@media (max-width: 900px) {
	.stw-b__grid { grid-template-columns: minmax(0, 1fr); }
	.stw-cart .stw-b__cta { margin-top: 28px; }
}

/* Smartphone */
@media (max-width: 600px) {
	.stw-cart.stw-b { padding: 18px 12px 28px; }
	.stw-cart .stw-b__title { font-size: 22px; }
	.stw-cart .stw-b__btn { width: 40px; height: 40px; }
	.stw-cart .stw-b__btn svg { width: 19px; height: 19px; }
	.stw-b__item { grid-template-columns: 84px minmax(0, 1fr); padding: 12px 0 14px; }
	.stw-b__media { padding: 0 8px; }
	.stw-cart .stw-b__img { width: 68px !important; height: 68px !important; }
	.stw-b__info { padding-right: 12px; }
	.stw-cart .stw-b__name { font-size: 14.5px; margin-bottom: 8px; }
	.stw-b__price { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; padding: 12px 12px 0; margin-top: 12px; border-top: 1px solid #e5e7eb; }
	.stw-b__price strong { font-size: 20px; order: 2; }
	.stw-b__price > span { order: 1; }
	.stw-b__actions { gap: 8px; }
	.stw-b__qty { width: 132px; height: 40px; }
	.stw-cart .stw-b__foldhead { font-size: 16px; padding: 15px 14px 13px; }
	.stw-b__foldbody, .stw-b__main .stw-b__foldbody { padding: 0 14px 14px; }
	.stw-cart .stw-b__tabs button { padding: 0 11px; font-size: 13px; }
	.stw-b__inline { gap: 8px; }
	.stw-b__inline .stw-b__input { flex: 1 1 auto; }
	.stw-cart .stw-b__soft { padding: 0 12px; }
	.stw-b__inline[data-stw-form="sku"] { flex-wrap: wrap; }
	.stw-cart .stw-b__input--sku { max-width: none; flex: 1 1 140px; }
	.stw-cart .stw-b__input--qty { flex: 0 0 64px; }
	.stw-b__inline[data-stw-form="sku"] .stw-b__soft { flex: 1 1 100%; }
	.stw-b__summary { padding: 16px; }
	.stw-b__total strong { font-size: 21px; }
	.stw-b__tip { width: 200px; }
}

/* Druckansicht */
@media print {
	.stw-cart.stw-b { background: #fff !important; padding: 0; width: auto; margin: 0; box-shadow: none; clip-path: none; }
	.stw-b__grid { grid-template-columns: 1fr 300px; }
	.stw-b__tools, .stw-b__actions .stw-b__btn, .stw-b__qbtn, .stw-b__fold, .stw-b__cta, .stw-b__pay, .stw-b__note, .stw-cart__notice { display: none !important; }
	.stw-b__qty { border: 0; width: auto; }
	.stw-b__box { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
	.stw-b *, .stw-b__grid { transition: none !important; }
}
