/* ═══════════════════════════════════════════════
   AMQ Templates – Matratzenfinder Result
   Pixel-perfect 1:1 match with production layout
   ═══════════════════════════════════════════════ */

/* ---------- Reset / Base ---------- */
.amq-tpl-mf-result {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #2E2D2C;
  background: transparent;
  padding: 0;
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
}

.amq-tpl-mf-result *,
.amq-tpl-mf-result *::before,
.amq-tpl-mf-result *::after {
  box-sizing: border-box;
}

/* Hide parent page heading and original navigation */
#matratzen-finder-bg > .mf-main-header,
.mf-main-header,
#matratzen-finder.result-screen-active .mf-navigation {
  display: none !important;
}

/* Force gray page background on result area (production uses #f3f4f7) */
#matratzen-finder.result-screen-active,
#matratzen-finder,
#matratzen-finder-bg {
  background-color: #f3f4f7 !important;
  background: #f3f4f7 !important;
}

/* ---------- Grid Layout ---------- */
.mf-result__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  column-gap: 20px;
  border-radius: 7px;
}

/* ---------- Right Column Wrapper ---------- */
.mf-result__right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ---------- Gallery (Left) ---------- */
.mf-result__gallery {
  background: #fff;
  border-radius: 7px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  top: -55px;
  min-width: 0;
  overflow: visible;
  align-self: start !important;
}

