/* =============================================================================
   EF Mini Cart – jobbról becsúszó kosár panel
   A színek, sugarak és árnyékok a child téma :root tokenjeiből jönnek.
   ============================================================================= */

.ef-minicart {
  position: fixed;
  inset: 0;
  /* A gyerektéma saját rétegei fölé: fix alsó nav 9000, mobil drawer 9100,
     kereső overlay 9200. Az auth modal (99999) és a sütisáv (100000) marad felül. */
  z-index: 9500;
  visibility: hidden;
  pointer-events: none;
}

.ef-minicart.is-open {
  visibility: visible;
  pointer-events: auto;
}

.ef-minicart__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 23, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ef-minicart.is-open .ef-minicart__backdrop {
  opacity: 1;
}

.ef-minicart__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  background: var(--ef-white, #fff);
  box-shadow: var(--ef-shadow-lg, 0 8px 32px rgba(0,0,0,0.10));
  transform: translateX(100%);
  transition: transform 0.28s ease;
  font-family: var(--ef-font-body, system-ui, sans-serif);
}

.ef-minicart.is-open .ef-minicart__panel {
  transform: translateX(0);
}

/* --- Fejléc --- */

.ef-minicart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ef-gray-200, #e5e4e0);
  flex: 0 0 auto;
}

.ef-minicart__title {
  margin: 0;
  font-family: var(--ef-font-display, system-ui, sans-serif);
  font-size: 20px;
  line-height: 1.2;
  color: var(--ef-gray-900, #1a1917);
}

.ef-minicart__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ef-gray-500, #7a7972);
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: var(--ef-r, 5px);
  cursor: pointer;
}

