/* MichaelaStore premium footer v2
 * Reworks the existing #footer only. The hidden native footer row remains in
 * the same footer as a data source for Shoptet and the homepage SOCIAL module.
 */

#footer.ms-footer-premium {
  --msf-ink: #241b18;
  --msf-muted: #766d68;
  --msf-burgundy: #772b35;
  --msf-logo-red: #fb0404;
  --msf-line: rgba(119, 43, 53, .15);
  --msf-soft-line: rgba(36, 27, 24, .13);
  --msf-cream: #faf6f1;
  --msf-cream-deep: #f5eee6;
  width: calc(100% - 40px) !important;
  max-width: 1440px !important;
  min-width: 0 !important;
  margin: 28px auto 32px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--msf-line) !important;
  border-radius: 8px !important;
  background: var(--msf-cream) !important;
  color: var(--msf-ink) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#footer.ms-footer-premium,
#footer.ms-footer-premium * {
  box-sizing: border-box;
}

#footer.ms-footer-premium.ms-footer--newsletter-connected {
  margin-top: 0 !important;
  border-top: 0 !important;
  border-radius: 0 0 8px 8px !important;
}

/* The existing native widgets and links stay available in DOM, but never form
 * a second visible footer. SOCIAL can still read its Instagram/Facebook data. */
#footer.ms-footer-premium .ms-footer__source,
#footer.ms-footer-premium .footer-links-icons--empty,
#footer.ms-footer-premium > .footer-links-icons,
#footer.ms-footer-premium > .footer-bottom {
  display: none !important;
}

#footer.ms-footer-premium .footer-rows {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#footer.ms-footer-premium .ms-footer__shell {
  width: 100%;
  min-width: 0;
  color: var(--msf-ink);
  background: var(--msf-cream);
}

#footer.ms-footer-premium .ms-footer__main {
  display: grid;
  grid-template-columns: minmax(270px, 1.28fr) repeat(3, minmax(170px, 1fr));
  gap: clamp(30px, 3.3vw, 54px);
  width: 100%;
  padding: clamp(34px, 3.5vw, 52px) clamp(28px, 4.8vw, 70px) clamp(30px, 3vw, 46px);
}

#footer.ms-footer-premium .ms-footer__brand,
#footer.ms-footer-premium .ms-footer__group {
  min-width: 0;
}

#footer.ms-footer-premium .ms-footer__brand-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: var(--msf-logo-red) !important;
  text-decoration: none !important;
}

#footer.ms-footer-premium .ms-footer__brand-logo {
  display: block;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  object-fit: contain;
  box-shadow: none !important;
}

#footer.ms-footer-premium .ms-footer__brand-name {
  min-width: 0;
  color: var(--msf-logo-red) !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(23px, 1.8vw, 29px) !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: -.035em !important;
  white-space: nowrap;
}

#footer.ms-footer-premium .ms-footer__brand-copy {
  max-width: 340px;
  margin: 0 !important;
  color: var(--msf-muted) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.62 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

#footer.ms-footer-premium .ms-footer__heading,
#footer.ms-footer-premium .ms-footer__toggle {
  margin: 0 0 17px !important;
  color: var(--msf-ink) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: .105em !important;
  text-transform: uppercase !important;
}

#footer.ms-footer-premium .ms-footer__toggle {
  display: none;
}

#footer.ms-footer-premium .ms-footer__panel,
#footer.ms-footer-premium .ms-footer__links,
#footer.ms-footer-premium .ms-footer__contact-list,
#footer.ms-footer-premium .ms-footer__payments-list {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#footer.ms-footer-premium .ms-footer__links,
#footer.ms-footer-premium .ms-footer__contact-list {
  display: grid;
  gap: 10px;
}

#footer.ms-footer-premium .ms-footer__links li,
#footer.ms-footer-premium .ms-footer__contact-list li {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none !important;
}

