@import url('/css/colors.css');

/* Globale Stile */
[touch-action="none"], [touch-action="auto"], [touch-action="pan-x"], [touch-action="pan-y"] { 
  -ms-touch-action: auto; 
  touch-action: auto; 
}

[touch-action="pan-x pan-y"], [touch-action="pan-y pan-x"] { 
  -ms-touch-action: pan-x pan-y; 
  touch-action: pan-x pan-y; 
}

* { 
  -webkit-overflow-scrolling: touch; 
  -webkit-tap-highlight-color: transparent; 
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-overflow-scrolling: touch; 
  -webkit-tap-highlight-color: transparent; 
}
h2 {    
	color: var(--primary-color);
    font-family: var(--font-secondary);
    font-size: 23px;
}

body { 
  box-sizing: border-box; 
  overflow-y: scroll; 
  overflow-x: hidden; 
  flex-direction: column; 
  -webkit-overflow-scrolling: touch; 
}

/* Render Canvas */
#renderCanvas {
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-evenly; 
  width: 100%; 
  margin: 20px auto; 
  touch-action: auto; 
  user-select: none; 
  border: none; 
  z-index: 0; 
  outline: none; 
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

/* Positionierte Elemente */
.breadcrump { 
  height: auto; 
  width: auto; 
  position: absolute; 
  top: 0; 
  left: 10px; 
  z-index: 2; 
}

.logo { 
  height: auto; 
  width: auto; 
  margin: 0px auto; 
  z-index: 2; 
}

.configurator-panel .logo {
  position: static;
  top: auto;
  left: auto;
  margin: 0 0 10px 0;
}

#burger-menu { 
  position: absolute; 
  top: 30px; 
  right: 20px; 
  display: flex; 
  flex-direction: column; 
  align-items: flex-end; 
  z-index: 3 !important; 
}

#calc { 
  position: absolute; 
  bottom: 112px; 
  left: 0px; 
  color: var(--secondary-color);
  background-color: var(--highlight-color); 
  height: auto; 
  width: 200px; 
  text-align: right; 
  box-sizing: border-box; 
  border-radius: 3px; 
  padding: 6px; 
  font-size: 10px; 
  padding-bottom: 20px;
}

#calc:hover { 
  background-color: var(--input-background);
  color: var(--primary-color); 
}
#calc-text { 
  position: relative; 
  float: left;
  bottom: 0px; 
  left: 10px; 
  text-align: left;
}

#ui, #ui-motor, #ui-color, #ui-plane { 
  height: auto; 
  width: 100%; 
  position: static; 
  margin: 0; 
  background-color: transparent; 
  text-align: left; 
  box-sizing: border-box; 
  padding: 0; 
}

#ui-color p { 
  display: block; 
  width: 100%; 
  height: auto; 
}

#ui-color section, #ui-plane section { 
  display: flex; 
  flex-wrap: wrap; 
  width: 100%; 
  height: auto; 
  margin: 2px 0; 
}

#ui-color section div, #ui-plane section div { 
  display: flex; 
  flex-direction: row; 
  flex-wrap: wrap; 
  justify-content: center; 
  width: 40px; 
  height: 40px; 
  margin: 3px; 
  cursor: pointer; 
  border: 1px solid #fff; 
  border-radius: 10px; 
}

#ui-motor { 
  margin-top: 0; 
}

#ui-plane { 
  margin-top: 0; 
}

.configurator-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
  max-height: 50vh;
}

.configurator-sections details {
  display: block;
  width: 100%;
}

.configurator-sections summary {
  width: 100%;
}

/* Canvas + Loading-Spinner */
.configurator-canvas {
  position: relative;
}

.configurator-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}

.configurator-loading.configurator-loaded {
  opacity: 0;
  pointer-events: none;
}

.configurator-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--secondary-color, #c4a747);
  border-top-color: transparent;
  border-radius: 50%;
  animation: configurator-spin 0.8s linear infinite;
}

@keyframes configurator-spin {
  to { transform: rotate(360deg); }
}

