/*
 * misticSparks — HEADER (toate paginile). Markup: inc/header.php. Comportament: assets/js/header.js.
 * Calculator: banda promo · rândul principal (căutare | logo | cont, Wunschliste, coș) · meniul + Kontakt.
 * Telefon: banda promo · logo + iconițe; meniul se deschide ca panou din dreapta, căutarea sub logo.
 * Culori: negru sub banda promo, cât ține logo-ul, apoi degrade spre verdele site-ului (#0b3a28).
 */

.msh {
  --msh-black: #050706;
  --msh-green: #0b3a28;
  --msh-ivory: #f3f1ea;
  --msh-ivory-dim: #d8d2c4;
  --msh-gold: #d9be6e;
  --msh-gold-line: rgba(201, 162, 39, .55);
  --msh-ui: Montserrat, system-ui, sans-serif;
  --msh-wrap: 1400px;
  --msh-promo-h: 34px;
  --msh-main-h: 82px;
  --msh-nav-h: 56px;
  position: relative;
  z-index: 100;
  background: linear-gradient(180deg, var(--msh-black) 0, var(--msh-black) calc(var(--msh-promo-h) + 90px), var(--msh-green) 100%);
  color: var(--msh-ivory);
  font-family: var(--msh-ui);
}
.msh::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 226, 219, .12) 24%, rgba(226, 226, 219, .12) 76%, transparent);
  pointer-events: none;
}
.msh *, .msh *::before, .msh *::after,
.msh-cart *, .msh-cart *::before, .msh-cart *::after { box-sizing: border-box; }
.msh a { color: inherit; text-decoration: none; } /* bate culoarea de link din kitul Elementor */
.msh :focus-visible,
.msh-cart :focus-visible { outline: 2px solid var(--msh-gold); outline-offset: 2px; }

.msh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.msh-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: #fff;
  color: #111;
  font: 600 14px/1.2 Montserrat, system-ui, sans-serif;
  border-radius: 6px;
}
.msh-skip:focus { top: 12px; }

.msh-wrap { width: 100%; max-width: var(--msh-wrap); margin: 0 auto; }

.msh-ico { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.msh .msh-btn,
.msh-cart .msh-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--msh-ivory);
  cursor: pointer;
  transition: color .2s;
}
.msh .msh-btn:hover,
.msh-cart .msh-btn:hover { color: var(--msh-gold); background: none; border: 0; }
.msh .msh-btn:focus,
.msh .msh-btn:active,
.msh-cart .msh-btn:focus { background: none; border: 0; box-shadow: none; }

/* ---------- Banda promo ---------- */
.msh-promo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--msh-promo-h);
  padding: 0 24px;
  overflow: hidden;
}
.msh-promo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, .30) 20%, rgba(201, 162, 39, .30) 80%, transparent);
}
.msh-promo-t {
  margin: 0;
  color: var(--msh-ivory-dim);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .2px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.msh-promo-i { display: inline-block; will-change: transform; }

/* ---------- Rândul principal ---------- */
.msh-main { padding: 0 28px; }
.msh-main-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 46px;
  min-height: var(--msh-main-h);
}

.msh-search { position: relative; justify-self: start; width: 300px; max-width: 100%; margin: 0; }
.msh .msh-q {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 44px 0 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(243, 241, 234, .32);
  border-radius: 0;
  box-shadow: none;
  color: #e8e7e1;
  font-family: var(--msh-ui);
  font-size: 15px;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}
.msh .msh-q::placeholder { color: #c9c4b7; opacity: 1; }
.msh .msh-q:focus { border-bottom-color: var(--msh-gold); }
.msh .msh-q::-webkit-search-cancel-button { -webkit-appearance: none; }
.msh .msh-search-go {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--msh-ivory);
  cursor: pointer;
}
.msh-search-go .msh-ico { width: 20px; height: 20px; }
.msh .msh-search-go:hover { color: var(--msh-gold); background: none; border: 0; }

.msh-logo { justify-self: center; display: inline-block; line-height: 0; }
.msh-logo-img { display: block; width: 190px; height: auto; max-width: 100%; }
.msh-logo-text { font-family: "Cormorant Garamond", Georgia, serif; font-size: 30px; color: var(--msh-gold); line-height: 1; }

.msh-act { justify-self: end; display: flex; align-items: center; gap: 4px; }
.msh .msh-search-open, .msh .msh-menu-open, .msh .msh-menu-close { display: none; }
.msh-count {
  position: absolute;
  top: 3px;
  right: 1px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--msh-gold);
  border-radius: 9px;
  color: #10140f;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
.msh-count[hidden] { display: none; }