#footer.ms-footer-premium .ms-footer__links li::before,
#footer.ms-footer-premium .ms-footer__links li::after,
#footer.ms-footer-premium .ms-footer__contact-list li::before,
#footer.ms-footer-premium .ms-footer__contact-list li::after,
#footer.ms-footer-premium .ms-footer__payments-list li::before,
#footer.ms-footer-premium .ms-footer__payments-list li::after {
  content: none !important;
  display: none !important;
}

#footer.ms-footer-premium .ms-footer__links a,
#footer.ms-footer-premium .ms-footer__contact-list a,
#footer.ms-footer-premium .ms-footer__contact-hours {
  color: var(--msf-muted) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.48 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  overflow-wrap: anywhere;
}

#footer.ms-footer-premium .ms-footer__links a {
  display: inline;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}

#footer.ms-footer-premium .ms-footer__links a:hover,
#footer.ms-footer-premium .ms-footer__contact-list a:hover,
#footer.ms-footer-premium .ms-footer__bottom a:hover {
  color: var(--msf-burgundy) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
}

#footer.ms-footer-premium .ms-footer__contact-link,
#footer.ms-footer-premium .ms-footer__contact-hours {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

#footer.ms-footer-premium .ms-footer__contact-icon {
  display: inline-flex;
  width: 15px;
  height: 19px;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  color: var(--msf-burgundy);
}

#footer.ms-footer-premium .ms-footer__contact-icon svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

#footer.ms-footer-premium .ms-footer__contact-hours {
  margin-top: 1px;
  padding-left: 23px !important;
}

#footer.ms-footer-premium .ms-footer__payments {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 20px 34px;
  width: 100%;
  padding: 22px clamp(28px, 4.8vw, 70px);
  border-top: 1px solid var(--msf-soft-line);
  border-bottom: 1px solid var(--msf-soft-line);
  background: rgba(255, 255, 255, .21);
}

#footer.ms-footer-premium .ms-footer__payments .ms-footer__heading {
  margin: 0 !important;
}

#footer.ms-footer-premium .ms-footer__payments-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 92px));
  gap: 8px;
  justify-content: start;
}

#footer.ms-footer-premium .ms-footer__payment-badge {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(36, 27, 24, .14);
  border-radius: 7px;
  background: rgba(255, 255, 255, .58);
  color: var(--msf-ink);
}

#footer.ms-footer-premium .ms-footer__payment-badge svg {
  display: block;
  width: 100%;
  max-width: 62px;
  height: 24px;
  fill: currentColor;
}

#footer.ms-footer-premium .ms-footer__bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  width: 100%;
  padding: 18px clamp(28px, 4.8vw, 70px) 20px;
  color: var(--msf-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px;
  line-height: 1.5;
}

#footer.ms-footer-premium .ms-footer__legal {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 18px;
}

#footer.ms-footer-premium .ms-footer__copyright {
  color: var(--msf-muted);
}

#footer.ms-footer-premium .ms-footer__bottom a {
  color: var(--msf-muted) !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  text-decoration: none !important;
}

#footer.ms-footer-premium .ms-footer__attribution {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  opacity: .62;
  white-space: nowrap;
}

#footer.ms-footer-premium .ms-footer__attribution .image,
#footer.ms-footer-premium .ms-footer__attribution img {
  display: block;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
}

/* On inner pages the native newsletter remains inside #footer. Only its outer
 * wrapper is joined to the redesigned footer; its form and Shoptet behavior stay untouched. */
#footer.ms-footer-premium > .footer-newsletter:not(.ms-newsletter),
#footer.ms-footer-premium > .container.footer-newsletter:not(.ms-newsletter) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px clamp(28px, 4.8vw, 70px) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--msf-line) !important;
  border-radius: 0 !important;
  background: var(--msf-cream-deep) !important;
  box-shadow: none !important;
}

/* Homepage: SOCIAL already joins the newsletter from above. This completes
 * the same uninterrupted shell from newsletter to the existing footer. */
body.in-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected,
body.type-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected {
  width: calc(100% - 40px) !important;
  max-width: 1440px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(119, 43, 53, .15) !important;
  border-radius: 0 !important;
}

body.in-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected + #footer.ms-footer-premium,
body.type-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected + #footer.ms-footer-premium {
  margin-top: 0 !important;
}