.ef-minicart__close:hover {
  background: var(--ef-gray-100, #f3f2ef);
  color: var(--ef-gray-900, #1a1917);
}

/* --- „Kosárba téve" visszajelzés --- */

.ef-minicart__flash {
  margin: 0;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  background: var(--ef-green-light, #e8f5ee);
  color: var(--ef-green-mid, #2a7a47);
  font-weight: 600;
  font-size: 15px;
  transition: max-height 0.2s ease, padding 0.2s ease;
  flex: 0 0 auto;
}

.ef-minicart__flash.is-visible {
  max-height: 60px;
  padding: 12px 20px;
}

.ef-minicart__flash.is-visible::before {
  content: "\2713";
  margin-right: 8px;
  font-weight: 700;
}

/* --- Tartalom --- */

.ef-minicart__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 20px;
}

.ef-minicart__loading {
  color: var(--ef-gray-500, #7a7972);
  padding: 24px 0;
  text-align: center;
}

/* A WooCommerce mini-kosár sablon kimenete a panelen belül. */

.ef-minicart .woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ef-minicart .woocommerce-mini-cart-item {
  position: relative;
  display: block;
  padding: 14px 28px 14px 0;
  border-bottom: 1px solid var(--ef-gray-100, #f3f2ef);
  font-size: 14px;
  line-height: 1.45;
}

/* A gyerek-téma márka-fallback szabálya (.ef-brand-fallback-img) mix-blend-mode:
   multiply-t ad a képnek, hogy a fehér logóháttér beolvadjon a kártyába. A panel
   viszont transzformált réteg, és ott a keverés nem talál hátteret: a kép
   betöltődik és dekódolódik, de NEM rajzolódik ki, üres négyzet marad. Mérve
   Chromiumban, teljes buildben is. A panel háttere fehér, tehát a keverésre itt
   nincs szükség. A min-width azért kell, mert a fallback szabály width: 100%-ot
   ad, és a 14 százalékos belső térköz a kis négyzetben aránytalan lenne. */
.ef-minicart .woocommerce-mini-cart-item img {
  float: left;
  width: 56px;
  min-width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 12px 0 0;
  padding: 0;
  border-radius: var(--ef-r, 5px);
  background: var(--ef-white, #fff);
  mix-blend-mode: normal;
}

.ef-minicart .woocommerce-mini-cart-item a:not(.remove) {
  color: var(--ef-gray-900, #1a1917);
  text-decoration: none;
  font-weight: 600;
}

.ef-minicart .woocommerce-mini-cart-item a:not(.remove):hover {
  color: var(--ef-green, #00b342);
}

/* Változat- és kalkulátor-adatok (Magasság, Hossz, Kalkulátor). A Woo dt/dd
   párokat ad; alapból a dd új sorba, a lebegő kép ALÁ csúszott. */
.ef-minicart .woocommerce-mini-cart-item dl.variation {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ef-gray-500, #7a7972);
}

.ef-minicart .woocommerce-mini-cart-item dl.variation dt {
  float: left;
  clear: left;
  margin: 0 4px 0 0;
  font-weight: 600;
}

.ef-minicart .woocommerce-mini-cart-item dl.variation dd,
.ef-minicart .woocommerce-mini-cart-item dl.variation dd p {
  margin: 0;
}

.ef-minicart .woocommerce-mini-cart-item .quantity {
  display: block;
  color: var(--ef-gray-500, #7a7972);
  font-weight: 400;
}

.ef-minicart .woocommerce-mini-cart-item .remove {
  position: absolute;
  top: 14px;
  right: 0;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  color: var(--ef-gray-500, #7a7972);
  text-decoration: none;
  font-size: 18px;
}

.ef-minicart .woocommerce-mini-cart-item .remove:hover {
  background: var(--ef-gray-100, #f3f2ef);
  color: #b3261e;
}

.ef-minicart .woocommerce-mini-cart__empty-message {
  padding: 32px 0;
  text-align: center;
  color: var(--ef-gray-500, #7a7972);
}

/* A Woo ezen a bolton nem csak címkét és összeget ad, hanem két <small>-t is
   (ÁFA-val, nettó ...). Flexben ezek kiszorították egymást, 390 pixelen a
   "+ ÁFA" ki is lógott a panelből, és az összeg szám közben tört ketté.
   Ezért itt blokk-elrendezés van, a számot pedig tiltjuk törni. */
.ef-minicart .woocommerce-mini-cart__total {
  display: block;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 2px solid var(--ef-gray-200, #e5e4e0);
  font-size: 15px;
  line-height: 1.5;
}

.ef-minicart .woocommerce-mini-cart__total strong {
  font-weight: 600;
}

.ef-minicart .woocommerce-mini-cart__total .amount {
  font-family: var(--ef-font-display, system-ui, sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: var(--ef-green-dark, #0f2d1a);
  white-space: nowrap;
}

.ef-minicart .woocommerce-mini-cart__total .tax_label {
  color: var(--ef-gray-500, #7a7972);
  font-size: 12.5px;
  white-space: nowrap;
}

/* A nettó megjegyzés saját sorba, kisebb súllyal: kiegészítő információ. */
.ef-minicart .woocommerce-mini-cart__total .ef-gross-note {
  display: block;
  margin-top: 2px;
  color: var(--ef-gray-500, #7a7972);
  font-size: 12.5px;
}

.ef-minicart .woocommerce-mini-cart__total .ef-gross-note .amount {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: inherit;
}

/* --- Mennyiség-léptető (kártya 6a778c73) --- */

.ef-minicart .ef-mc-qty {
  display: inline-flex;
  align-items: stretch;
  margin: 6px 8px 2px 0;
  border: 1px solid var(--ef-gray-200, #e5e4e0);
  border-radius: var(--ef-r, 5px);
  overflow: hidden;
  vertical-align: middle;
}

.ef-minicart .ef-mc-qty__btn {
  appearance: none;
  border: 0;
  background: var(--ef-gray-50, #fafaf8);
  color: var(--ef-gray-700, #3a3935);
  /* 32px a legkisebb, ami hüvelykujjal még kényelmes egy sűrű listában. */
  min-width: 32px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.ef-minicart .ef-mc-qty__btn:hover:not(:disabled) {
  background: var(--ef-gray-100, #f3f2ef);
}

.ef-minicart .ef-mc-qty__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ef-minicart .ef-mc-qty__input {
  width: 44px;
  border: 0;
  border-left: 1px solid var(--ef-gray-200, #e5e4e0);
  border-right: 1px solid var(--ef-gray-200, #e5e4e0);
  padding: 6px 4px;
  text-align: center;
  font: inherit;
  font-size: 14px;
  color: var(--ef-gray-900, #1a1917);
  background: var(--ef-white, #fff);
  -moz-appearance: textfield;
}

.ef-minicart .ef-mc-qty__input::-webkit-outer-spin-button,
.ef-minicart .ef-mc-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* A soron belüli ár-szöveg a léptető mellé kerül, nem alá. */
.ef-minicart .ef-mc-line {
  display: inline-block;
  vertical-align: middle;
  color: var(--ef-gray-500, #7a7972);
}

/* Kérés közben a panel halkan jelzi, hogy dolgozik. */
.ef-minicart.is-busy .ef-minicart__body {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.ef-minicart__flash.is-error {
  background: #fdecea;
  color: #b3261e;
}

.ef-minicart__flash.is-error::before {
  content: "!";
}

/* --- Gombok --- */

.ef-minicart .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
}

.ef-minicart .woocommerce-mini-cart__buttons .button {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--ef-r, 5px);
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  background: var(--ef-gray-100, #f3f2ef);
  color: var(--ef-gray-900, #1a1917);
}

.ef-minicart .woocommerce-mini-cart__buttons .button:hover {
  background: var(--ef-gray-200, #e5e4e0);
}

.ef-minicart .woocommerce-mini-cart__buttons .checkout {
  background: var(--ef-orange, #e8720c);
  color: var(--ef-white, #fff);
}

.ef-minicart .woocommerce-mini-cart__buttons .checkout:hover {
  background: var(--ef-orange-hover, #d4660a);
}

/* --- Háttér-görgetés zárolása, amíg a panel nyitva van --- */

html.ef-mc-lock,
html.ef-mc-lock body {
  overflow: hidden;
}

/* --- Mobil --- */

@media (max-width: 480px) {
  .ef-minicart__panel {
    max-width: 100%;
  }
}

/* --- Csökkentett mozgás --- */

@media (prefers-reduced-motion: reduce) {
  .ef-minicart__panel,
  .ef-minicart__backdrop,
  .ef-minicart__flash {
    transition: none;
  }
}
