/* ---------------------------------------------------------------------------
   Angebotsseiten (Pflichtaushang und kuenftige)

   Die Optik stammt 1:1 aus der urspruenglichen Insel-Seite
   (Produkte/Gewaehrleistungsaufsteller/Web/MEX-Bestellseite/styles.css + brand.css).

   Das Spaltenraster kommt jetzt von Divi: die Seite besteht aus normalen
   Sections, Zeilen und Text-Modulen, damit sie im Builder bearbeitbar bleibt.
   Hier steht deshalb nur noch, wie die Bausteine aussehen -- nicht mehr, wo sie
   liegen. Jede Section der Seite traegt die Klasse mex-pa; dort sind auch die
   Farben definiert.
   --------------------------------------------------------------------------- */

.mex-pa {
  --ink: #002149;
  --muted: #515151;
  --paper: #f7f5f0;
  --white: #fff;
  --accent: #b58a4f;
  --accent-dark: #8f6938;
  --line: #ddd8cf;
  --serif: 'MEX-Cormorant_Garamond', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'MEX-Montserrat', Montserrat, Arial, sans-serif;
}

/* --- Grundtypografie ------------------------------------------------------ */

body #page-container .mex-pa h1,
body #page-container .mex-pa h2,
body #page-container .mex-pa h3 {
  font-family: var(--serif) !important;
  font-weight: 400 !important;
  line-height: 1.04 !important;
  color: var(--ink) !important;
  margin-top: 0 !important;
}
body #page-container .mex-pa h1 {
  font-size: clamp(50px, 6vw, 83px) !important;
  letter-spacing: -.035em; margin-bottom: 24px !important;
}
body #page-container .mex-pa h2 {
  font-size: clamp(38px, 4.5vw, 60px) !important;
  letter-spacing: -.025em; margin-bottom: 20px !important;
}
body #page-container .mex-pa h3 {
  font-size: 28px !important;
  margin-bottom: 12px !important;
}
.mex-pa p,
.mex-pa li,
.mex-pa label,
.mex-pa small { font-family: var(--sans); }

.mex-pa .et_pb_text_inner > p:last-child { margin-bottom: 0; }

/* Vorzeile über den Überschriften */
.mex-pa-vorzeile p,
.mex-pa-vorzeile {
  color: var(--accent-dark) !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 20px !important;
}
.mex-pa-lead p,
.mex-pa-lead { font-size: 19px !important; color: var(--muted) !important; }

/* Schaltflaeche im Fliesstext (Hero, Quellenkasten) */
body #page-container .mex-pa a.mex-pa-knopf {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 15px 26px;
  margin-top: 16px;
}
body #page-container .mex-pa a.mex-pa-knopf:hover { background: var(--ink); }

/* --- Countdown-Karte ------------------------------------------------------ */

.mex-pa-countdown {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px;
  box-shadow: 0 10px 30px rgba(37, 31, 25, .07);
}
.mex-pa-countdown > div {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.mex-pa-countdown strong { font: 70px/1 var(--serif); color: var(--accent); }
.mex-pa-countdown span { font-weight: 800; }
.mex-pa-countdown p { color: var(--muted); margin: 18px 0 0 !important; }

/* Divi begrenzt Text-Module auf eine Lesebreite von 700px. Die Kaesten dieser
   Seite sollen ihre Spalte ausfuellen. */
body #page-container .mex-pa .et_pb_text,
body #page-container .mex-pa .et_pb_text_inner { max-width: none !important; }

/* Kacheln einer Zeile enden auf gleicher Hoehe, und der Spaltenabstand kommt
   von hier statt von Divis Standard-Gutter (der mit 70px zu gross waere). */
body #page-container .mex-pa-raster.et_pb_row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
body #page-container .mex-pa-raster > .et_pb_column {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  width: auto !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}
body #page-container .mex-pa-raster > .et_pb_column > .et_pb_module {
  flex: 1 1 auto;
  margin-bottom: 0;
}
/* Buendig: das Fakten-Raster ist im Original ein durchgehender Kasten mit
   Trennlinien, dort darf keine Luecke stehen. Ebenso die Ablauf-Spalten,
   deren Abstand aus dem Innenabstand kommt. */
body #page-container .mex-pa-raster--buendig.et_pb_row { gap: 0; }

/* --- Vier Fakten ---------------------------------------------------------- */

.mex-pa-fakt {
  border: 1px solid var(--line);
  border-right: 0;
  padding: 30px !important;
  height: 100%;
}
.mex-pa-fakt:last-of-type,
.et_pb_column:last-child .mex-pa-fakt { border-right: 1px solid var(--line); }
.mex-pa-fakt .mex-pa-nummer {
  display: block;
  color: var(--accent);
  font: 28px var(--serif);
  margin-bottom: 30px;
}
body #page-container .mex-pa-fakt h3 { font-size: 23px !important; }
.mex-pa-fakt p { color: var(--muted); margin-bottom: 0 !important; }

/* --- Quellenkasten -------------------------------------------------------- */

