/* Smarttec Warenkorb – v1.0.0 */
.stw-cart {
	--stw-accent: #f5134d;
	--stw-accent2: #c4224b;
	--stw-dark: #333333;
	--stw-text: var(--stw-dark);
	--stw-muted: #5c5c5c;
	--stw-soft: #f5f5f5;
	--stw-line: #ececec;
	--stw-radius: 8px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	color: var(--stw-text);
	font-family: var(--stw-font, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	font-size: 15px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
.stw-cart *, .stw-cart *::before, .stw-cart *::after { box-sizing: border-box; }
:where(.stw-cart) :where(p, ul, li, h2, h3) { margin: 0; padding: 0; }
.stw-cart ul { list-style: none; margin-left: 0; padding-left: 0; }
.stw-cart svg { display: block; flex: none; }
.stw-cart a { color: inherit; }

/* Buttons von Theme/Bricks neutralisieren */
.stw-cart button {
	appearance: none; -webkit-appearance: none;
	margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	font: inherit; color: inherit; line-height: 1; letter-spacing: normal; text-transform: none;
	min-height: 0; width: auto; cursor: pointer;
}
.stw-cart button:disabled { cursor: default; }
.stw-cart button:focus-visible, .stw-cart a:focus-visible, .stw-cart input:focus-visible {
	outline: 2px solid var(--stw-accent); outline-offset: 2px;
}

/* Titel & Layout */
.stw-cart__title { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--stw-text); margin: 0 0 22px; letter-spacing: -.01em; }
.stw-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 832fr) minmax(300px, 468fr);
	column-gap: clamp(24px, 9.7%, 140px);
	row-gap: 20px;
	align-items: start;
	transition: opacity .18s ease;
}
.stw-cart.is-loading .stw-cart__grid { opacity: .55; pointer-events: none; }
.stw-cart__items { display: grid; gap: 20px; min-width: 0; }
.stw-cart__side { display: grid; gap: 20px; min-width: 0; }

.stw-box {
	background: #fff;
	border: 1.5px solid var(--stw-line);
	border-radius: var(--stw-radius);
	box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.stw-cart__notice {
	margin: 0 0 16px; padding: 12px 16px; border-radius: 8px;
	background: #fff1f4; color: #a3002b; border: 1px solid #ffd0db; font-size: 14px;
}
.stw-cart__notice[hidden] { display: none; }

/* Artikel */
.stw-item { padding: 20px 20px 0; }
.stw-item__head { display: flex; gap: 16px; align-items: flex-start; padding-left: 6px; }
.stw-item__media { flex: none; display: block; width: 58px; height: 72px; text-decoration: none; }
.stw-item__media img, .stw-item__media svg, .stw-item__img {
	width: 100% !important; height: 100% !important; object-fit: contain; display: block; border-radius: 4px; max-width: none;
}
.stw-item__info { min-width: 0; flex: 1; }
.stw-item__name { font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--stw-text); margin: 0 0 13px; letter-spacing: -.01em; }
.stw-item__name a { text-decoration: none; color: inherit; }
.stw-item__name a:hover { text-decoration: underline; }

.stw-chips { display: flex; flex-wrap: wrap; gap: 10px 9px; }
.stw-chip {
	display: inline-flex; align-items: center; gap: 6px;
	height: 30px; padding: 0 11px;
	border: 1.5px solid var(--stw-dark); border-radius: 999px;
	font-size: 14px; font-weight: 400; color: var(--stw-text); white-space: nowrap; background: #fff;
}
.stw-chip svg { width: 15px; height: 15px; stroke-width: 2; }
.stw-chip__dot { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); margin-left: -3px; }

