/* ===============================
   Variablen
   =============================== */
:root {
  --color-primary: #c61932;
  --color-secondary: #152c52;
  --color-bg-light: #f9f9f9;
  --color-bg-default: #f5f5f5;
  --color-overlay: rgba(21, 44, 82, 0.7);
  --border-radius: 4px;
  --box-shadow-light: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===============================
   Reset & Global Styles
   =============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--color-bg-default);
}

a,
a:visited,
a:hover,
a:active,
a:focus {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   Hintergrund & Header
   =============================== */
.bg-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 1280px;
  background: url('pics/bg3.png') center/cover no-repeat;
  z-index: -1;
}

.bg-header1 {
  position: fixed;
  inset: 0 0 auto 0;
  height: 1280px;
  background-color: rgba(235,235,235,0.85);center/cover no-repeat;
  z-index: -1;
}



.topbar {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100px;
  background-color: rgba(255,255,255,0.85);
  box-shadow: var(--box-shadow-light);
  transition: opacity 0.4s ease;
  z-index: 1000;
}

.topbar.fade-out {
  opacity: 0;
  pointer-events: none;
}

.grid-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 100%;
  width: 1300px;
  margin: 0 auto;
  padding: 0 0px;
}

.logo-container {
  justify-self: start;
  margin: 0;
}

.logo {
  height: 60px;
}

.search-container {
  justify-self: center;
}

.sucheForm {
  display: flex;
  width: 500px;
  max-width: 90vw;
}

.sucheForm input {
  flex: 1;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #aaa;
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.sucheForm button {
  padding: 8px 12px;
  background: var(--color-secondary);
  color: #fff;
  border: 1px solid var(--color-secondary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
}

.login-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  justify-self: end;
  margin: 0;
}

.user-icon {
  width: 30px;
  margin-right: 8px;
  filter: grayscale(100%);
}

.txtLogin {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-secondary);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* ===============================
   Login-Formular
   =============================== */
.login-form {
  position: absolute;
  top: 100px;
  right: 20px;
  display: none;
  width: 220px;
  padding: 20px;
  background: var(--color-bg-light);
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.login-form.active {
  display: block;
}

.login-form form {
  display: flex;
  flex-direction: column;
}

.login-form input,
.login-form button {
  padding: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  border-radius: var(--border-radius);
}

.login-form input {
  border: 1px solid #ccc;
}

.login-form button {
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
}

.login-form button:hover {
  background: #a41129;
}

/* ===============================
   Hauptlayout & Spalten
   =============================== */
.main-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  column-gap: 20px;
  max-width: 1300px;
  margin: 120px auto 0;
  height: calc(100vh - 120px);
}

/* Linke Spalte (sticky) */
.left-pane {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 120px;
  height: 300px;}

/* Rechte Spalte */
.right-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 5px;
}

/* Scrollbarer Bereich */
.artikel-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ===============================
   Artikelliste
   =============================== */
.artikel-box {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ccc;
  border-radius: 6px;
  min-height: 100px;
  cursor: pointer;
}

.artikel-box img {
  width: 100px;
  height: 100px;
  margin-right: 15px;
  border-radius: var(--border-radius);
  object-fit: cover;
}

.artikel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.artikel-info h3 {
  margin: 2px 0;
  font-size: 16px;
  color: var(--color-primary);
}

.artikel-info p {
  margin: 1px 0;
  font-size: 12px;
  color: var(--color-secondary);
}

