.lunarplexus-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lunarplexus-brand img {
  width: auto !important;
  height: 123px !important;
  max-height: none !important;
}

.lunarplexus-brand__wordmark {
  display: flex;
  flex-direction: column;
  color: #9c7846;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.lunarplexus-brand__name {
  font-size: 1.55rem;
  letter-spacing: 0.06em;
}

.lunarplexus-brand__tagline {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Menyn som egen rad under loggan, som i gamla layouten */
.header-nav-full-width {
  border-top: 1px solid rgba(156, 120, 70, 0.25);
  border-bottom: 1px solid rgba(156, 120, 70, 0.25);
}

@media (max-width: 767.98px) {
  .lunarplexus-brand__wordmark {
    display: none;
  }

  .lunarplexus-brand__logo {
    width: 200px;
    height: 123px;
    object-fit: contain;
    flex: 0 0 auto;
  }
}

/* Textstil inspirerad av den gamla butiken */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.header-nav-full-width a {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}
/* Gamla butikens textstil i huvudmenyn */
a.ps-mainmenu__tree-link {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil i undermenyns vänstra lista */
a.submenu__left-item {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil i undermenyns grupplänkar */
a.menu-item__group-main-item {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil för produktnamn i produktkort */
a.product-miniature__title {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil för sidfotens rubriker */
.footer-block__title {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil för sidfotens CMS-länkar */
footer a.cms-page-link,
#footer a.cms-page-link {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil för e-postlänkar i sidfoten */
footer a[href^="mailto:"],
#footer a[href^="mailto:"] {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* Gamla butikens textstil för länkar i sidfotens listor */
.footer-block__list a {
  font-family: "Times New Roman", Times, serif;
  font-variant: small-caps;
  text-transform: none;
}

/* === Sidhuvud dator (>= 1200px): logotyp vänster, ordmärke mitten, sök höger, meny under === */
@media (min-width: 1200px) {
  .header-bottom__row {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  /* Logotypraden spänner över hela bredden */
  .header-bottom__logo {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 !important;
  }

  .header-bottom__logo .header-bottom__h1,
  .header-bottom__logo .lunarplexus-brand {
    width: 100%;
    margin: 0;
  }

  .header-bottom__logo .lunarplexus-brand {
    position: relative;
  }

  /* Ordmärket mitt i sidhuvudet */
  .header-bottom__logo .lunarplexus-brand__wordmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    text-align: center;
    white-space: nowrap;
  }

  /* Sök till höger på samma rad, ovanpå logotypraden */
  #_desktop_ps_searchbar {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    position: relative;
    z-index: 2;
    margin: 0 !important;
  }

  /* Menyn på egen rad, centrerad */
  .header-bottom .ps-mainmenu--desktop {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    border-top: 1px solid #e5e5e5;
  }

  .header-bottom .ps-mainmenu__tree {
    display: flex !important;
    justify-content: center !important;
  }
}

/* === Rättning: full bredd för ordmärket, centrerad meny, logotypens höjd === */
@media (min-width: 1200px) {
  .header-bottom__logo .lunarplexus-brand {
    width: 100% !important;
    max-width: none !important;
  }

  .header-bottom__logo,
  .header-bottom__logo .header-bottom__h1,
  .header-bottom__logo .lunarplexus-brand {
    height: auto !important;
    max-height: none !important;
  }

  .header-bottom__logo {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .header-bottom .ps-mainmenu--desktop {
    justify-content: center !important;
  }
}

/* === Samma vikt och stil för ordmärket på alla sidor === */
.lunarplexus-brand__wordmark {
  font-weight: 600;
  font-variant: small-caps;
}

/* === Sidhuvud mobil och surfplatta (< 1200px): logotyp och ordmärke synliga === */
@media (max-width: 1199.98px) {
  .header-bottom__row {
    align-items: center !important;
  }

  .header-bottom__logo,
  .header-bottom__logo .header-bottom__h1,
  .header-bottom__logo .lunarplexus-brand {
    height: auto !important;
    max-height: none !important;
    max-width: none !important;
  }

  .header-bottom__logo {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .lunarplexus-brand img,
  .lunarplexus-brand__logo {
    height: 80px !important;
    width: auto !important;
  }

  /* Surfplatta: sökfältet får krympa så att det ryms på samma rad */
  #_desktop_ps_searchbar {
    flex: 0 1 300px !important;
    min-width: 180px;
  }
}

/* Mobil (< 768px): logotyp och ordmärke centrerade överst, meny och ikoner under */
@media (max-width: 767.98px) {
  .header-bottom__logo {
    order: -2 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    justify-content: center;
    margin: 0 !important;
    padding-bottom: 0.25rem;
  }

  .lunarplexus-brand {
    gap: 0.6rem !important;
    margin: 0 !important;
    justify-content: center;
  }

  .lunarplexus-brand img,
  .lunarplexus-brand__logo {
    height: 60px !important;
  }

  .lunarplexus-brand__wordmark {
    display: flex !important;
  }

  .lunarplexus-brand__name {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
  }

  .lunarplexus-brand__tagline {
    margin-top: 0.25rem;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
  }

  /* Menyknappen till vänster, ikonerna till höger */
  .header-bottom .ps-mainmenu--desktop {
    margin-right: auto !important;
  }
}