.mex-pa-quelle {
  background: var(--ink);
  color: #fff;
  padding: 32px 36px !important;
}
.mex-pa-quelle .mex-pa-label {
  display: block;
  font-size: 11px; letter-spacing: .17em; text-transform: uppercase;
  color: #d4b382; font-weight: 800;
}
body #page-container .mex-pa-quelle h3 { margin: 8px 0 10px !important; font-size: 30px !important; }
.mex-pa-quelle p { color: #ffffffb8; max-width: 760px; }
.mex-pa-quelle a {
  display: inline-block;
  background: var(--accent); color: #fff !important;
  text-decoration: none; padding: 14px 18px; font-weight: 700;
  margin-top: 18px;
}

/* --- Produktkacheln ------------------------------------------------------- */

.mex-pa-produkt {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px !important;
  height: 100%;
  position: relative;
}
.mex-pa-produkt--empfehlung { border-color: var(--accent); }
.mex-pa-produkt .mex-pa-badge {
  position: absolute; right: 12px; top: 12px;
  z-index: 3;
  background: var(--accent); color: #fff;
  text-transform: uppercase; font-size: 10px; letter-spacing: .12em;
  padding: 6px 9px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.mex-pa-produkt .mex-pa-kicker {
  display: block;
  font-size: 11px; text-transform: uppercase; letter-spacing: .15em;
  color: var(--accent-dark); font-weight: 800;
  margin-bottom: 4px;
}
.mex-pa-produkt > .et_pb_text_inner > p { color: var(--muted); }
.mex-pa-produkt ul {
  list-style: none; padding: 0 !important; margin: 22px 0 0 !important;
  border-top: 1px solid var(--line);
}
.mex-pa-produkt li {
  display: flex; justify-content: space-between;
  padding: 10px 0 !important; border-bottom: 1px solid var(--line);
}

/* --- Gezeichnete Produktbilder (Shortcode mex_produktbild) ---------------- */

.mex-pa-bild {
  height: 220px;
  background: #e9e5dc;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  overflow: hidden;
}
.mex-pa-bild.poster {
  display: flex; align-items: end; justify-content: center;
  gap: 10px; padding-bottom: 22px;
}
.mex-pa-bild.poster i {
  display: block;
  background: linear-gradient(#164a7a 0 22%, #fff 22%);
  box-shadow: 0 6px 15px #0002;
}
.mex-pa-bild.poster i:nth-child(1) { width: 115px; height: 163px; }
.mex-pa-bild.poster i:nth-child(2) { width: 84px;  height: 119px; }
.mex-pa-bild.poster i:nth-child(3) { width: 60px;  height: 85px; }

.mex-pa-bild.stand i {
  width: 120px; height: 170px;
  background: linear-gradient(#164a7a 0 22%, #fff 22%);
  position: relative;
  box-shadow: 0 6px 18px #0002;
}
.mex-pa-bild.stand i:after {
  content: ""; position: absolute;
  width: 60px; height: 15px; background: #8c6039;
  bottom: -12px; left: 50%; transform: translateX(-50%);
  border-radius: 2px;
}

.mex-pa-bild.sticker i {
  width: 125px; height: 176px;
  background: linear-gradient(#164a7a 0 22%, #fff 22%);
  box-shadow: 0 9px 20px #0002;
  transform: rotate(-5deg);
  position: relative;
}
.mex-pa-bild.sticker i:after {
  content: ""; position: absolute; right: 0; bottom: 0;
  border-style: solid; border-width: 0 0 28px 28px;
  border-color: transparent transparent #d5d0c5 transparent;
}

.mex-pa-preishinweis p { color: var(--muted); font-size: 14px !important; }

/* --- Ablauf (dunkler Abschnitt) ------------------------------------------- */

.mex-pa-ablauf { background: var(--ink); }
/* Die Ueberschriften erben ihre Farbe (color: inherit weiter oben), deshalb
   muss der Abschnitt selbst weiss sein -- sonst greift Divis Grau durch. */
body #page-container .mex-pa-ablauf,
body #page-container .mex-pa-ablauf .et_pb_text,
body #page-container .mex-pa-ablauf .et_pb_text_inner { color: #fff; }
body #page-container .mex-pa-ablauf .mex-pa-nummer { color: #d4b382; }
body #page-container .mex-pa-ablauf h1,
body #page-container .mex-pa-ablauf h2,
body #page-container .mex-pa-ablauf h3,
body #page-container .mex-pa-quelle h3 { color: #fff !important; }
.mex-pa-ablauf .mex-pa-vorzeile p,
.mex-pa-ablauf .mex-pa-vorzeile { color: #d4b382 !important; }
.mex-pa-schritt { padding-left: 40px !important; border-left: 1px solid #ffffff38; height: 100%; }
.et_pb_column:first-child .mex-pa-schritt { padding-left: 0 !important; border-left: 0; }
.mex-pa-schritt .mex-pa-nummer {
  display: block; font: 45px var(--serif); color: #d4b382;
}
body #page-container .mex-pa-schritt h3 { margin: 24px 0 12px !important; }
.mex-pa-schritt p { color: #ffffffaa; }
.mex-pa-schritt .mex-pa-termin {
  display: inline-block; margin-top: 14px;
  border: 1px solid #ffffff55; padding: 6px 10px;
}

/* --- Bestellabschnitt ----------------------------------------------------- */

.mex-pa-bestellung { background: #ebe8e0; }
.mex-pa-trust { display: grid; gap: 8px; margin-top: 34px; color: var(--muted); }
.mex-pa-b2b p,
.mex-pa-b2b {
  font-size: 13px !important; color: var(--muted) !important;
  border-left: 2px solid var(--accent); padding-left: 12px;
  margin-top: 18px !important;
}

/* --- Bestellformular ------------------------------------------------------ */

.mex-pa form {
  background: #fff; border: 1px solid var(--line);
  padding: 42px; box-shadow: 0 10px 35px #352a2010;
}
.mex-pa fieldset { border: 0; padding: 0; margin: 0 0 42px; }
.mex-pa fieldset:last-child { margin: 0; }
.mex-pa legend {
  font: 32px var(--serif); width: 100%;
  padding-bottom: 15px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mex-pa legend span {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font: 700 14px var(--sans); vertical-align: 5px; margin-right: 8px;
}
.mex-pa .order-line {
  display: grid; grid-template-columns: 1.25fr 1fr 90px 36px;
  gap: 12px; align-items: end;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.mex-pa label { display: grid; gap: 6px; color: #504c46; font-size: 13px; font-weight: 700; }
.mex-pa input,
.mex-pa select,
.mex-pa textarea {
  width: 100%; border: 1px solid #bdb7ad; border-radius: 2px;
  background: #fff; color: var(--ink); font: 16px var(--sans); padding: 12px;
}
.mex-pa input:focus,
.mex-pa select:focus,
.mex-pa textarea:focus { outline: 2px solid #c67a3b55; border-color: var(--accent); }
.mex-pa .remove-line,
.mex-pa .add-line { border: 0; background: none; color: var(--accent-dark); cursor: pointer; }
.mex-pa .remove-line { font-size: 28px; height: 46px; }
.mex-pa .add-line { padding: 15px 0; font-weight: 700; }
.mex-pa .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mex-pa .wide { grid-column: 1 / -1; }
.mex-pa .field-hint {
  margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted);
  font-weight: 400; background: var(--paper); padding: 12px 14px;
  border-left: 2px solid var(--accent);
}
.mex-pa .field-hint b { color: var(--ink); }
.mex-pa .summary { background: var(--paper); padding: 18px 22px; margin-bottom: 22px; }
.mex-pa .summary > div,
.mex-pa .summary #summary-lines > div {
  display: flex; justify-content: space-between; gap: 20px; padding: 7px 0;
}
.mex-pa .summary #summary-lines { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mex-pa .summary .total {
  font-size: 19px; border-top: 1px solid var(--line);
  margin-top: 8px; padding-top: 14px;
}
.mex-pa .check {
  grid-template-columns: 20px 1fr; align-items: start;
  font-weight: 400; line-height: 1.4;
}
.mex-pa .check input { width: auto; margin-top: 2px; }
.mex-pa .submit-button {
  width: 100%; border: 0; background: var(--accent); color: #fff;
  font: 700 16px var(--sans); padding: 16px; margin-top: 22px; cursor: pointer;
}
.mex-pa .submit-button:hover { background: var(--accent-dark); }
.mex-pa .fineprint { text-align: center; color: var(--muted); font-size: 12px; }
.mex-pa .form-error { color: #a22020; font-weight: 700; }
.mex-pa .honeypot { position: absolute !important; left: -9999px !important; }

/* --- Schmale Bildschirme -------------------------------------------------- */

@media (max-width: 980px) {
  /* Ab hier stapelt Divi die Spalten selbst -- die Flex-Regeln von oben
     muessen dafuer zurueckgenommen werden, sonst quetschen sich die Spalten
     nebeneinander weiter. */
  body #page-container .mex-pa-raster.et_pb_row { display: block; }
  body #page-container .mex-pa-raster > .et_pb_column {
    width: 100% !important;
    margin-bottom: 0 !important;
  }
  /* Trennlinien waren fuers Nebeneinander gedacht */
  .mex-pa-fakt { border-right: 1px solid var(--line); border-bottom: 0; }
  .mex-pa-fakt:last-of-type { border-bottom: 1px solid var(--line); }
  .mex-pa-schritt { padding-left: 0 !important; border-left: 0; padding-bottom: 34px !important; }
}

@media (max-width: 600px) {
  .mex-pa form { padding: 22px; }
  .mex-pa .order-line { grid-template-columns: 1fr 1fr; }
  .mex-pa .remove-line { grid-column: 2; justify-self: end; }
  .mex-pa .field-grid { grid-template-columns: 1fr; }
  .mex-pa .wide { grid-column: auto; }
  .mex-pa-quelle { padding: 24px !important; }
  .mex-pa-quelle a { white-space: normal; width: fit-content; }
}