.mf-result__gallery-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.mf-result__main-image {
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mf-result__main-image img {
  max-width: 100%;
  max-height: 650px;
  object-fit: contain;
  border-radius: 7px;
}

.mf-result__gallery-overlay {
  position: absolute !important;
  bottom: 24px;
  left: 0;
  display: flex;
  padding: 4px 16px;
  align-items: center;
  gap: 8px;
  border-radius: 0 5px 5px 0;
  background: #003466;
  color: #FFF;
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  max-width: 303px;
  z-index: 10;
}

/* Hidden gallery source */
.mf-result__gallery-source,
.mf-result__gallery-source * {
  display: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* Hide leaked Swiper elements in gallery column */
.mf-result__gallery .swiper,
.mf-result__gallery .image-slider,
.mf-result__gallery .swiper-wrapper,
.mf-result__gallery .swiper-slide,
.mf-result__gallery .swiper-zoom-container,
.mf-result__gallery .swiper-button-prev,
.mf-result__gallery .swiper-button-next,
.mf-result__gallery .image-swiper-pagination {
  display: none !important;
}

/* ---------- Content (Right) ---------- */
.mf-result__success-msg {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 7px;
  padding: 16px 24px;
}

.mf-result__success-icon {
  display: flex;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #f3f7ec;
  flex-shrink: 0;
}

.mf-result__success-text {
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
}

.mf-result__content {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  background: #fff;
  border-radius: 7px;
  min-width: 0;
}


/* Reviews */
.mf-result__reviews {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mf-result__reviews a {
  color: #3A3A3A;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

/* Product Name */
.mf-result__product-name {
  color: #003466;
  font-family: Lato, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  margin-bottom: 0 !important;
  padding: 0;
  text-align: left;
}

/* Specs Row */
.mf-result__specs {
  width: 100%;
}

.mf-result__specs-inner {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mf-result__specs .hinweis-groesse {
  display: none;
}

.mf-result__specs .spec-box {
  display: flex;
  padding: 4px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex: 1 0 0;
  border-radius: 5px;
  background: #EBEFF1;
}

.mf-result__specs .spec-box .prev {
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.mf-result__specs .spec-box .nxt {
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

/* CMS Headline */
.mf-result__cms-headline {
  display: flex;
  padding: 12px 24px;
  margin-inline: -24px;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  background: #EBEFF1;
  width: calc(100% + 48px);
  text-align: left;
}

.mf-result__cms-headline p {
  flex: 1 0 0;
  color: #0E0C0C;
  font-family: Lato, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0 !important;
}

/* Feature Items */
.mf-result__features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  padding: 4px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e4e8;
  margin-bottom: 4px;
}

.mf-result__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.mf-result__feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #ebeff1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mf-result__feature-icon svg {
  width: 48px;
  height: 48px;
}

.mf-result__feature-icon svg > circle {
  stroke: none !important;
}

.mf-result__feature-text {
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding-top: 12px;
  text-align: left;
}

/* Customers */
.mf-result__customers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  width: 100%;
}

.mf-result__customer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mf-result__avatars {
  display: flex;
}

.mf-result__avatar {
  width: 28px;
  height: 28px;
  margin-left: -4px;
}

.mf-result__avatar:first-child {
  margin-left: 0;
}

.mf-result__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mf-result__customer-count {
  color: #0E0C0C;
  font-family: Lato, sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.mf-result__guarantee {
  position: relative;
  display: flex;
  padding: 10px 16px;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 7px;
  background: #ebeff1;
  overflow: hidden;
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}

.mf-result__guarantee-badge {
  position: absolute;
  display: block;
  width: 52px;
  height: 52px;
  right: 8px;
  bottom: -4px;
  opacity: 0.6;
}

.mf-result__guarantee-badge svg {
  width: 100%;
  height: 100%;
}

/* Happy Customers + Guarantee */
.mf-result__customers {
  margin-top: 4px;
}

.mf-result__customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.mf-result__avatars {
  display: flex;
}

.mf-result__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  margin-left: -6px;
}

.mf-result__avatar:first-child {
  margin-left: 0;
}

.mf-result__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.mf-result__guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EBEFF1;
  border-radius: 7px;
  padding: 12px 16px;
  margin-top: 4px;
}

.mf-result__guarantee span {
  color: #4B4F58;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  flex: 1;
}

.mf-result__guarantee-badge {
  flex-shrink: 0;
  width: 31px;
  height: 24px;
}

.mf-result__guarantee-badge svg {
  width: 31px;
  height: 24px;
}

/* Price */
.mf-result__price {
  display: flex;
  padding: 4px 0;
  align-items: baseline;
  gap: 8px;
  align-self: stretch;
  flex-wrap: wrap;
}

.mf-result__price .preis {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.mf-result__price .amount,
.mf-result__price .woocommerce-Price-amount {
  color: #4B4F58;
  font-family: Lato, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.mf-result__price .includes-tax,
.mf-result__price small,
.mf-result__price .tax-info {
  color: #5E9602;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 400;
}

/* CTA Button */
.mf-result__cta {
  width: 100%;
}

.mf-result__cta .amq_mf_add_to_cart,
.mf-result__cta a.button {
  display: flex;
  width: 100%;
  padding: 14px 24px;
  justify-content: center;
  align-items: center;
  border-radius: 7px;
  background: #23A455;
  color: #FFF !important;
  font-family: Lato, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mf-result__cta .amq_mf_add_to_cart:hover,
.mf-result__cta a.button:hover {
  opacity: 0.8;
}

/* Delivery Time */
.mf-result__delivery {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.mf-result__delivery-dot {
  display: flex;
  width: 18px;
  height: 18px;
  padding: 2px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  background: linear-gradient(91deg, #D3DBC5 0%, #E7EFD9 33.53%, #E7EFD9 99.39%);
  box-shadow: 0 0 6px 0 #FFF inset;
  flex-shrink: 0;
}

.mf-result__delivery-text,
.mf-result__delivery-text * {
  color: #4B4F58 !important;
  font-family: Lato, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: normal !important;
}

/* Subfooter */
.mf-result__subfooter {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  background: #EBEFF1;
  padding: 20px 16px;
  width: calc(100% + 48px);
  margin-inline: -24px;
  margin-bottom: -24px;
  border-radius: 0 0 7px 7px;
  border-top: 1px solid #d0d5dd;
}

.mf-result__trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% / 3);
  text-align: center;
}

.mf-result__trust-item svg {
  width: 50px;
  height: 50px;
}

.mf-result__trust-item p {
  max-width: 120px;
  margin: 6px auto 0;
  color: #2E2D2C;
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}


/* ═══════════════════════════════════════════════
   SLIDER SECTION ("Überzeug dich selbst")
   ═══════════════════════════════════════════════ */
.mf-result__slider-section {
  margin-top: 24px;
  background: #003466;
  border-radius: 0;
  overflow: hidden;
  padding: 30px 0;
  width: 100%;
}

.mf-result__slider-title {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px 20px;
}

.mf-result__slider-title h2 {
  color: #FFF;
  font-family: Lato, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-align: left;
}

.mf-result__slider-body {
  position: relative;
  padding: 0 30px;
}

.mf-result__slider-body .swiper {
  overflow: hidden;
  border-radius: 7px;
}

.mf-result__slider-body .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.mf-result__slider-body .swiper-slide {
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
}

.mf-result__slider-body .swiper-slide img {
  width: 100%;
  height: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 7px;
}

.mf-result__slider-body .swiper-button-prev,
.mf-result__slider-body .swiper-button-next {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  z-index: 10;
  cursor: pointer;
}

.mf-result__slider-body .swiper-button-prev::after,
.mf-result__slider-body .swiper-button-next::after {
  display: none;
}

.mf-result__slider-body .swiper-button-prev {
  left: 12px;
}

.mf-result__slider-body .swiper-button-next {
  right: 12px;
}

.mf-result__slider-body .swiper-button-prev svg,
.mf-result__slider-body .swiper-button-next svg {
  width: 8px;
  height: 14px;
}


/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVE (max-width: 767px)
   ═══════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
  .amq-tpl-mf-result {
    padding: 0;
  }

  .mf-result__success-msg {
    border-radius: 5px;
    padding: 8px 16px;
    margin: 12px 12px 16px 12px;
  }

  .mf-result__grid {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .mf-result__gallery {
    max-height: none;
    border-radius: 0;
    top: 0;
  }

  .mf-result__main-image {
    min-height: auto;
    padding: 0;
  }

  .mf-result__main-image img {
    max-height: 400px;
  }

  .mf-result__gallery-overlay {
    font-size: 13px;
    line-height: 18px;
    width: 267px;
    max-width: 100%;
    bottom: 8px;
    left: 0;
    padding: 4px 16px;
    border-radius: 0 5px 5px 0;
  }

  .mf-result__content {
    padding: 24px 16px;
    gap: 16px;
    border-radius: 0;
  }

  .mf-result__product-name {
    font-size: 20px;
  }

  .mf-result__cms-headline {
    margin-inline: -16px;
    padding: 10px 16px;
    width: calc(100% + 32px);
  }

  .mf-result__guarantee {
    padding: 8px 12px;
    font-size: 13px;
  }

  .mf-result__guarantee-badge {
    right: 4px;
    bottom: -2px;
    width: 36px;
    height: 36px;
  }

  .mf-result__customer-count {
    font-size: 15px;
  }

  .mf-result__subfooter {
    margin-inline: -16px;
    width: calc(100% + 32px);
    margin-bottom: -16px;
    padding: 16px 8px;
  }

  .mf-result__slider-section {
    margin-top: 0;
  }

  .mf-result__slider-title {
    padding: 0 16px 16px;
  }

  .mf-result__slider-title h2 {
    font-size: 18px;
  }

  .mf-result__slider-body {
    padding: 0 16px;
  }

  /* Hide custom slider arrows on mobile */
  .mf-result__slider-body .swiper-button-prev,
  .mf-result__slider-body .swiper-button-next {
    display: none !important;
  }

  .mf-result__feature-icon {
    width: 40px;
    height: 40px;
  }

  .mf-result__feature-icon svg {
    width: 40px;
    height: 40px;
  }
}
