/* Desktop: einheitliche Stern-Größe und Zahl mittig ausrichten */
@media (min-width: 992px) {
  /* Exakte Linie: alles auf Baseline und gleiche Höhe */
  .company_left_details { align-items: baseline; }
}

/* Tablet (576px–991.98px): eigenes Layout, wie Desktop – Text UNTER dem Logo */
@media (min-width: 576px) and (max-width: 991.98px) {
  /* second_section: Logo | Name/Rating | Button (Tablet-Layout) */
  .second_inner_main_content {
    padding: 0 30px;
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr auto; /* Inhalt | Button */
    grid-auto-rows: auto;
    align-items: start;
    column-gap: 20px;
    row-gap: 8px; /* mehr vertikaler Abstand zwischen Logo und Text */
  }
  /* Logo: 154px wie Desktop und ~50% Überlappung aufs Banner (≈ -77px) */
  .second_inner_main_content .brand_logo {
    grid-column: 1; grid-row: 1;
    margin-top: -77px !important;
    z-index: 1 !important;
    justify-self: start;
    flex: 0 0 auto;
    /* Tablet: Container ebenfalls fix 154x154 */
    width: 154px;
    height: 154px;
    border-radius: 50%;
    overflow: hidden;
  }
  .second_inner_main_content .brand_logo img {
    /* Bild füllt den Container */
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    object-fit: cover; object-position: center center; display: block;
  }
  /* Container im Grid auflösen, damit Kinder (left/right) direkt positioniert werden */
  .second_inner_main_content .company_details { display: contents; }
  /* Textblock (Name + Bewertung) UNTER dem Logo anordnen */
  .second_inner_main_content .company_left_details { grid-column: 1; grid-row: 2; display: flex !important; flex-direction: column !important; align-items: flex-start !important; position: relative; z-index: 2; }
  /* Kind-Elemente im Textblock nicht zusätzlich im Grid positionieren */
  .second_inner_main_content .info_div { grid-column: auto; grid-row: auto; align-self: auto; }
  .second_inner_main_content .info_div h4 { margin: 0 0 2px 0; line-height: 1.15; white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
  /* Bewertung direkt unter dem Namen innerhalb des Textblocks */
  .second_inner_main_content .rating { grid-column: auto; grid-row: auto; align-self: start; margin: 0; display: flex; flex-direction: row; align-items: center; }
  .second_inner_main_content .rating .rating_img img { width: 16px; height: 16px; vertical-align: middle; }
  /* WICHTIG: Stern-Container selbst auf 16px, sonst bleibt Box 20px hoch */
  .second_inner_main_content .rating .rating_img .star { width: 16px; height: 16px; }
  .second_inner_main_content .rating h5 { margin: 0 0 0 6px; line-height: 16px; height: 16px; display: inline-flex; align-items: center; font-size: 16px; }
  /* Button: rechts (Spalte 2) und vertikal bündig mit dem Firmennamen (oberhalb der Bewertung) */
  .second_inner_main_content .company_right_details { grid-column: 2; grid-row: 2; align-self: start; justify-self: end; }
}

/* Shopprofil – Seitenbezogene Styles */

:root {
  --black: #000000;
  --white: #ffffff;
  --border: #E2E8F0;
  --body: #F0F2F7;
}

/* Container */
.cust_container { max-width: 1390px; margin: 0 auto; padding: 0 15px; }
.cust_container_two { max-width: 1247px; margin: 0 auto; padding: 0 15px; }

/******************************* second_section *******************************/
.second_section { padding: 32px 0 10px !important; }
.second_inner_section { width: 100%; height: auto; background-color: var(--white); border: 1px solid var(--border); border-radius: 20px; padding-bottom: 30px; }
.second_inner_banner { position: relative; }
.second_inner_banner img {
  width: 100%;
  max-width: 1360px; /* verhindert Upscaling über die native Breite */
  height: 250px;
  object-fit: cover;
  display: block;
  margin: 0 auto; /* zentrieren, wenn Container breiter ist */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}
.second_inner_main_content .brand_logo {
  position: relative;
  margin-top: -96px;
  z-index: 2;
  text-align: left;
  flex: 0 0 auto;
  /* Desktop: Container quadratisch fixieren und runden Rahmen setzen */
  width: 154px;
  height: 154px;
  border-radius: 50%;
  overflow: hidden;
}
.brand_logo img {
  /* Bild füllt den Container exakt und bleibt zentriert, kreisförmig maskiert */
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center center;
  display: block;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  border: 3px solid #fff;
}
.second_inner_main_content { padding: 0 40px; margin-top: 16px; }
.company_left_details { display: flex; flex-direction: row; align-items: center; }
.second_inner_main_content .company_left_details { margin-top: 24px; }
.company_left_details h4 { font-family: 'OpenSans-Bold'; font-size: 22px; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company_left_details h5 { color: #696969; font-size: 16px; font-weight: normal; }
.rating { margin: 0 10px 0 22px; display: flex; align-items: center; }
.rating_img { display: flex; align-items: center; }
.rating_img img { vertical-align: middle; display: inline-block; }
.rating_img .star { position: relative; display: inline-block; width: 20px; height: 20px; line-height: 0; vertical-align: middle; margin-right: 2px; }
.rating_img .star__base { width: 100%; height: 100%; display: block; }
.rating_img .star__fill { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; display: block; width: 0; }
.rating_img .star--full .star__fill { width: 100%; }
.rating_img .star--half .star__fill { width: 50%; }
.rating_img .star--empty .star__fill { width: 0; }
.company_left_details h4 { line-height: 1.2; margin: 0; }
.rating h5 { line-height: 1.2; margin-left: 8px; }
.company_details { display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.company_right_details { display: flex; flex-direction: row; align-items: center; background-color: #F1F5F9; border-radius: 30px; padding: 10px 12px; cursor: pointer; }
.company_right_details img { margin-right: 14px; }
.company_right_details span { color: #62748E; }

/******************************* third_section *******************************/
.third_section { padding-bottom: 10px !important; }
.third_inner_section { padding: 28px 28px; background-color: var(--white); border: 1px solid var(--border); border-radius: 20px; display: flex; flex-direction: row; align-items: flex-start; column-gap: 24px; justify-content: space-between; }
.third_inner_left_section h4 { font-family: 'OpenSans-Bold'; font-size: 20px; }
.certification_section { margin-top: 32px; display: flex; flex-direction: row; align-items: center; column-gap: 24px; row-gap: 0; }
.certificate_content h5 { color: #696969; font-size: 16px; }
.certificate_content h3 { font-family: 'OpenSans-Bold'; font-size: 42px; margin: 8px 0; }
.valid_box { padding: 8px 12px; background-color: #E8F1D6; border: 1px dotted #8AB933; border-radius: 30px; display: inline-flex; align-items: center; }
.valid_box span { margin-left: 4px; font-size: 12px; }
.manufacturer-certs { margin-top: 40px; }
/* Nur Herstellerzertifizierungs-Block zentrieren (Überschrift + Liste) */
.third_section .manufacturer-certs { text-align: left; }
.third_section .manufacturer-certs-list { align-items: flex-start; }
.third_section .manufacturer-certs-item { justify-content: flex-start; }
/* Höher priorisierte Regel innerhalb des linken Zertifikat-Blocks */
.third_inner_left_section .manufacturer-certs { margin-top: 56px !important; }
.third_inner_left_section .manufacturer-certs h4 { color: var(--black); font-size: 18px !important; font-weight: 700; line-height: 1.2; margin: 0 0 10px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; font-family: 'OpenSans-Bold', 'Open Sans', 'Roboto', sans-serif; }
.third_inner_left_section .manufacturer-certs h4 .cert-title-icon { display:inline-flex; width:32px; height:32px; }
.third_inner_left_section .manufacturer-certs h4 .cert-title-icon img { width:32px !important; height:32px !important; display:block; }
.manufacturer-certs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.manufacturer-certs-item { display: inline-flex; align-items: center; gap: 8px; background: #f7f9fe; border: 1px solid #E2E8F0; border-radius: 10px; padding: 6px 10px; }
.manufacturer-certs-item img { height: 28px; width: auto; max-width: 120px; object-fit: contain; display: block; }

/* Mobile-Optimierung: größeres Icon und ggf. zusätzlicher Abstand */
@media (max-width: 576px) {
  .third_inner_left_section .manufacturer-certs { margin-top: 64px !important; }
  .third_inner_left_section .manufacturer-certs h4 { font-size: 18px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .third_inner_left_section .manufacturer-certs h4 .cert-title-icon,
  .third_inner_left_section .manufacturer-certs h4 .cert-title-icon img { width:32px !important; height:32px !important; }
  /* Herstellerzertifizierungen: Text einzeilig mit Ellipsis */
  .manufacturer-certs-list { width: 100%; }
  .manufacturer-certs-item { width: 100%; max-width: 100%; }
  .manufacturer-certs-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
}

@media (min-width: 577px) and (max-width: 1199.98px) {
  /* Tablet: etwas mehr Abstand als Desktop */
  .third_inner_left_section .manufacturer-certs { margin-top: 0 !important; }
  /* Dritte Sektion als Grid: links Zertifikat, rechts Herstellerzertifizierung; darunter Features über volle Breite */
  .third_section .third_inner_section { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "cert manuf"
      "features features";
    align-items: start;
    column-gap: 24px;
    row-gap: 16px;
  }
  /* Linke Spalte auflösen, damit Kinder Grid-Items werden */
  .third_section .third_inner_left_section { display: contents; }
  .third_section .certification_section { grid-area: cert; }
  .third_section .manufacturer-certs { grid-area: manuf; }
  .third_section .third_inner_right_section { 
    grid-area: features;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    column-gap: 16px;
    row-gap: 16px;
  }
  /* In 2-Spalten-Kachelansicht: Überschriften dürfen auf 2 Zeilen umbrechen */
  .third_section .third_inner_right_section .third_inner_right_section_box_contant h4 {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  /* Nur Tablet: Herstellerzertifizierung mittig ausrichten (Überschrift + Liste + Items) */
  .third_section .manufacturer-certs { text-align: center; }
  .third_section .manufacturer-certs-list { align-items: center; }
  .third_section .manufacturer-certs-item { justify-content: center; }
  .third_inner_left_section .manufacturer-certs h4 { justify-content: center; }
}

/* Fallback für schmale Tablets: unter 820px nur 2 Spalten für die 4 Kacheln */
@media (min-width: 577px) and (max-width: 819.98px) {
  .third_section .third_inner_right_section {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
.manufacturer-certs-item span { font-size: 14px; color: #3b4759; }
.third_section .third_inner_left_section { flex: 0 0 33.333%; max-width: 33.333%; display: flex; flex-direction: column; min-width: 0; }
.third_section .third_inner_right_section { flex: 0 0 66.666%; max-width: 66.666%; padding: 23px 29px; border: 1px solid #E2E8F0; background-color: #F7F9FE; border-radius: 20px; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 16px; row-gap: 32px; min-width: 0; }
.third_inner_right_section_box_contant { padding-top: 30px; }
.third_inner_right_section_box_contant h4 { font-size: 18px; padding-bottom: 10px; font-weight: 700; line-height: 1.2; font-family: 'OpenSans-Bold', 'Open Sans', 'Roboto', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.third_inner_right_section_box_contant p { color: #90A1B9; font-size: 14px; width: 100%; max-width: 225px; }

/* Desktop: Wenn Überschriften zu lang sind, können wir per Klasse auf 2 Spalten reduzieren */
@media (min-width: 992px) {
  .third_section .third_inner_right_section.features-2col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Wenn 2-Spalten erzwungen sind (Desktop): ebenfalls 2-zeilige Überschriften erlauben */
  .third_section .third_inner_right_section.features-2col .third_inner_right_section_box_contant h4 {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/******************************* fourth_section *******************************/
.fourth_section { padding-bottom: 10px !important; }
.fourth_inner_section { display: flex; flex-direction: row; column-gap: 20px; row-gap: 10px; }
.fourth_box { width: 100%; padding: 28px 28px; background-color: var(--white); border-radius: 20px; border: 1px solid #8AB933; }
.without_border { border: 1px solid #E2E8F0; }
.custom-dropdown-container { margin-bottom: 20px; }
.custom-dropdown-container label { font-family: 'OpenSans-SemiBold'; display: block; font-size: 14px; margin-bottom: 6px; color: var(--black); }
.custom-dropdown { position: relative; width: 100%; border: 1px solid #90A1B9; border-radius: 6px; background-color: var(--white); cursor: pointer; }
.custom-dropdown .selected { padding: 10px 14px; font-size: 14px; color: #62748E; position: relative; display: flex; justify-content: space-between; align-items: center; }
.custom-dropdown .arrow { display: inline-block; width: 8px; height: 8px; border-right: 1.5px solid #666; border-bottom: 1.5px solid #666; transform: rotate(45deg); transition: transform 0.3s ease; margin-left: 10px; margin-top: -1px; }
.custom-dropdown.open .arrow { transform: rotate(-135deg); margin-top: 4px; }
.custom-dropdown .dropdown-options { display: none; position: absolute; top: 100%; left: 0; right: 0; border: 1px solid #ccc; border-top: none; border-radius: 6px; background-color: #fff; z-index: 10; max-height: 180px; overflow-y: auto; margin-top: 1px; }
.custom-dropdown .dropdown-options li { padding: 10px 14px; font-size: 14px; color: #333; }
.custom-dropdown .dropdown-options li:hover { background-color: #f0f0f0; }
.custom-dropdown.open .dropdown-options { display: block; }
.form_section { padding: 32px 0 0; }
.form_box { margin-bottom: 24px; }
.form_submit { font-family: 'OpenSans-SemiBold'; background-color: #8AB933; color: var(--white); font-size: 18px; padding: 14px 40px; border-radius: 15px; border: 0; }
.icons_section { display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.phone_img { text-align: center; margin-top: 16px; }
.phone_img img { width: 55%; }
.phone_name h3 { font-family: 'OpenSans-Bold'; color: var(--black); font-size: 18px; padding-top: 30px; }
.secure_offer .form_submit { width: 100%; margin-top: 20px; padding: 12px 40px; }

/******************************* fifth_section *******************************/
.fifth_section { padding-bottom: 10px !important; }
.fifth_inner_section { padding: 28px 28px; background-color: var(--white); border: 1px solid var(--border); border-radius: 20px; }
.fifth_section .third_inner_left_section p { padding: 27px 0; font-size: 16px; color: #666666; width: 100%; max-width: none; overflow-wrap: anywhere; }
.contact_section { display: flex; flex-direction: row; align-items: center; }
.contact_box { display: flex; align-items: center; padding: 0 10px; border-right: 1px solid #4A5565; }
.contact_box:nth-child(1) { padding-left: 0; }
/* Kein Trennstrich NACH dem letzten Element (Website); Trennstrich soll davor erscheinen */
.contact_section .contact_box:last-child { border-right: none; }
.contact_box span { font-family: 'OpenSans-Regular'; font-size: 16px; margin-left: 4px; }
/* Icon-Größe im Kontaktbereich (Desktop) */
.contact_box img { width: 18px; height: 18px; }
.loaction_section { padding-top: 45px; display: flex; flex-direction: row; justify-content: space-between; column-gap: 32px; row-gap: 10px; }
.location_section_right_box { flex-grow: 1; width: 20%; }
.location_section_left_box { width: 50%; flex-grow: 1; }
.location_section_left_box_contant { padding-top: 20px; }
.location_section_left_box_contant .map img { width: 100%; height: auto; object-fit: cover; border-radius: 30px; }
.map-wrapper { border-radius: 16px; overflow: hidden; border: 2px solid #c4e8b2; background-color: #e9fbe4; box-shadow: 0 4px 8px rgba(0, 128, 0, 0.05); }
/* Überschriften in Standort/Öffnungszeiten: einzeilig mit Ellipsis */
.location_section_left_box .third_inner_left_section h4,
.location_section_right_box .third_inner_left_section h4 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Öffnungszeiten */
.opening-hours { display: flex; flex-direction: column; gap: 8px; }
.day { padding: 10px 14px; border: 1px solid #E2E8F0; border-radius: 8px; background-color: var(--white); color: #90A1B9; cursor: pointer; transition: 0.3s; text-align: center; margin-bottom: 8px; }
.day:hover { background-color: #f0f0f04a; }
.day.active { background-color: #EDF5E0; color: #8AB933; border: 1px solid #8AB933; }
.day.today { background-color: #EDF5E0; color: #8AB933; border: 1px solid #8AB933; }
/* Tabellenvariante (Util::getOpeningTimes) */
.opening-hours-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.opening-hours-table tr td { padding: 8px 12px; vertical-align: top; }
.opening-hours-table tr td:first-child { color: #62748E; width: 40%; }
.opening-hours-table tr td:last-child { color: #90A1B9; }
.opening-hours-table tr.today td { background-color: #EDF5E0; color: #3d5f11; border-top: 1px solid #8AB933; border-bottom: 1px solid #8AB933; }
.opening-hours-table tr.today td:first-child { border-left: 1px solid #8AB933; border-top-left-radius: 8px; border-bottom-left-radius: 8px; color: #3d5f11; font-weight: 600; }
.opening-hours-table tr.today td:last-child { border-right: 1px solid #8AB933; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/******************************* sixth_section (Galerie) *******************************/
.sixth_section { padding-bottom: 10px !important; }
.sixth_inner_section { padding: 28px 28px; background-color: var(--white); border: 1px solid var(--border); border-radius: 20px; }
.gallery-section { padding: 20px; border-radius: 12px; background-color: #f9fbfd; box-shadow: 0 0 8px rgba(0, 0, 0, 0.04); }
.gallery-carousel { padding-top: 20px; }
.gallery-carousel .gallery-item img { border-radius: 24px; width: 100%; object-fit: cover; }
.custom-prev, .custom-next { z-index: 9; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s ease; background-color: transparent; border: none; }
.custom-prev { left: -20px; }
.custom-next { right: -20px; }
.owl-nav { display: none !important; }
.slider_arrow { display: flex; flex-direction: row; align-items: center; position: relative; z-index: 5; }
.slider_arrow button { background: transparent; border: 0; pointer-events: auto; }
.slider_arrow button:focus { outline: none; }
.slider_title { display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
/* Fallback, wenn Owl deaktiviert ist */
.gallery-fallback { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
/* Kacheln nebeneinander: 320x320 px */
.gallery-fallback .gallery-item {
  flex: 0 0 auto;
  width: 320px;
  height: 320px;
  border-radius: 24px; /* gleiche runde Ecken wie Owl */
  overflow: hidden;    /* damit Ecken auch fürs Bild greifen */
}
.gallery-fallback .gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

/******************************* Modal *******************************/
.info_modal .modal-body img { width: 100%; }
.modal_close { position: absolute; top: 0; right: 0; transform: translate(50%, -50%); background: #fff; border-radius: 100%; }
.modal_close img { width: 30px; cursor: pointer; }
.info { width: 25px; cursor: pointer; margin-left: 5px; }
.info_div { display: flex; align-items: center; }

/******************************* Responsive *******************************/
@media (max-width: 1399.98px) {
  .second_section { padding: 22px 0 10px !important; }
  .third_inner_section { column-gap: 30px; padding: 15px 15px; }
  .certification_section { column-gap: 24px; margin-top: 20px; }
  .certificate_content h3 { font-size: 34px; }
  .fourth_box, .fifth_inner_section, .sixth_inner_section { padding: 15px 15px; }
  .form_box { margin-bottom: 18px; }
  .fifth_section .third_inner_left_section p { padding: 18px 0; }
}

@media (max-width: 1199.98px) {
  .third_inner_right_section_box_contant { padding-top: 20px; }
  .fourth_inner_section { column-gap: 10px; }
  .fifth_section .third_inner_left_section p { padding: 14px 0; }
  /* Punkte untereinander bis 1200px erzwingen */
  .third_section .third_inner_right_section { grid-template-columns: 1fr !important; row-gap: 20px; }
}

/* Desktop/Tablet (≥992px): Sektionen kompakter setzen */
@media (min-width: 992px) {
  .second_section { padding: 20px 0 10px !important; }
  .third_section, .fourth_section, .fifth_section, .sixth_section { padding: 16px 0 10px !important; }
}

@media (max-width: 575.98px) {
  /* Kompakter: Vertikale Abstände zwischen den Sections reduzieren */
  .second_section { padding: 10px 0 0 !important; }
  /* Grid-Layout: Logo links, rechts daneben Name und Bewertung; Button darunter */
  .second_inner_main_content { padding: 0 20px; margin-top: 10px; display: grid; grid-template-columns: 96px 1fr; grid-auto-rows: auto; column-gap: 18px; row-gap: 0; align-items: start; }
  .second_inner_main_content .brand_logo {
    /* Mobile: Container fix 96x96 und rund, Überlappung wie definiert */
    width: 96px; height: 96px;
    border-radius: 50%; overflow: hidden;
  }
  .brand_logo img {
    /* Bild füllt den Container */
    width: 100% !important; height: 100% !important;
    aspect-ratio: 1 / 1; border-radius: 50% !important;
    object-fit: cover; object-position: center center; display: block;
  }
  .company_details { flex-direction: column; align-items: flex-start; margin-top: 10px; }
  .company_right_details { margin-top: 25px; }
  .second_inner_banner img { object-fit: cover; }
  /* Logo soll nur ~20% in das Banner hineinragen: 20% von 96px ≈ 19px */
  .second_inner_main_content .brand_logo { margin-top: -19px; }
  .second_inner_main_content .company_left_details { margin-top: 0; }
  .third_inner_section { flex-direction: column; align-items: flex-start; column-gap: 0; row-gap: 16px; }
  /* Punkte untereinander: unter 992px auf 1 Spalte */
  .third_section .third_inner_left_section,
  .third_section .third_inner_right_section { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
  .third_inner_right_section { margin-top: 0; grid-template-columns: 1fr; }
  .third_section, .fourth_section, .fifth_section, .sixth_section { padding: 8px 0 0 !important; }
  .fourth_inner_section { flex-direction: column; }
  .form_section { padding: 20px 0 0; }
  .custom-dropdown-container { margin-bottom: 10px; }
  .form_submit { font-size: 16px; padding: 12px 35px; }
  .loaction_section { flex-direction: column; padding-top: 30px; }
  .location_section_left_box, .location_section_right_box { width: 100%; }
  /* Bis 575px: Rating unter dem Namen, aber Zahl neben den Sternen in einer Zeile */
  .company_left_details { flex-direction: column; align-items: flex-start; }
  .company_left_details .info_div { order: 1; }
  .company_left_details .info_div h4 { margin-bottom: 0; }
  .company_left_details .rating { order: 2; width: 100%; flex-basis: 100%; margin: 1px 0 0 0; display: flex; flex-direction: row; align-items: center; }
  .second_inner_main_content .rating h5 { margin: 0 0 0 6px; line-height: 16px; height: 16px; display: inline-flex; align-items: center; font-size: 16px; }
  .company_left_details .rating .rating_img { order: 0; }
  .company_left_details .rating .rating_img img { width: 14px; height: 14px; }
  /* Stern-Container in Mobile auf 14px setzen, damit Höhe exakt zur Zahl passt */
  .company_left_details .rating .rating_img .star { width: 14px; height: 14px; }
  /* Grid-Passung: Inhalte von Zwischen-Containern in den Eltern-Grid heben */
  .second_inner_main_content .company_details { display: contents; }
  .second_inner_main_content .company_left_details { display: contents; }
  /* Platzierung im Grid */
  .second_inner_main_content .brand_logo { grid-column: 1; grid-row: 1 / span 2; }
  /* Reihenfolge: 1) Firmenname, 2) Bewertung (Sterne+Zahl) – beide rechts neben dem Logo */
  .second_inner_main_content .info_div { grid-column: 2; grid-row: 1; align-self: end; }
  .second_inner_main_content .rating { grid-column: 2; grid-row: 2; margin: 0; align-self: start; }
  /* Company-Name näher an die Sterne und mehrzeilig zulassen */
  .second_inner_main_content .info_div h4 {
    margin: 0; /* kein Abstand zwischen Name und Bewertung */
    line-height: 1.15; /* kompakter */
    white-space: normal; /* Zeilenumbruch erlauben */
    overflow: visible;
    text-overflow: clip;
    max-width: none; /* Begrenzung aufheben */
    word-break: break-word;
    display: -webkit-box;
    line-clamp: 2; /* Standard-Eigenschaft für kompatible Umgebungen */
    -webkit-line-clamp: 2; /* bis zu 2 Zeilen */
    -webkit-box-orient: vertical;
  }
  /* Button über die gesamte Breite (wie zuvor) */
  .second_inner_main_content .company_right_details { grid-column: 1 / -1; grid-row: 3; align-self: stretch; width: 100%; display: block; text-align: center; }
  /* Button kompakter */
  .company_right_details { padding: 8px 10px; }
  .company_right_details span { font-size: 13px; }
  .company_right_details img { width: 16px; height: 16px; margin-right: 10px; }
}

@media (max-width: 575.98px) {
  .slider_arrow button img { width: 28px; height: 28px; }
  .company_left_details h4 { font-size: 20px; }
  /* Mobile: Rating unter dem Namen, Zahl neben den Sternen in einer Zeile */
  .company_left_details { flex-direction: column; align-items: flex-start; }
  .company_left_details .info_div { order: 1; }
  .company_left_details .rating { order: 2; width: 100%; flex-basis: 100%; margin: 2px 0 0 0; display: flex; flex-direction: row; align-items: center; }
  .company_left_details .rating h5 { order: 0; margin: 0 0 0 6px; line-height: 14px; display: inline-flex; align-items: center; }
  .company_left_details .rating .rating_img { order: 0; }
  .company_left_details .rating .rating_img img { width: 14px; height: 14px; }
  /* Stern-Container auch in diesem Mobile-Block auf 14px fixieren */
  .company_left_details .rating .rating_img .star { width: 14px; height: 14px; }
  /* Option 1: Banner vollständig sichtbar (kein Beschnitt, ggf. Letterboxing) */
  .second_inner_banner img {
    height: auto;
    aspect-ratio: 1360 / 250; /* 5.44:1 */
    object-fit: contain;
  }
  .company_left_details .info_div h4 { margin-bottom: 0; }
  /* Punkte (third inner right) untereinander */
  .third_inner_right_section { grid-template-columns: 1fr; }
  /* Kontaktangaben: untereinander und ohne Trennstrich */
  .fifth_section .contact_section { display: block; }
  .fifth_section .contact_section .contact_box { display: flex; align-items: center; gap: 8px; border: none !important; margin: 6px 0; padding: 0; }
  .fifth_section .contact_section .contact_box img { width: 18px; height: 18px; }
}

/* Desktop-Overrides (am Ende platziert, damit sie greifen):
   Name, Sterne und Zahl in einer Linie (zentriert) und konsistente Größen */
@media (min-width: 992px) {
  .company_left_details { align-items: center; flex-direction: row; }
  .rating { align-items: center; flex-direction: row; flex-wrap: nowrap; }
  /* Reihenfolge sicherstellen */
  .rating .rating_img { order: 0; }
  .rating h5 { order: 0; }
  /* Konsistente Größen und vertikale Ausrichtung */
  /* Sterne-Größe NICHT anfassen; nur Zahl sauber ausrichten */
  .rating_img img { vertical-align: middle; display: inline-block; }
  .rating h5 { margin: 0 0 0 8px; display: inline-flex; align-items: center; line-height: 1; }
  /* Desktop: Firmennamen auf 2 Zeilen begrenzen; nur Überlänge geht in Zeile 2, danach Ellipsis */
  .company_left_details h4 {
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2; /* Standard-Eigenschaft */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  /* Third-Section: 1/3 (links, zentriert) + 2/3 (rechts, 2 Spalten) nebeneinander */
  .third_inner_section { flex-direction: row; align-items: flex-start; justify-content: space-between; column-gap: 24px; row-gap: 0; }
  .third_section .third_inner_left_section { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 0 0 33.333%; max-width: 33.333%; }
  /* Rechts: 2 Spalten in Tablet ERZWINGEN (überschreibt 1-Spalten-Regel <=1199px) */
  .third_section .third_inner_right_section { flex: 0 0 66.666%; max-width: 66.666%; display: grid !important; grid-template-columns: repeat(2, 1fr) !important; column-gap: 16px; row-gap: 16px; justify-items: stretch; align-items: stretch; box-sizing: border-box; max-width: 66.666%; overflow: hidden; }
  /* Jedes Kind darf schrumpfen und bleibt in seiner Zelle */
  .third_section .third_inner_right_section > .third_inner_right_section_box { grid-column: auto / span 1; width: 100% !important; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .third_section .third_inner_right_section > .third_inner_right_section_box * { min-width: 0; }
  /* Bilder und Medien responsiv innerhalb der Karten halten */
  .third_section .third_inner_right_section_box img { max-width: 100%; height: auto; display: block; }
  .certification_section { flex-direction: column; align-items: center; column-gap: 0; row-gap: 12px; margin-top: 16px; text-align: center; }
  /* Rechts: Boxen-Content spacing */
  .third_inner_right_section_box_contant { padding-top: 0; }
  /* Fifth-Section (Sales): "Aktuelle Angebote" linksbündig in Tablet */
  .fifth_section .third_inner_left_section { align-items: flex-start; text-align: left; }

  /* Tablet: Kontaktbereich zurück auf Ursprung (eine Zeile, Flex, mit Trennstrichen) */
  .fifth_section .third_inner_left_section { width: auto; }
  .fifth_section .contact_section { width: auto; display: flex !important; flex-direction: row; align-items: center; column-gap: 0; row-gap: 0; }
  .fifth_section .contact_section .contact_box { display: flex; align-items: center; padding: 0 10px; border-right: 1px solid #4A5565; min-width: auto; box-sizing: content-box; }
  .fifth_section .contact_section .contact_box:first-child { padding-left: 0; }
  .fifth_section .contact_section .contact_box:last-child { border-right: none; }
}

/* Backend: Shop-Galerie – Upload-Grid & Thumbs */
.shop-gallery-list, #shopGalleryList {
  /* Kompakte Kachelansicht: 50x50 nebeneinander */
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}

.shop-gallery-item {
  position: relative;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  width: 50px;   /* feste Breite */
  height: 50px;  /* feste Höhe */
}

.shop-gallery-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #f8fafc;
}

/* Kompaktansicht im Backend: kleine Thumbs 50x50 für die Upload-Liste */
#shopGalleryList .shop-gallery-thumb {
  width: 50px;
  height: 50px;
  aspect-ratio: auto;
}

/* Fallback: Falls Items ohne Wrapper/Thumb kommen (serverseitig gerendert) */
#shopGalleryList img {
  width: 50px !important;
  height: 50px !important;
  object-fit: cover;
  display: block;
}

.shop-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  border: none;
  background: rgba(11, 34, 57, 0.85);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}

.shop-gallery-remove:hover {
  background: rgba(200, 30, 30, 0.95);
}

.shop-gallery-remove:focus {
  outline: 2px solid #ff9800;
  outline-offset: 2px;
}

/* Fortschrittsanzeige im Backend vereinheitlichen */
#progressGallery { display: none; margin-top: 8px; height: 8px; border-radius: 8px; overflow: hidden; background: #e6eef7; }
#progressGallery .progress-bar { background: linear-gradient(90deg, #8AB933, #6fa113); }

/* Backend: Cropper-Modal-Styles (aus Template ausgelagert) */
/* Body scrollbar + feste maximale Höhe, damit Footer-Buttons sichtbar bleiben */
#cropperModalBanner .modal-body,
#cropperModal .modal-body {
  max-height: calc(100vh - 200px);
  overflow: auto;
}

#cropperModalBanner .cropper-wrapper,
#cropperModal .cropper-wrapper {
  width: 100%;
  max-height: 70vh;
  min-height: 300px;
  position: relative;
}

#cropperModalBanner img,
#cropperModal img {
  max-width: 100%;
  height: auto;
  display: block;
}

#cropperModalBanner .cropper-container,
#cropperModal .cropper-container {
  max-width: 100% !important;
  z-index: 1 !important;
}

/* Footer immer oben halten und klickbar machen */
#cropperModalBanner .modal-footer,
#cropperModal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 1060;
  background: #fff;
}

/* Sicherheitsnetz gegen evtl. pointer-events Probleme aus globalem CSS */
#cropperModalBanner,
#cropperModal { pointer-events: auto; }

#cropperModalBanner .modal-content,
#cropperModal .modal-content { pointer-events: auto; }

/* Z-Index gezielt erhöhen, ohne globales Modal-Verhalten zu stören */
#cropperModalBanner { z-index: 20020; }
#cropperModal { z-index: 20010; }

/* Backdrop soll keine Klicks abfangen (nur abdunkeln) */
body.modal-open .modal-backdrop { pointer-events: none; }

/* Tablet-Override (577px–1199.98px) – gewinnt durch Position am Dateiende:
   Zertifikat links, Herstellerzertifizierung rechts; darunter Features in 4 Spalten */
@media (min-width: 577px) and (max-width: 1199.98px) {
  .third_section .third_inner_section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* Links: Titel, Zertifikat, Herstellerzertifizierung untereinander
       Rechts: Features in zwei Spalten über volle Höhe */
    grid-template-areas:
      "left_title features"
      "cert       features"
      "manuf      features" !important;
    align-items: start !important;
    column-gap: 24px; row-gap: 16px;
  }
  .third_section .third_inner_left_section { display: contents !important; }
  /* Überschrift links oben positionieren */
  .third_section .third_inner_left_section > h4:first-of-type { grid-area: left_title !important; margin-top: 0 !important; }
  .third_section .certification_section { grid-area: cert !important; margin-top: 0 !important; }
  /* Herstellerzertifizierung bleibt links unter dem Zertifikat */
  .third_section .manufacturer-certs { grid-area: manuf !important; margin-top: 16px !important; }
  .third_section .third_inner_right_section {
    grid-area: features !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* zwei nebeneinander */
    column-gap: 16px; row-gap: 16px; width: 100% !important; max-width: 100% !important;
  }
}