/* ---------- Meniul (calculator) ---------- */
.msh-navrow { padding: 0 28px; }
.msh-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 38px; min-height: var(--msh-nav-h); }
.msh-menu { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.msh-menu > li { position: relative; margin: 0; }
.msh-menu > li > a {
  display: flex;
  align-items: center;
  min-height: var(--msh-nav-h);
  padding: 6px 15px;
  color: var(--msh-ivory);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
  letter-spacing: .035em;
  transition: color .2s;
}
.msh-menu > li > a:hover,
.msh-menu > li.current-menu-item > a,
.msh-menu > li.current-menu-ancestor > a { color: var(--msh-gold); }
.msh-menu > li.menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .8;
}
.msh-menu .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  min-width: 240px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: linear-gradient(90deg, #122b23 0%, #0b4a33 100%);
  border: 1px solid rgba(201, 169, 97, .55);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.msh-menu > li:hover > .sub-menu,
.msh-menu > li:focus-within > .sub-menu,
.msh-menu > li.msh-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .18s, transform .18s;
}
.msh-menu .sub-menu a {
  display: block;
  padding: 9px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.msh-menu .sub-menu a:hover { color: var(--msh-gold); background: rgba(0, 0, 0, .12); }
.msh-sub-toggle { display: none; }

/* Kontakt: contur auriu subțire; la hover trece o rază aurie de la dreapta la stânga. */
.msh .msh-contact {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--msh-gold-line);
  border-radius: 6px;
  color: var(--msh-ivory);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.msh-contact::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 22%;
  background: linear-gradient(90deg, rgba(255, 236, 190, 0) 0%, rgba(255, 236, 190, .95) 50%, rgba(255, 236, 190, 0) 100%);
  transform: translateX(560%) skewX(-22deg);
  opacity: 0;
  pointer-events: none;
}
.msh-contact:hover::before,
.msh-contact:focus-visible::before { animation: msp-raza .7s cubic-bezier(.4, 0, .2, 1) 1; }
@keyframes msp-raza {
  0% { transform: translateX(560%) skewX(-22deg); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(-160%) skewX(-22deg); opacity: 0; }
}