/* Geräteschutz */
.stw-protect { margin: 18px 0 20px; padding: 18px 18px 18px; background: var(--stw-soft); border-radius: 10px; }
.stw-protect__top { display: flex; align-items: center; gap: 10px; }
.stw-protect__badge {
	width: 27px; height: 27px; border-radius: 50%; flex: none;
	background: var(--stw-accent); display: inline-flex; align-items: center; justify-content: center;
}
.stw-protect__badge svg { width: 17px; height: 17px; }
.stw-protect__badge.is-logo { background: none; border-radius: 0; width: auto; max-width: 110px; }
.stw-cart .stw-protect__logo { display: block; height: 27px !important; width: auto !important; max-width: 110px; object-fit: contain; }
.stw-protect__name { font-size: 17px; font-weight: 700; color: var(--stw-text); flex: 1; min-width: 0; }
.stw-protect__name em { color: var(--stw-accent); font-style: italic; font-weight: 800; }
.stw-protect__price { font-size: 15.5px; color: var(--stw-text); white-space: nowrap; margin-left: auto; }
.stw-protect__price .woocommerce-Price-amount { font-weight: 400; }
.stw-protect__desc { margin: 11px 0 15px; font-size: 15px; color: var(--stw-muted); line-height: 1.45; }
.stw-protect__desc a { color: var(--stw-text); text-decoration: underline; text-underline-offset: 2px; }
.stw-cart .stw-btn-dark {
	display: inline-flex; align-items: center; justify-content: center;
	height: 36px; padding: 0 18px; border-radius: 999px;
	background: var(--stw-dark); color: #fff; font-size: 17px; font-weight: 600;
	transition: transform .12s ease, opacity .15s ease;
}
.stw-cart .stw-btn-dark:hover { opacity: .88; }
.stw-cart .stw-btn-dark:active { transform: scale(.97); }
.stw-protect.is-active { box-shadow: inset 0 0 0 1.5px var(--stw-accent); }
.stw-protect__state { display: flex; align-items: center; gap: 16px; min-height: 36px; }
.stw-protect__ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--stw-accent); font-size: 16px; }
.stw-protect__ok svg { width: 18px; height: 18px; stroke-width: 2.6; }
.stw-cart .stw-link { font-size: 15px; color: var(--stw-muted); text-decoration: underline; text-underline-offset: 2px; }
.stw-cart .stw-link:hover { color: var(--stw-text); }

/* Fußzeile: Löschen / Menge / Preis */
.stw-item__foot {
	display: flex; align-items: center;
	min-height: 82px; border-top: 2px solid var(--stw-line);
	padding: 0 0 0 20px;
	margin: 0;
}
.stw-protect + .stw-item__foot { margin-top: 0; }
.stw-item__head + .stw-item__foot { margin-top: 20px; }
.stw-cart .stw-icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--stw-text); transition: background .15s, color .15s; }
.stw-cart .stw-icon-btn svg { width: 21px; height: 21px; }
.stw-cart .stw-icon-btn:hover { background: #fff1f4; color: var(--stw-accent); }
.stw-sep { width: 1.5px; height: 44px; background: var(--stw-line); margin: 0 30px; flex: none; }

.stw-qty { display: flex; align-items: center; gap: 22px; }
.stw-cart .stw-qty__btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--stw-text); border-radius: 6px; }
.stw-cart .stw-qty__btn svg { width: 22px; height: 22px; stroke-width: 1.8; }
.stw-cart .stw-qty__btn:not(:disabled):hover { background: var(--stw-soft); }
.stw-cart .stw-qty__btn:disabled { color: #c4c4c4; }
.stw-cart .stw-qty__input {
	width: 54px; height: 44px; padding: 0; margin: 0;
	border: 1.5px solid #b9b9b9; border-radius: 8px; background: #fff;
	text-align: center; font: inherit; font-size: 16px; color: var(--stw-text); box-shadow: none;
	-moz-appearance: textfield; appearance: textfield;
}
.stw-cart .stw-qty__input::-webkit-outer-spin-button,
.stw-cart .stw-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stw-item__price { margin-left: auto; text-align: right; padding-right: 20px; display: flex; flex-direction: column; align-items: flex-end; }
.stw-item__price strong { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--stw-text); }
.stw-item__price span { font-size: 15px; color: var(--stw-muted); line-height: 1.3; }
.stw-item__price strong .woocommerce-Price-amount { font-weight: 700; }

