/* ==========================================================================
   Produktdetailseite - Infobox Layout
   ========================================================================== */
/* Dieses Stylesheet ist in klar getrennte Bereiche gegliedert:
   0) Root/Variablen
   1) Mobile Anpassungen
   2) Grundstruktur (Infobox)
   3) Infobox-Top (Titel/Bild/Preis)
   4) Infobox-Bottom (Tabs + Inhalte)
   5) Inhaltsmodule (Ratings/Progress etc.)
*/

/* ---------------------------------------------------------------------------
   0) Root/Variablen
   --------------------------------------------------------------------------- */

:root {
	--border: 1px #e6e6e6 solid;
}

/* ---------------------------------------------------------------------------
   1) Mobile Anpassungen
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.infobox {
		margin-bottom: 20px;
	}
	.infobox-top,
	.infobox-bottom {
		display: block;

		.infobox-left,
		.infobox-right {
			/* Spalten auf Mobil stapeln */
			float: none !important;
			width: 100% !important;
			flex-basis: 100% !important;
			max-width: 100%;
			border-right: 0;
		}

		.infobox-left {
			border-right: 0;
		}
	}

	.infobox-top {
		.infobox-title {
			padding: 18px 14px;
			font-size: 22px;
			line-height: 1.25;
			letter-spacing: 0.2px;
		}

		.infobox-left .infobox-product-thumb {
			padding: 18px;
		}

		.infobox-right {
			.amazon-logo {
				padding: 8% 14%;
			}

			.price-info {
				padding: 16px 14px;
				font-size: 15px;

				div:nth-child(-n+2) {
					margin-bottom: 12px;
				}

				.label {
					float: none;
					display: block;
					width: 100%;
					margin-bottom: 4px;
				}

				.button.amazon {
					width: 100%;
					min-height: 44px;
					padding: 10px 8px;
					font-size: 16px;
					line-height: 1.3;
					box-sizing: border-box;
				}
			}
		}
	}

	.infobox-bottom {
		.tab-container {
			border-left: 0;
			border-right: 0;

			.tab-buttons {
				display: flex;
				flex-wrap: wrap;
				gap: 8px;
				padding: 10px;
			}

			.tab-button {
				/* Tabs auf Mobil mit guter Tap-Fläche */
				flex: 1 1 calc(50% - 8px);
				min-width: 140px;
				width: auto !important;
				margin: 0;
				padding: 10px 8px;
				min-height: 44px;
				font-size: 15px;
				line-height: 1.25;
				word-break: break-word;
				white-space: normal;
				box-sizing: border-box;

				&:first-child {
					margin-left: 0;
				}

				&:before {
					margin-right: 0.35em;
				}
			}

			.tab-content {
				padding: 0;

				#tab1,
				#tab2,
				#tab3,
				#tab4 {
					width: 100%;
					max-width: 100%;
					overflow-x: auto;
					box-sizing: border-box;
				}
			}
		}

		.infobox-overall-rating,
		.infobox-single-rating,
		section.equipment-info,
		section.equipment-rating {
			font-size: 14px;
			line-height: 1.5;
		}

		.infobox-overall-rating,
		.infobox-single-rating {
			display: block;
			width: 100%;
			overflow-x: auto;
			-webkit-overflow-scrolling: touch;

			table {
				min-width: 540px;
			}
		}

		.infobox-left strong,
		section.equipment-rating .rating-section ul strong {
			width: auto;
			min-width: 45%;
		}

		section.equipment-info {
			padding: 0 12px 12px;

			h3 {
				font-size: 15px;
				padding: 10px 12px;
			}

			li {
				padding: 8px 12px;
			}
		}

		section.equipment-rating .rating-section {
			padding: 0 12px;

			ul li {
				padding: 6px 8px;
				align-items: flex-start;
			}
		}

		.infobox-price-comparison .vt-price-comparison {
			padding: 12px;

			img,
			span {
				float: none;
				display: block;
				width: 100%;
				height: auto;
				line-height: 1.35;
			}

			img {
				max-width: 180px;
				margin: 0 auto 8px;
			}

			span {
				font-size: 17px;
			}
		}
	}
}
@media (max-width: 480px) {
	.infobox {
		h2 {
			margin: 12px;
			padding: 8px;
			font-size: 1.2em;
		}
	}

	.infobox-top {
		.infobox-title {
			padding: 14px 10px;
			font-size: 19px;
		}

		.infobox-right {
			.text-left {
				/* Inhalte vollbreit */
				width: 100% !important;
			}

			.price-info,
			.amazon-logo {
				padding-left: 10px;
				padding-right: 10px;
			}

			.price-info {
				font-size: 14px;

				.button.amazon {
					font-size: 15px;
				}
			}
		}

		.infobox-left .infobox-product-thumb {
			padding-left: 10px;
			padding-right: 10px;
		}
	}

	.infobox-bottom {
		.tab-container {
			.tab-buttons {
				display: block;
				padding: 8px;
			}

			.tab-button {
				display: block;
				flex: 0 0 100% !important;
				width: 100% !important;
				max-width: 100%;
				box-sizing: border-box;
				margin: 0 0 6px 0 !important;
				font-size: 14px;
				padding: 9px 8px;

				&:first-child {
					margin-left: 0 !important;
				}

				&:last-child {
					margin-bottom: 0 !important;
				}

				&:before {
					display: inline-block;
				}
			}

			.tab-content {
				#tab1,
				#tab2,
				#tab3,
				#tab4 {
					padding-bottom: 6px;

					* {
						max-width: 100%;
						box-sizing: border-box;
					}
				}
			}
		}

		strong,
		.infobox-left strong,
		section.equipment-rating .rating-section ul strong {
			width: 100% !important;
			min-width: 100% !important;
			display: block;
		}

		.infobox-overall-rating,
		.infobox-single-rating,
		.infobox-price-comparison {
			overflow-x: auto;
			-webkit-overflow-scrolling: touch;
		}

		.infobox-overall-rating table,
		.infobox-single-rating table {
			min-width: 500px;
		}

		section.equipment-info,
		section.equipment-rating .rating-section {
			padding-left: 10px;
			padding-right: 10px;
		}

		section.equipment-info {
			h3 {
				font-size: 14px;
			}

			li {
				font-size: 13px;
				line-height: 1.4;
			}
		}

		section.equipment-rating .rating-section ul li {
			font-size: 13px;
			line-height: 1.4;
			flex-wrap: wrap;
			gap: 6px;
		}
	}
}