@media (max-width: 1099px) {
  #footer.ms-footer-premium .ms-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px clamp(38px, 7vw, 74px);
  }

  #footer.ms-footer-premium .ms-footer__brand {
    grid-column: 1 / -1;
  }

  #footer.ms-footer-premium .ms-footer__brand-copy {
    max-width: 520px;
  }
}

@media (max-width: 767px) {
  #footer.ms-footer-premium {
    width: calc(100% - 24px) !important;
    margin-bottom: 22px !important;
  }

  #footer.ms-footer-premium .ms-footer__main {
    display: block;
    padding: 25px 18px 0;
  }

  #footer.ms-footer-premium .ms-footer__brand {
    padding: 0 2px 24px;
  }

  #footer.ms-footer-premium .ms-footer__brand-link {
    gap: 9px;
    margin-bottom: 14px;
  }

  #footer.ms-footer-premium .ms-footer__brand-logo {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
  }

  #footer.ms-footer-premium .ms-footer__brand-name {
    font-size: clamp(22px, 7vw, 26px) !important;
  }

  #footer.ms-footer-premium .ms-footer__brand-copy {
    max-width: 440px;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  #footer.ms-footer-premium .ms-footer__group {
    border-top: 1px solid var(--msf-soft-line);
  }

  #footer.ms-footer-premium .ms-footer__heading {
    display: none;
  }

  #footer.ms-footer-premium .ms-footer__toggle {
    display: flex;
    width: 100%;
    min-height: 55px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 !important;
    padding: 16px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
    cursor: pointer;
  }

  #footer.ms-footer-premium .ms-footer__toggle::after {
    content: '+';
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    color: var(--msf-burgundy);
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
  }

  #footer.ms-footer-premium .ms-footer__toggle[aria-expanded='true']::after {
    content: '\2212';
  }

  #footer.ms-footer-premium .ms-footer__panel[hidden] {
    display: none !important;
  }

  #footer.ms-footer-premium .ms-footer__panel {
    padding: 0 2px 18px;
  }

  #footer.ms-footer-premium .ms-footer__links,
  #footer.ms-footer-premium .ms-footer__contact-list {
    gap: 9px;
  }

  #footer.ms-footer-premium .ms-footer__links a,
  #footer.ms-footer-premium .ms-footer__contact-list a,
  #footer.ms-footer-premium .ms-footer__contact-hours {
    font-size: 12.5px !important;
  }

  #footer.ms-footer-premium .ms-footer__payments {
    display: block;
    padding: 21px 18px 23px;
  }

  #footer.ms-footer-premium .ms-footer__payments .ms-footer__heading {
    display: block;
    margin-bottom: 13px !important;
  }

  #footer.ms-footer-premium .ms-footer__payments-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  #footer.ms-footer-premium .ms-footer__payment-badge {
    height: 36px;
    padding: 7px 8px;
    border-radius: 6px;
  }

  #footer.ms-footer-premium .ms-footer__payment-badge svg {
    max-width: 54px;
    height: 21px;
  }

  #footer.ms-footer-premium .ms-footer__bottom {
    display: grid;
    gap: 10px;
    padding: 16px 72px 18px;
    font-size: 10.5px;
  }

  #footer.ms-footer-premium .ms-footer__legal {
    gap: 4px 13px;
  }

  #footer.ms-footer-premium .ms-footer__attribution {
    justify-self: start;
    white-space: normal;
  }

  #footer.ms-footer-premium > .footer-newsletter:not(.ms-newsletter),
  #footer.ms-footer-premium > .container.footer-newsletter:not(.ms-newsletter) {
    padding: 24px 18px !important;
  }

  body.in-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected,
  body.type-index .footer-newsletter.ms-newsletter.ms-footer__newsletter-connected {
    width: calc(100% - 24px) !important;
  }
}

@media (max-width: 374px) {
  #footer.ms-footer-premium .ms-footer__payments-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #footer.ms-footer-premium .ms-footer__payment-badge {
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #footer.ms-footer-premium .ms-footer__links a {
    transition: none;
  }
}