/* Panel: Sticky Preisblock */
.configurator-panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.configurator-price-sticky {
  font-size: 1.15rem;
  font-weight: 600;
}

.configurator-price-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
}

.configurator-price-value {
  display: block;
}

.configurator-btn-weiter {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  min-height: 44px;
}

/* Touch: Mindestgröße für Klickflächen */
.konfknopf, .configurator-sections summary {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

#ui-color section div, #ui-plane section div {
  min-width: 44px;
  min-height: 44px;
}

.basis { 
  height: auto; 
  width: 200px; 
  position: absolute; 
  top: 60px; 
  left: -20px; 
  background-color: var(--background-color-dark); 
  text-align: left; 
  box-sizing: border-box; 
  border-radius: 10px; 
  padding: 6px; 
}

#sticky {
    position: absolute;
    width: 1080px;
    left: 0px;
    top: 20px;
}
#sticky.stick {
    position: fixed;
    margin: 0px auto;
    top: 110px;
    z-index: 10;
}

.preistag {    
	position: relative;
	bottom: 100px;
	float:left;
	width: 665px;
	text-align: center;
	z-index: 2;
}
.weitertag {	
	position: relative;
	bottom: 100px;
	margin-left: 20px;
    float:left;
	width: 390px;
	z-index: 2;
}

/* Menü-Icons */
.menu-icon { 
  width: 100px; 
  height: 100px; 
  background-color: var(--secondary-color); 
  background-size: 60px 60px; 
  background-position: center; 
  background-repeat: no-repeat; 
  margin-bottom: 10px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  position: relative; 
}

/* Konfigurator Buttons */
.konfknopf { 
  font-size: 12px; 
  font-style: normal; 
  font-weight: normal; 
  background-color: var(--background-color); 
  color: var(--primary-color); 
  padding: 5px 15px; 
  width: 100%; 
  text-align: center; 
  position: relative; 
  float: left; 
  box-sizing: border-box; 
  border-radius: 5px; 
}

.konfknopf:hover { 
  font-weight: 600; 
  cursor: pointer !important; 
}

.konfopt { 
  font-size: 12px; 
  font-style: normal; 
  font-weight: normal; 
  background-color: var(--background-color-dark); 
  width: 100%; 
  padding: 3px; 
  text-align: left; 
  float: left; 
  box-sizing: border-box; 
  border-radius: 10px; 
}

/* Interaktive Elemente */
.zeile:hover { 
  background: rgba(200, 200, 200, 0.3); 
}

.tag { 
  line-height: 30px; 
  height: 30px; 
  border-radius: 20px; 
  -webkit-font-smoothing: antialiased; 
  font-family: var(--font-secondary); 
  background-color: var(--secondary-color); 
  color: var(--primary-color); 
  text-align: center; 
  font-size: 16px; 
  text-decoration: none; 
  cursor: pointer; 
}

a .tag { 
  color: var(--primary-color);
  scroll-behavior: smooth; 
  text-decoration: none !important; 
  border: none; 
}

.tag:hover { 
  background-color: var(--hover-color); 
  text-decoration: none !important; 
}

/* Sonstige Stile */
.hide { 
  display: none; 
}

.separator { 
  width: 100%; 
  height: 1px; 
  background-color: var(--background-color-dark); 
  margin: 10px 0; 
}

.tooltip { 
  border-bottom: 1px solid black; 
}

.tooltiptext img { 
  max-width: 180px; 
  max-height: 180px; 
}
.tooltiptext i { 
  font-size: 10px; 
  font-style: normal; 
  font-weight: normal; 
}

/* Hauptcontainer */
#main { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-evenly; 
  width: 100%; 
  max-width: 1200px; 
  margin: 0px auto; 
  padding: 30px; 
  background: rgba(8, 5, 4, 0.0); 
  min-height: 900px; 
}
.Opt3DContainer {
	width:auto; 
	padding: 0px auto; 
	margin: 0px 150px;
}
.Opt3DIco {
	width: 100px; 
	padding: 20px; 
	float:left;
}
.Opt3DTxt {
	font-size: 18px; 
	padding: 30px;
}
.Linklist3DPic {
	max-width: 400px; 
	width: 40%; 
	margin: 20px 40px ; 
	float: left;
} 
@media (max-aspect-ratio: 1/1) {
	#renderCanvas {
		height: 70vh; 
	}
}
@media (min-aspect-ratio: 1/1) {
	#renderCanvas {
		height: auto;
	}
}
   