/* Preis & Menge */
.artikel-rechts {
  position: relative;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.artikel-preis {
  margin: 1px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
}

.menge-steuerung {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
}

.menge-steuerung input {
  width: 40px;
  margin: 0 5px;
  padding: 4px;
  text-align: center;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

.menge-steuerung button {
  width: 25px;
  height: 25px;
  font-size: 18px;
  font-weight: bold;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

/* ===============================
   Navigation über Artikeln
   =============================== */
.nav-div,
.nav-info {
  position: relative;
  height: 30px;
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  background: var(--color-overlay);
  border-radius: 6px;
  box-shadow: var(--box-shadow-light);
  z-index: 1000;
}

.nav-info {
  max-width: 480px;
}

.nav-left {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-align: left;
}

.nav-right {
  color: #fff;
  text-align: right;
}

/* ===============================
   Pagination
   =============================== */
.pagination {
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--border-radius);
}

.pagination a {
  background: #eee;
  color: #333;
}

.pagination a:hover {
  background: #ddd;
}

/* ===============================
   Responsive
   =============================== */
@media (max-width: 1300px) {
  .main-layout {
    grid-template-columns: 1fr;
    margin: 120px 10px 0;
    height: auto;
  }

  .artikel-box {
    flex-direction: column;
    align-items: center;
  }

  .artikel-rechts,
  .menge-steuerung {
    position: static;
    margin-top: 10px;
    align-items: center;
  }

  .sucheForm {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .grid-header {
    grid-template-columns: 1fr;
    grid-row-gap: 10px;
    padding: 10px;
    text-align: center;
  }

  .logo,
  .login-container {
    justify-self: center;
    margin: 0;
  }

  .sucheForm {
    flex-direction: column;
  }

  .sucheForm input,
  .sucheForm button {
    width: 100%;
    margin-bottom: 5px;
  }
}


/* 1. Abstand und Grund-Styles */
.info-card {
  background: var(--color-overlay);       /* wie nav-info */
  color: #fff;                            /* weiße Schrift */
  padding: 12px;
  border-radius: 6px;
  box-shadow: var(--box-shadow-light);
  display: flex;
  flex-direction: column;
  gap: var(--info-card-gap, 8px);                               /* Zwischen den Reihen */
}

/* 2. Top-Row: Text links, Preis rechts */
.info-row--top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}

/* 3. Middle-Row: kleinerer Beschreibungstext */
.info-row--middle {
  font-size: 12px;
  line-height: 1.4;
}

/* 4. Bottom-Row: zwei Links links/rechts */
.info-row--bottom {
  display: flex;
  justify-content: space-between;
}

.info-link {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.info-link:hover {
  opacity: 0.8;
}

/* Abstand zur vorherigen Karte */
.info-card--suche {
  margin-top: 20px;
  background:rgba(21, 44, 82, 1);	
}

/* Nur eine rechte Zeile mit Link */
.info-row--bottom-right {
  display: flex;
  justify-content: flex-end;
}


/* Overlay */
#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Abdunkeln */
  backdrop-filter: blur(4px);     /* Verschwommener Hintergrund */
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal-Box */
.modal-dialog {
  background: white;
  padding: 30px;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
}

/* Titel */
.modal-header {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Untertext */
.modal-subtext {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

/* Buttons */
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal-buttons button {
  padding: 8px 8px;
  font-size: 14px;
  cursor: pointer;
}

/* Versteckt */
.hidden {
  display: none;
}

/* Trigger-Text */
.trigger-text {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
}

/* Keyframes */
@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeOutModal {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Sichtbares Overlay */
#modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  animation: fadeInOverlay 0.3s ease-out forwards;
}

/* Modal-Box */
.modal-dialog {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  animation: fadeInModal 0.3s ease-out forwards;
}

/* Ausblend-Klassen */
.fade-out-overlay {
  animation: fadeOutOverlay 0.3s ease-in forwards;
}

.fade-out-modal {
  animation: fadeOutModal 0.3s ease-in forwards;
}

/* Versteckt */
.hidden {
  display: none !important;;
}







/* Modal-Layout mit Preis */
.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
}

.modal-price {
  font-size: 18px;
  font-weight: bold;
  color: #c61932;
}

/* Formularfelder */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.modal-form label {
  font-size: 14px;
  font-weight: 500;
}

.modal-form input,
.modal-form textarea {
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}


#order-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeInOverlay 0.3s ease-out forwards;
}

#order-modal-overlay.hidden {
  display: none !important;
}


.modal-dialog {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  animation: fadeInModal 0.3s ease-out forwards;
}

.txt-einheit {
  font-size: 12px !important;
  font-weight: 500;
}


.modal-title1 {
  font-size: 18px;
  font-weight: bold;
  color:#c61932;		
}

/* Untertext */
.modal-subtext1 {
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
}

.modal-header-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}


.modal-form .modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-form .modal-label {
  flex: 1;
  font-weight: 500;
}

.modal-form .modal-field {
  flex: 1;
  text-align: right;
}

.modal-form .modal-field input,
.modal-form .modal-field select {
  width: 70%;
  max-width: 200px;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

/* ? Grundstil für den Tooltip */
.tooltip-box {
  background-color: #333;         /* Dunkler Hintergrund */
  color: #fff;                    /* Helle Schriftfarbe */
  padding: 10px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 260px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ? Aktivierung der Fade-In Animation */
.tooltip-box.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ?? Zeilenlayout: mehr Platz links, Preise rechts */
.tooltip-row {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2:1 Verhältnis für mehr Platz links */
  gap: 8px;
  margin: 4px 0;
}

/* ?? Zellenbasis */
.tooltip-cell {
  padding: 0 4px;
  overflow-wrap: break-word;
}

/* ?? Preise immer rechtsbündig */
.tooltip-row .tooltip-cell:last-child {
  text-align: right;
}

/* ?? Hervorhebung der letzten Zeile */
.highlight-row {
  background-color: #ccc;       /* Etwas heller für Kontrast */
  color: #152c52;               /* Auffälliges Gelb */
  font-weight: bold;
  padding: 4px;
  border-radius: 4px;
}


.expandable-card .info-row--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
z-index:100;	
  padding: 0 0px;
  box-sizing: border-box;
}


/* Grundzustand: Panel zugeklappt, Pfeil unverändert */
.expandable-card .info-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.expandable-card .info-toggle {
  display: inline-block;         /* nötig für transform */
  transition: transform 0.5s ease;
}

/* Zustand „open“: Panel ausgeklappt, Pfeil rotiert */
.expandable-card.expanded .info-content {
  max-height: 1500px;            /* groß genug für deinen Inhalt */
}

.expandable-card.expanded .info-toggle {
  transform: rotate(180deg);     /* ? ? ? */

}

.expandable-card {
  --info-card-gap: 0;
  margin-top: 20px;
 cursor: pointer;
z-index:100;
}

.contact-group {
  margin-bottom: 15px;
}

.contact-group:last-child {
  margin-bottom: 0;
}


.contact-group h4 {
  margin-bottom: 5px;
}
.contact-card {
  display: flex;
  align-items: center;
  background-color: #efefef;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;

}

.contact-card:last-child {
  margin-bottom: 0;
}

.contact-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}
.contact-info {
  font-size: 14px;
  color:#152c52;
}




.bestellung-card {
  position: relative;
  padding: 12px;
  background-color: #efefef;
  border-radius: 6px;
  margin-bottom: 10px;
}

.bestellung-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.bestellung-name {
  font-size: 15px;
  font-weight: bold;
  color: #152c52;
}

.bestellung-betrag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #152c52;
  white-space: nowrap;
}