/* Zusammenfassung */
.stw-summary { padding: 20px 20px 22px; }
.stw-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stw-row--head { font-size: 17px; font-weight: 600; color: #4d4d4d; }
.stw-row--head + .stw-row--sub { margin-top: 6px; }
.stw-row--sub { font-size: 15px; color: #666; padding-left: 18px; margin-top: 4px; }
.stw-row--discount span:last-child { color: #1a7f37; }
.stw-row--ship { margin-top: 20px; }
.stw-row--total {
	margin-top: 18px; padding-top: 22px;
	border-top: 2.5px solid #9a9a9a;
	font-size: 14.5px; color: var(--stw-text);
}
.stw-row--total strong { font-size: 17px; font-weight: 700; }
.stw-row--total > strong { white-space: nowrap; }

/* Infobox */
.stw-info { padding: 20px 20px 18px; display: grid; gap: 22px; }
.stw-info__row { display: flex; gap: 12px; align-items: flex-start; }
.stw-info__row > svg { width: 23px; height: 23px; margin-top: 1px; stroke-width: 1.8; color: var(--stw-text); }
.stw-info__row p { font-size: 15px; line-height: 1.55; color: var(--stw-text); }
.stw-pay { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px !important; }
.stw-pay li { width: 40px; height: 26px; border: 1px solid #e3e3e3; border-radius: 4px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stw-pay li svg { width: 36px; height: 22px; }
.stw-pay li:not(.is-img):nth-child(3) { border-color: #1f72cd; }
.stw-pay li:not(.is-img):nth-child(3) svg { width: 40px; height: 26px; }
.stw-pay li:not(.is-img):nth-child(6) { border: 0; }
.stw-pay li:not(.is-img):nth-child(6) svg { width: 40px; height: 26px; }
.stw-pay li.is-img { width: auto; min-width: 40px; padding: 0 4px; }
.stw-cart .stw-pay__img { display: block; height: 20px !important; width: auto !important; max-width: 60px; object-fit: contain; }
.stw-cart .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Button */
.stw-cart .stw-cta {
	display: flex; align-items: center; justify-content: center;
	height: 54px; padding: 0 24px; border-radius: 999px;
	background: linear-gradient(90deg, var(--stw-accent2) 0%, var(--stw-accent) 100%);
	color: #fff; font-size: 17px; font-weight: 600; text-decoration: none; text-align: center;
	box-shadow: 0 6px 18px -8px var(--stw-accent);
	transition: filter .15s ease, transform .12s ease;
}
.stw-cart .stw-cta:hover { filter: brightness(1.06); color: #fff; }
.stw-cart .stw-cta:active { transform: scale(.985); }
.stw-cart .stw-cta--inline { display: inline-flex; margin-top: 18px; }

/* Leerer Warenkorb */
.stw-empty { padding: 48px 24px; text-align: center; max-width: 560px; }
.stw-empty__icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--stw-soft); align-items: center; justify-content: center; margin-bottom: 14px; }
.stw-empty__icon svg { width: 26px; height: 26px; }
.stw-empty p { font-size: 17px; font-weight: 600; }

/* Tablet */
@media (max-width: 1100px) {
	.stw-cart__grid { grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); column-gap: 28px; }
	.stw-sep { margin: 0 18px; }
	.stw-qty { gap: 14px; }
}

/* Tablet hochkant & Mobil: einspaltig */
@media (max-width: 860px) {
	.stw-cart__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Smartphone */
@media (max-width: 560px) {
	.stw-cart { font-size: 14px; }
	.stw-cart__title { font-size: 20px; margin-bottom: 16px; }
	.stw-item { padding: 16px 14px 0; }
	.stw-item__head { gap: 12px; padding-left: 0; }
	.stw-item__media { width: 48px; height: 60px; }
	.stw-item__name { font-size: 17px; margin-bottom: 10px; }
	.stw-chips { gap: 7px 6px; }
	.stw-chip { height: 27px; padding: 0 9px; font-size: 12.5px; gap: 5px; border-width: 1.25px; }
	.stw-chip svg { width: 13px; height: 13px; }
	.stw-chip__dot { width: 13px; height: 13px; margin-left: -2px; }
	.stw-protect { padding: 14px; margin: 14px 0 16px; }
	.stw-protect__top { flex-wrap: wrap; row-gap: 4px; }
	.stw-protect__name { font-size: 16px; }
	.stw-protect__price { font-size: 14px; margin-left: 37px; flex-basis: 100%; }
	.stw-protect__desc { font-size: 14px; margin: 8px 0 12px; }
	.stw-cart .stw-btn-dark { font-size: 15px; height: 34px; }
	.stw-item__foot { min-height: 70px; padding-left: 4px; }
	.stw-sep { margin: 0 10px; height: 36px; }
	.stw-qty { gap: 6px; }
	.stw-cart .stw-qty__input { width: 44px; height: 38px; font-size: 15px; }
	.stw-cart .stw-qty__btn svg { width: 19px; height: 19px; }
	.stw-item__price { padding-right: 6px; }
	.stw-item__price strong { font-size: 16px; }
	.stw-item__price span { font-size: 13px; }
	.stw-summary, .stw-info { padding: 16px; }
	.stw-row--head { font-size: 16px; }
	.stw-row--sub { padding-left: 14px; font-size: 14px; }
	.stw-row--total strong { font-size: 16px; }
	.stw-info__row p { font-size: 14px; }
	.stw-cart .stw-cta { height: 52px; font-size: 16px; }
}

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