/* Mobile Optimierungen */
@media (max-width: 768px) {
		/* Container: Weniger Padding und breitere Darstellung */
	  
	.container {
		width: 95%;
		padding: 10px;
	}
	.preistag, .weitertag, #sticky, .logo {    
		display: none;
	}	
	.menu-icon { 
		width: 50px; 
		height: 50px; 
		background-size: 45px 45px; 
		margin-bottom: 5px; 
	}
	#burger-menu { 
		top: 50px; 
		right: 0px; 
	}
	#ui, #ui-motor, #ui-color, #ui-plane { 
		width: 100%; 
		top: auto;
		right: auto;
	}
	  
	/* Überschriften anpassen */
	h1 {
		font-size: 1.8em;
		margin-bottom: 12px;
	}
	h2 {
		font-size: 1.5em;
	}
	.header-top img {
		max-width: 90%;
		height: auto;
	}
	
	/* Spezifikationen etwas verkleinern */
	.specs {
		font-size: 1em;
	}
	
	/* Der 3D Konfigurator Button wird breiter und benutzerfreundlicher */
	a.configurator {
		width: 90%;
		padding: 12px 0;
		font-size: 1.1em;
	}
	
	/* Icons-Bereich: Elemente untereinander anordnen */
	
	.Opt3DContainer {
		width:auto; 
		padding: 0px; 
		margin: 0px 0px !important;
	}
	.Opt3DElement {
	
	  }
	.Opt3DIco {
		width: 100px; 
		padding: 20px; 
		float:left;
	}
	.Opt3DTxt {
		font-size: 12px; 
		padding: 30px;
	}
	.Linklist3DPic {
		display: none;
		float: none;
	} 
	  
	  /* Galerie: Bilder in einer Spalte */
	.gallery {
		flex-direction: column;
	}
	.gallery img {
		max-width: 100%;
		width: 100%;
	
	}
	  
	  /* Allgemeiner Seitenabstand verringern */
	header, section, footer {
		padding: 10px;
	}
}

/* ============================================
   3D2 Konfigurator – Modern & Mobile-optimiert
   ============================================ */
.configurator-v2 {
	touch-action: manipulation;
	-webkit-overflow-scrolling: touch;
}

.cfg2-error {
	padding: 2rem;
	text-align: center;
}

.cfg2-breadcrumb {
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	background: var(--background-color, #f8f8f8);
	border-bottom: 1px solid var(--border-color, #ddd);
}

.cfg2-breadcrumb a {
	color: var(--primary-color, #333);
	text-decoration: none;
}

.cfg2-breadcrumb a:hover {
	text-decoration: underline;
}

.cfg2-wrap {
	display: flex;
	gap: 1rem;
	align-items: stretch;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem;
	box-sizing: border-box;
}

.cfg2-canvas-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.configurator-v2 #renderCanvas {
	display: block;
	width: 100%;
	height: 70vh;
	min-height: 360px;
	border-radius: 12px;
	background: #e8e8e8;
}

.cfg2-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background: rgba(255,255,255,0.9);
	border-radius: 12px;
	font-size: 0.95rem;
	transition: opacity 0.3s;
	pointer-events: none;
}

.cfg2-loading.cfg2-loaded {
	opacity: 0;
	pointer-events: none;
}

.cfg2-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--secondary-color, #c4a747);
	border-top-color: transparent;
	border-radius: 50%;
	animation: cfg2-spin 0.8s linear infinite;
}

@keyframes cfg2-spin {
	to { transform: rotate(360deg); }
}