/* ---------------------------------------------------------------------------
   2) Grundstruktur (Infobox)
   --------------------------------------------------------------------------- */

.infobox {
	width: 100%;
	margin-bottom: 28px;
	border: var(--border);
	box-shadow: 0 1px 12px 0 #dfe3e4, 0 1px 3px 0 rgba(135,135,135,0.5);
	.infobox-top {
		/* Oberer Bereich: Titel, Bild, Preis */
		display: block;
		width: 100%;
		.infobox-left {
			float: left;
			width: 50%;
			box-sizing: border-box;
		}
		.infobox-right {
			float: left;
			width: 50%;
			box-sizing: border-box;
		}
		&:after {
			display: table;
			clear: both;
			content: "";
		}
	}
	.infobox-bottom {
		/* Unterer Bereich: Tabs */
		display: block;
		width: 100%;
		.infobox-left {
			float: left;
			width: 50%;
			box-sizing: border-box;
		}
		.infobox-right {
			float: left;
			width: 50%;
			box-sizing: border-box;
		}
		&:after {
			display: table;
			clear: both;
			content: "";
		}
	}
	h2 {
		margin: 20px;
		padding: 10px;
		text-align: center;
		font-size: 1.5em;
		letter-spacing: 1px;
		color: #000000a1;
		background-color: #e4effd;
		border-radius: 10px;
	}
	ul {
		list-style-type: none;
		margin: unset;
		padding: unset;
	}
	p {
		margin: unset;
	}
}

/* ---------------------------------------------------------------------------
   3) Infobox-Top (Titel/Bild/Preis)
   --------------------------------------------------------------------------- */

.infobox-top .infobox-title {
	/* Produktname */
	padding: 30px;
	border-bottom: var(--border);
	text-align: center;
	font-size: 30px;
	font-family: monospace;
}

.infobox-top .infobox-left {
	/* Bildbereich */
	border-right: var(--border);
	text-align: center;
	.infobox-product-thumb {
		padding: 50px;
		img {
			box-sizing: border-box;
			width: 100%;
			aspect-ratio: 1 / 1;
			display: block;
			border: var(--border);
			border-radius: 10px;
		}
	}
}