/* ---------- Coșul (panou din dreapta) ---------- */
.msh-scrim {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(5, 7, 6, .55);
}
.msh-scrim[hidden] { display: none; }
.msh-cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9991;
  display: flex;
  flex-direction: column;
  width: min(430px, 100vw);
  padding: 22px;
  background: linear-gradient(180deg, #fffefb 0%, #fbf5e9 100%);
  box-shadow: -18px 0 48px rgba(15, 48, 39, .22);
  color: #1d2a22;
  font-family: Montserrat, system-ui, sans-serif;
  overflow-y: auto;
}
.msh-cart:has(.msh-mini) { overflow: hidden; }
.msh-cart[hidden] { display: none; }
.msh-cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #e6dcc6; }
.msh-cart .msh-cart-t { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; font-weight: 600; color: #0b3a28; }
.msh-cart .msh-btn { color: #1d2a22; }
.msh-cart .msh-btn:hover { color: #8a6d1f; }
.msh-cart .msh-mini { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.msh-cart .msh-mini-list { flex: 1 1 auto; min-height: 0; margin: 0 -22px; padding: 0 22px; overflow-y: auto; list-style: none; }
.msh-cart .msh-mini-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas: "img info" "img rm";
  gap: 2px 14px;
  align-items: start;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid #ece2cc;
}
.msh-cart .msh-mini-thumb { grid-area: img; display: block; }
.msh-cart .msh-mini-img { display: block; width: 72px; height: 72px; object-fit: cover; background: #fff; border: 1px solid #e6dcc6; border-radius: 8px; }
.msh-cart .msh-mini-info { grid-area: info; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msh-cart .msh-mini-name {
  color: #182b22;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msh-cart a.msh-mini-name:hover { color: #0b3a28; }
.msh-cart .msh-mini-meta { color: #5d6a61; font-size: 12.5px; }
.msh-cart .msh-mini-qty { color: #5d6a61; font-size: 13.5px; }
.msh-cart .msh-mini-qty .amount { color: #0b2a1e; font-size: 16px; font-weight: 700; }
.msh-cart .msh-mini-rm {
  grid-area: rm;
  justify-self: start;
  padding: 4px 0;
  color: #7a6a45;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.msh-cart .msh-mini-rm:hover { color: #0b3a28; }
/* Cardul verde de jos (ca rezumatul din Kasse): subtotal + butoane. */
.msh-cart .msh-mini-foot {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin: 16px -22px -22px;
  padding: 18px 22px calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(160deg, #0d2a1e 0%, #081a12 100%);
  color: #f3f1ea;
}
.msh-cart .msh-mini-sum { display: flex; align-items: baseline; justify-content: space-between; margin: 0; font-size: 15px; font-weight: 600; }
.msh-cart .msh-mini-sum .amount { color: #e3c97c; font-size: 22px; font-weight: 700; }
.msh-cart .msh-mini-ship { margin: -4px 0 4px; color: #aab3aa; font-size: 12.5px; }
.msh-cart .msh-mini-buy,
.msh-cart .msh-mini-view,
.msh-cart .msh-mini-go {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
}
.msh-cart .msh-mini-buy { background: linear-gradient(180deg, #e3c97c 0%, #d0ad4f 100%); color: #17221b; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.msh-cart .msh-mini-buy::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 22%;
  background: linear-gradient(90deg, rgba(255, 248, 225, 0) 0%, rgba(255, 248, 225, .9) 50%, rgba(255, 248, 225, 0) 100%);
  transform: translateX(560%) skewX(-22deg);
  opacity: 0;
  pointer-events: none;
}
.msh-cart .msh-mini-buy:hover::before,
.msh-cart .msh-mini-buy:focus-visible::before { animation: msp-raza .7s cubic-bezier(.4, 0, .2, 1) 1; }
.msh-cart .msh-mini-buy:hover { color: #17221b; }
.msh-cart .msh-mini-view { background: transparent; border: 1px solid rgba(227, 201, 124, .6); color: #f3f1ea; }
.msh-cart .msh-mini-view:hover { background: rgba(227, 201, 124, .12); color: #fff; }
.msh-cart .msh-mini-empty { margin: 32px 0 18px; color: #5d6a61; text-align: center; }
.msh-cart .msh-mini-go { background: #0b3a28; color: #fbf3dc; }
.msh-cart .msh-mini-go:hover { color: #fff; }

/* ---------- Kasse: header redus (doar logo, cont, coș) ---------- */
.msh--checkout .msh-main-in { grid-template-columns: 1fr auto 1fr; }
.msh--checkout .msh-logo { grid-column: 2; }
.msh--checkout .msh-act { grid-column: 3; }

@media (prefers-reduced-motion: reduce) {
  .msh-contact:hover::before { animation: none; }
  .msh-menu .sub-menu { transition: none; }
}

/* ---------- Tabletă și telefon ---------- */
@media (max-width: 1024px) {
  .msh { --msh-main-h: 92px; }
  .msh-main { padding: 0 14px; }
  .msh-main-in { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; }
  .msh-logo { grid-column: 1; grid-row: 1; justify-self: start; }
  .msh-logo-img { width: auto; height: 54px; }
  .msh-act { grid-column: 2; grid-row: 1; gap: 0; }
  .msh .msh-search-open, .msh .msh-menu-open { display: inline-grid; }

  /* Căutarea: ascunsă, coboară sub logo la apăsarea lupei. */
  .msh-search { display: none; grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0 0 12px; }
  .msh.msh-search-on .msh-search { display: block; }

  /* Meniul: panou din dreapta, peste pagină. */
  .msh-navrow {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9991;
    width: min(380px, 88vw);
    padding: 0;
    background: linear-gradient(180deg, #050706 0%, #0b3a28 100%);
    box-shadow: -18px 0 48px rgba(0, 0, 0, .35);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s .25s;
  }
  .msh.msh-menu-on .msh-navrow { transform: none; visibility: visible; transition: transform .25s ease; }
  .msh-nav-in { flex-direction: column; align-items: stretch; gap: 0; min-height: 100%; padding: 64px 22px 28px; }
  .msh .msh-menu-close { display: inline-grid; position: absolute; top: 10px; right: 10px; }
  .msh-menu { flex-direction: column; align-items: stretch; }
  .msh-menu > li { border-bottom: 1px solid rgba(243, 241, 234, .1); }
  .msh-menu > li > a { min-height: 54px; padding: 0 44px 0 0; font-size: 16px; }
  .msh-menu > li.menu-item-has-children > a::after { display: none; }
  .msh .msh-sub-toggle {
    position: absolute;
    right: 0;
    top: 5px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--msh-gold);
    cursor: pointer;
  }
  .msh-sub-toggle::before {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform .2s;
  }
  .msh-sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg) translateY(-3px); }
  .msh-menu .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 10px 12px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .msh-menu > li.msh-open > .sub-menu { display: block; }
  .msh-menu .sub-menu a { padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--msh-ivory-dim); white-space: normal; }
  .msh .msh-contact { width: 100%; min-height: 50px; margin-top: 24px; font-size: 13.5px; }
}

@media (max-width: 767px) {
  .msh { --msh-promo-h: 32px; --msh-main-h: 80px; }
  .msh-promo { padding: 0 16px; }
  .msh-promo-t { font-size: 10.5px; letter-spacing: .055em; }
  .msh-logo-img { height: 50px; }
}
@media (max-width: 420px) {
  .msh-main { padding: 0 10px; }
  .msh-logo-img { height: 46px; }
  .msh-act .msh-btn { width: 38px; }
}
@media (max-width: 360px) {
  .msh-logo-img { height: 40px; }
  .msh-act .msh-btn { width: 34px; }
}

/* Cât timp panoul coșului e deschis, butonul „Fragen?” nu acoperă butoanele lui. (În test: .msp-v4) */
.msp-v4:has(.msh-cart:not([hidden])) .msp-assist { display: none; }