.cfg2-panel {
	flex: 0 0 340px;
	min-width: 280px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1rem;
	background: var(--secondary-color, #c4a747);
	color: var(--primary-color, #1a1a1a);
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	max-height: 70vh;
	overflow: hidden;
}

.cfg2-panel-header h1 {
	margin: 0 0 0.5rem 0;
	font-size: 1.4rem;
}

.cfg2-price-block {
	font-size: 1.25rem;
	font-weight: 600;
}

.cfg2-price-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
	opacity: 0.85;
}

.cfg2-sections {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cfg2-section {
	border-radius: 8px;
	background: rgba(255,255,255,0.2);
	overflow: hidden;
}

.cfg2-section summary {
	padding: 0.65rem 1rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	user-select: none;
}

.cfg2-section summary::-webkit-details-marker {
	display: none;
}

.cfg2-section summary::after {
	content: '\25BC';
	font-size: 0.7em;
	opacity: 0.8;
}

.cfg2-section[open] summary::after {
	transform: rotate(180deg);
}

.cfg2-section-body {
	padding: 0.75rem 1rem;
	background: rgba(255,255,255,0.15);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cfg2-opt {
	padding: 0.6rem 0.9rem;
	font-size: 0.9rem;
	background: rgba(255,255,255,0.5);
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
	border: 1px solid transparent;
}

.cfg2-opt:hover {
	background: rgba(255,255,255,0.7);
}

.cfg2-opt-active {
	background: var(--primary-color, #1a1a1a);
	color: var(--secondary-color, #fff);
	border-color: var(--primary-color, #1a1a1a);
}

.cfg2-color-label {
	font-size: 0.85rem;
	margin-bottom: 0.4rem;
}

.cfg2-color-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cfg2-swatch {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 2px solid rgba(0,0,0,0.2);
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.15s;
	background-size: cover;
}

.cfg2-swatch:hover {
	transform: scale(1.1);
	border-color: rgba(0,0,0,0.5);
}

.cfg2-actions {
	margin-top: auto;
}

.cfg2-btn {
	display: block;
	width: 100%;
	padding: 0.85rem 1.2rem;
	text-align: center;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.cfg2-btn-primary {
	background: var(--primary-color, #1a1a1a);
	color: var(--secondary-color, #fff);
}

.cfg2-btn-primary:hover {
	background: #333;
}

.cfg2-calc {
	font-size: 0.8rem;
	line-height: 1.5;
	max-height: 120px;
	overflow-y: auto;
}

.cfg2-calc-line {
	padding: 0.2rem 0;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cfg2-main {
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

.cfg2-specs h2 {
	margin-bottom: 0.5rem;
}

.cfg2-specs p {
	margin: 0.25rem 0;
	font-size: 0.95rem;
}

.cfg2-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1.5rem;
	background: #f8f8f8;
	border-radius: 12px;
}

.cfg2-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0.75rem;
}

.cfg2-form-grid input {
	width: 100%;
	padding: 0.7rem;
	border: 1px solid #ccc;
	border-radius: 8px;
}

.cfg2-captcha label {
	display: block;
	margin-bottom: 0.35rem;
}

.cfg2-form-error {
	color: #c00;
	font-weight: 500;
}

.cfg2-disclaimer,
.cfg2-footer-note {
	font-size: 0.85rem;
	opacity: 0.9;
}

.cfg2-btn-submit {
	background: var(--secondary-color, #c4a747);
	color: var(--primary-color, #1a1a1a);
}

.cfg2-btn-submit:hover {
	background: var(--hover-color, #d4b857);
}

/* 3D2 Mobile */
@media (max-width: 900px) {
	.cfg2-wrap {
		flex-direction: column;
		padding: 0.5rem;
	}

	.cfg2-panel {
		flex: 0 0 auto;
		max-height: 50vh;
		min-width: 100%;
	}

	.configurator-v2 #renderCanvas {
		height: 55vh;
		min-height: 280px;
	}

	.cfg2-form-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.cfg2-specs p {
		font-size: 0.85rem;
	}

	.cfg2-section-body {
		padding: 0.5rem 0.75rem;
	}
}