.infobox-top .infobox-right {
	/* Preis- und Angebotsbereich */
	.amazon-logo {
		padding: 10% 20%;
		border-bottom: var(--border);
		img {
			box-sizing: border-box;
			width: 100%;
		}
	}
	.price-info {
		padding: 14px;
		font-family: monospace;
		font-style: italic;
		div:nth-child(-n+2) {
			margin-bottom: 15%;
		}
		.label {
			float: left;
			width: 55%;
			font-family: sans-serif;
			font-weight: bold;
			font-style: normal;
		}
		.price-reduction {
			color: red;
		}
		.button.amazon {
			display: block;
			padding: 4px;
			text-align: center;
			text-decoration: unset;
			font-size: 18px;
			font-weight: bold;
			font-family: monospace;
			color: black;
			border: var(--border);
			border-radius: 4px;
			background-color: #ffce8d;
			border: 1px solid #ffa226;
			&:first-child {
				margin-bottom: 5%;
			}
		}
	}
}

/* ---------------------------------------------------------------------------
   4) Infobox-Bottom (Tabs + Inhalte)
   --------------------------------------------------------------------------- */

.infobox-bottom .tab-container {
	padding: unset;
	border: 2px solid #e6e6e6;
	border-radius: 2px;
	.tab-buttons {
		/* Tab-Button-Leiste */
		display: flex;
		padding: 8px 0px;
		border-bottom: var(--border);
		font-size: inherit;
		.tab-button {
			/* Einzelner Tab */
			flex-basis: 24%;
			margin-right: 0.5em;
			font-size: 18px;
			font-weight: bold;
			font-family: monospace;
			text-align: center;
			color: black;
			display: block;
			padding: 4px;
			background-color: #fbfbfb;
			border: var(--border);
			border-radius: 4px;
			&:first-child {
				margin-left: 0.5em;
			}
			&:before {
				/* Icon vor Tab-Titel */
				content: "\f03a";
				font-family: "FontAwesome";
				font-weight: normal;
				color: black;
				margin-right: 0.5em;
			}
			&:hover {
				/* Hover-Zustand */
				background-color: #fff;
			}
			&.active {
				/* Aktiver Tab */
				background-color: #fff;
				box-shadow: inset 0 -3px 0 0 #1e88e5;
			}
			&:focus-visible {
				/* Tastatur-Fokus */
				outline: 3px solid rgba(30, 136, 229, 0.4);
				outline-offset: 2px;
			}
		}
	}
	.tab-content {
		/* Inhaltsbereich eines Tabs */
		padding: unset;
		font-size: 14px;
		&:after {
			content: "";
			clear: both;
			display: table;
		}
	}
}
.infobox-bottom .toggle {
	.toggle-content {
		/* Eingeklappte Inhalte */
		display: none;
	}
}

/* ---------------------------------------------------------------------------
   5) Inhaltsmodule (Ratings/Progress etc.)
   --------------------------------------------------------------------------- */