.bestellung-details {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

.bestellung-card:first-child {
  margin-top: 10px;
}

.bestellung-footer {
  position: absolute;
  bottom: 11px;
  right: 11px;
  font-size: 12px;
  color: #555;
  font-weight: 500;
}









.user-nav {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.logout-toggle {
  background: transparent;
  border: none;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  display: inline-block;
  font-weight: bold;
  color: #152c52;
}


.user-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 11000;
  padding: 5px;             /* sorgt für Abstand innen */
  box-sizing: border-box;
}

.user-menu--visible {
  display: block;
}

.user-menu__link {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 14px;        
  font-family: inherit;
}

.user-menu__link:hover {
  background: #f5f5f5;
}

.user-menu__logout {
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: #c61932;
  color: white;
  text-align: center;
  cursor: pointer;
  border-radius: 0 0 4px 4px;
}

.user-menu__logout:hover {
  background: #c0392b;
}

.user-icon {
  margin-right: 0.5rem;
}


.topbar {
  z-index: 5000;    /* höher als nav-div (1000) */
}




/* Modal-Grundstruktur – an dein bestehendes Design anpassen */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6000;       /* Sich über der Topbar */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;

}

.hidden {
    opacity: 0;
  transform: translateY(-20px);
  visibility: hidden;
  pointer-events: none;
}

.is-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  width: 400px;
  max-width: 90%;
transition: transform 0.3s ease;
}

/* Wenn das Modal sichtbar ist, Content leicht ausfahren */
.modal:not(.hidden) .modal-content {
  transform: translateY(0);
}

/* Versteckter Anfangszustand des Contents */
.modal.hidden .modal-content {
  transform: translateY(-10px);
}


/* Formulargruppen: Label links, Input rechts */
.form-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}


.form-group input:focus {
  border-color: #007bff;  /* Beispiel-Farbe beim Fokussieren */
  outline: none;
}




.form-group label {
  flex: 1;
  text-align: left;
font-size: 14px;
}

.form-group input {
  flex: 1;
  text-align: left;
  padding: 0.5rem;
  font-size: 14px;
  /* Grauer Rahmen und Abrundung */
  border: 1px solid #ccc;
  border-radius: 4px;

  /* Optional: sanfte Übergänge */
  transition: border-color 0.2s ease-in-out;

}

/* Footer mit Abstand nach oben */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Beispiel-Button-Styles – ersetze durch deine Klassen */
.btn {
  padding: 0.5rem 0.7rem;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  background-color: #152c52;
  color: #fff;
  border: none;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: #333;
  border: none;
}





/* halbtransparentes Klon-Div */
.flying-clone {
  position: absolute;
  background: rgba(21, 44, 82, 0.2);
  pointer-events: none;
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.flying-clone.fly-end {
  opacity: 0.2;
}


.contact-name{
	color:#c61932;
	font-size:16px;
	font-weight:700;

}