.infobox-bottom .overview-rating {
	.progress-container {
		padding: 0 18px;
		font-family: monospace;
		.progress-wrapper {
			background: #f7f7f7;
			border-radius: 6px;
			overflow: hidden;
			margin: 1em 0;
			position: relative;
			height: 28px;
			.progress-bar {
				background: linear-gradient(90deg, #46bfca, #37bdc9); /* Blauverlauf */
				height: 100%;
				display: flex;
				align-items: center;
				padding-left: 0.6em;
				color: #fff;
				font-weight: 600;
				font-size: 0.9em;
				white-space: nowrap;
				transition: width 0.4s ease-in-out;
			}
			.progress-bar-note {
				display: inline-block;
				margin: auto;
				padding: 5px 8px;
				background-color: rgba(0, 0, 0, 0.15);
			}
		}
		.progress-label {
			font-size: 1.2em;
			margin-top: 0.4em;
			margin-bottom: 1em;
			padding-left: 0.2em;
			color: #333;
			&:last-child {
				margin-bottom: 0;
			}
		}
	}
}

.infobox-bottom .infobox-single-rating {
	width: 100%;
	th, td {
		padding: 4px 8px;
		background-color: unset;
		border: var(--border);
	}
	thead th {
		font-weight: 800;
	}
	tfoot td {
		font-weight: 800;
		text-transform: uppercase;
		padding: 6px 8px;
		background-color: #f5f5f5;
		border: 3px solid #0083c1;
	}
	tr.infobox-single-rating-category td {
		font-weight: bold;
		background-color: #f5f5f5;
		border-top: 2px solid #0083c1;
		border-bottom: 2px solid #0083c1;
	}
}

.infobox-bottom .infobox-overall-rating {
	th, td {
		padding: 4px 8px;
		background-color: unset;
		border: 1px solid #000000;
		font-weight: bold;
		text-align: center;
	}
	thead th {
		font-weight: 800;
		background-color: #cccccc;
	}
	tfoot td {
		font-weight: 800;
	}
	tr:nth-child(2n+1) td {
		background-color: #dddddd;
		&:first-child {
			text-align: left;
		}
	}
	tr:nth-child(2n) td {
		background-color: #eeeeee;
	}
}
.infobox-bottom .infobox-price-comparison {
	&:before {
		content: 'More Offers';
		font-size: 22px;
		font-family: georgia;
		font-weight: bold;
		text-decoration: underline;
		text-align: center;
		letter-spacing: 1px;
		color: #5993d2;
		background-color: #fbfbfb;
		display: block;
		padding: 28px 0;
	}
	.vt-price-comparison {
		display: block;
		width: 100%;
		padding: 14px;
		text-align: center;
		color: black;
		border-top: 1px solid #e6e6e6;
		&:after {
			display: table;
			clear: both;
			content: "";
		}
		&:hover {
			color: #5993d2;
		}
		img {
			float: left;
			width: 35%;
			height: 50px;
		}
		span {
			float: left;
			width: 65%;
			line-height: 50px;
			letter-spacing: 1px;
			font-size: 19px;
			font-family: monospace;
			&:after {
				content: "plus shipping costs";
				font-size: small;
				margin-left: 8px;
			}
		}
	}
}

/*--------------------------:[ Links ]:--------------------------*/

.infobox-bottom .infobox-left {
	border-right: var(--border);
	strong {
		display: inline-block;
		width: 60%;
		text-decoration: underline;
	}
	ul {
		list-style-type: none;
		margin: 0;
		ul {
			list-style-type: decimal;
			margin-left: 28px;
		}
	}
	li {
		padding: 6px 14px;
		border-bottom: var(--border);
		li {
			border-bottom: none;
		}
	}
	section.equipment-info {
		padding: 0 18px 18px;
		.equipment-section {
			margin-bottom: 18px;
			border: var(--border);
			border-radius: 8px;
			background-color: #fbfbfb;
			overflow: hidden;
			&:last-child {
				margin-bottom: 0;
			}
		}
		h3 {
			margin: 0;
			padding: 12px 14px;
			background-color: #f0f4f9;
			border-bottom: var(--border);
			font-size: 16px;
		}
		ul {
			margin: 0;
			padding: 0;
		}
		li {
			padding: 8px 14px;
			border-bottom: var(--border);
			font-size: 14px;
			line-height: 1.4;
			&:last-child {
				border-bottom: none;
			}
		}
		strong {
			width: 55%;
			text-decoration: none;
			color: #2b2b2b;
		}
		.accordion {
			padding: 0 14px 12px;
		}
		.accordion-title {
			width: 100%;
			padding: 8px 12px;
			margin-top: 10px;
			border: 1px solid #cfe0f3;
			border-radius: 6px;
			background-color: #eaf2fd;
			text-align: center;
			font-weight: 600;
			cursor: pointer;
			&:hover {
				background-color: #dbe9fb;
			}
			&:focus-visible {
				outline: 3px solid rgba(30, 136, 229, 0.35);
				outline-offset: 2px;
			}
		}
		.accordion-content {
			margin-top: 10px;
			border-top: var(--border);
			padding-top: 10px;
		}
	}
}

/*--------------------------:[ Rechts ]:--------------------------*/

.infobox-bottom .infobox-right {
	.infobox-grades {
		margin: -18px -18px 18px;
		padding: 18px;
		border-bottom: var(--border);
		font-size: inherit;
		font-family: monospace;
		.infobox-grade {
			width: 100%;
			margin-left: auto;
			margin-right: auto;
			margin-bottom: 8px;
			background-color: #fbfbfb;
			border: var(--border);
			span {
				display: inline-block;
				padding: 4px 14px;
				&:first-child {
					width: 40%;
					font-weight: bold;
				}
				&:not(:first-child) {
					width: auto;
					border-left: var(--border);
				}
			}
			&:after {
				content: "";
				clear: both;
				display: table;
			}
			&:last-child {
				margin-bottom: 0;
			}
		}
	}
	section.equipment-rating {
		.rating-section {
			padding: 0 18px;
			ul {
				list-style-type: none;
				line-height: 1.8;
				margin-left: 8px;
				margin-bottom: 18px;
				li {
					display: flex;
					align-items: center;
					gap: 8px;
					padding: 6px 14px;
				}
				strong {
					display: inline-block;
					width: 60%;
				}
				span:not(.productdetail-boolean) {
					display: inline-block;
					width: 60%;
				}
			}
		}
	}
}

/*----------------------------------------------------------------------:[ Allgemein ]:----------------------------------------------------------------------*/

/*----------------------------------------------:[ Allgemein ]:----------------------------------------------*/

/*--------------------------:[ Booleans ]:--------------------------*/

.productdetail-boolean {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	vertical-align: middle;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
	overflow: hidden;

	i {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		color: currentColor;
		font-size: 12px;
		line-height: 1;
	}

	&.productdetail-boolean--yes {
		color: #1a7f37;
		background: #e6f4ea;
		border: 1px solid #b7e1c2;
	}

	&.productdetail-boolean--no {
		color: #b42318;
		background: #fdecea;
		border: 1px solid #f5b5b2;
	}
}

/* ---------------------------------------------------------------------------
   6) Dark Mode (wie Vergleichstabelle: konsistente, kontrastreiche Overrides)
   --------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
	:root {
		--border: 1px #2b364b solid;
	}

	.infobox {
		background: #0e1420;
		box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
		color: #d9e2f2;

		h2 {
			color: #eaf1ff;
			background: #1a2538;
		}
	}

	.infobox a {
		color: #8bb6ff;
	}

	.infobox-top .infobox-title,
	.infobox-top .infobox-left,
	.infobox-top .infobox-right .amazon-logo,
	.infobox-top .infobox-right .price-info,
	.infobox-bottom .infobox-left,
	.infobox-bottom .tab-container .tab-buttons,
	.infobox-bottom .tab-container,
	.infobox-bottom .infobox-price-comparison .vt-price-comparison,
	.infobox-bottom .infobox-left li {
		border-color: #1f2a3a;
	}

	.infobox-top .infobox-left .infobox-product-thumb img {
		background: #121722;
		border-color: #1f2a3a;
	}

	.infobox-top .infobox-right .price-info {
		color: #d9e2f2;
	}

	.infobox-top .infobox-right .amazon-logo {
		background: #1a2538;
	}

	.infobox-top .infobox-right .price-info .button.amazon {
		color: #ffffff;
		background: #3b82f6;
		border-color: #3b82f6;
	}

	.infobox-bottom .tab-container {
		background: #121722;
	}

	.infobox-bottom .tab-container .tab-buttons .tab-button {
		background: #1a2231;
		color: #d9e2f2;
		border-color: #2b364b;

		&:before {
			color: #d9e2f2;
		}

		&:hover,
		&.active {
			background: #0f1726;
			box-shadow: inset 0 -3px 0 0 #3b82f6;
		}
	}

	.infobox-bottom .overview-rating .progress-container .progress-wrapper {
		background: #1a2231;
	}

	.infobox-bottom .overview-rating .progress-container .progress-label {
		color: #d9e2f2;
	}

	.infobox-bottom .infobox-single-rating th,
	.infobox-bottom .infobox-single-rating td,
	.infobox-bottom .infobox-overall-rating th,
	.infobox-bottom .infobox-overall-rating td {
		color: #d9e2f2;
		border-color: #1f2a3a;
	}

	.infobox-bottom .infobox-single-rating tfoot td,
	.infobox-bottom .infobox-single-rating tr.infobox-single-rating-category td,
	.infobox-bottom .infobox-overall-rating thead th,
	.infobox-bottom .infobox-overall-rating tr:nth-child(2n+1) td,
	.infobox-bottom .infobox-overall-rating tr:nth-child(2n) td {
		background: #172233;
	}

	.infobox-bottom .infobox-price-comparison:before {
		color: #9ec5ff;
		background: #121722;
	}

	.infobox-bottom .infobox-price-comparison .vt-price-comparison {
		color: #d9e2f2;
		background: #0f1726;

		&:hover {
			color: #8bb6ff;
		}
	}

	.infobox-bottom .infobox-left section.equipment-info .equipment-section,
	.infobox-bottom .infobox-right .infobox-grades .infobox-grade {
		background: #121722;
		border-color: #1f2a3a;
	}

	.infobox-bottom .infobox-left section.equipment-info h3,
	.infobox-bottom .infobox-left section.equipment-info .accordion-title,
	.infobox-bottom .infobox-right .infobox-grades {
		background: #1a2231;
		border-color: #2b364b;
		color: #eaf1ff;
	}

	.infobox-bottom .infobox-left section.equipment-info strong,
	.infobox-bottom .infobox-right section.equipment-rating .rating-section ul,
	.infobox-bottom .infobox-right section.equipment-rating .rating-section ul li {
		color: #d9e2f2;
	}

	.productdetail-boolean.productdetail-boolean--yes {
		color: #7de3a4;
		background: #143324;
		border-color: #2a6b4a;
	}

	.productdetail-boolean.productdetail-boolean--no {
		color: #ffb4ac;
		background: #3f1b1b;
		border-color: #7b2f2f;
	}
}
