/* =========================================================================
   Efatelep Quick Wins – arculathoz igazított stílusok
   Tokenek: style.css :root (--ef-* prefix)
   ========================================================================= */

/* ===== #17 mennyiség léptető ===== */
.ef-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--ef-gray-300);
  border-radius: var(--ef-r-lg);
  overflow: hidden;
  background: var(--ef-white);
  vertical-align: middle;
}
.ef-qty input.qty {
  width: 48px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--ef-gray-200);
  border-right: 1px solid var(--ef-gray-200);
  background: transparent;
  font-family: var(--ef-font-body);
  font-weight: 600;
  color: var(--ef-gray-900);
  -moz-appearance: textfield;
}
.ef-qty input.qty::-webkit-outer-spin-button,
.ef-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ef-qty__btn {
  width: 38px;
  border: 0;
  background: var(--ef-gray-50);
  color: var(--ef-gray-700);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.ef-qty__btn:hover { background: var(--ef-green); color: var(--ef-white); }
.ef-qty__btn:focus { outline: none; }

/* termékoldal: térköz a +/- sor és a "Kosárba teszem" gomb közé */
.single-product form.cart .quantity { margin-bottom: 16px; }

/* ===== #20 kosár cross-sell ===== */
.ef-cart-addons { margin-top: 2.5rem; clear: both; }
.ef-cart-addons__title {
  font-family: var(--ef-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ef-gray-900);
  margin: 0 0 1.1rem;
}
.ef-cart-addons ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.ef-cart-addons ul.products::before,
.ef-cart-addons ul.products::after { content: none !important; display: none !important; }
.ef-cart-addons ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
}
@media (max-width: 600px) {
  .ef-cart-addons ul.products { grid-template-columns: repeat(2, 1fr); }
}

/* ===== #2 utoljára nézett ===== */
.ef-recently-viewed[hidden] { display: none; }

/* ===== #10 termékvideó ===== */
.ef-product-gallery.ef-has-video,
.woocommerce-product-gallery.ef-has-video { position: relative; }

.ef-video-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ef-green) !important;
  color: var(--ef-white) !important;
  cursor: pointer;
  font-family: var(--ef-font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--ef-shadow-md);
  transition: background .15s, transform .15s;
}
.ef-video-play:hover,
.ef-video-play:focus,
.ef-video-play:active { background: var(--ef-green-dark) !important; color: var(--ef-white) !important; transform: translateY(-1px); }
.ef-video-play span,
.ef-video-play:hover span,
.ef-video-play:focus span { color: var(--ef-white) !important; }
.ef-video-play__icon { font-size: 11px; }

.ef-video-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
}
.ef-video-modal[hidden] { display: none; }
.ef-video-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); }
.ef-video-modal__box {
  position: relative;
  width: min(900px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--ef-r-lg);
  overflow: hidden;
  box-shadow: var(--ef-shadow-lg);
}
.ef-video-modal__frame,
.ef-video-modal__frame iframe { width: 100%; height: 100%; border: 0; }
.ef-video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px !important;
  height: 36px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: var(--ef-white) !important;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.ef-video-modal__close:hover,
.ef-video-modal__close:focus { background: rgba(255,255,255,.18) !important; color: var(--ef-white) !important; }

/* ===== #1.2 kosár ikon a "Kosárba teszem" gombon ===== */
.single_add_to_cart_button::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}
@media (max-width: 480px) {
  .single_add_to_cart_button::before { width: 16px; height: 16px; }
}

/* ===== #1.3 fizetési mód ikonok ===== */
.ef-payment {
  margin-top: 4px;
}
.ef-payment__title {
  margin: 0 0 8px;
  font-family: var(--ef-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ef-gray-700);
}
.ef-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.ef-payment-method {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ef-gray-500);
}
.ef-payment-method__icon {
  width: 24px;
  height: 24px;
}
.ef-payment-method__label {
  font-family: var(--ef-font-body);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  color: var(--ef-gray-700);
  white-space: nowrap;
}
@media (max-width: 420px) {
  .ef-payment-methods { gap: 14px; }
}

/* ===== #1.4 elállási jog link + popup ===== */
.ef-returns-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ef-gray-700);
  font-family: var(--ef-font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ef-returns-note:hover,
.ef-returns-note:focus { color: var(--ef-green-mid); }
.ef-returns-note svg { flex-shrink: 0; }

.ef-returns-dialog {
  border: 0;
  border-radius: var(--ef-r-lg);
  box-shadow: var(--ef-shadow-lg);
  padding: 0;
  width: min(480px, 92vw);
  max-height: 85vh;
  overflow: auto;
}
.ef-returns-dialog::backdrop {
  background: rgba(0,0,0,.5);
}
.ef-returns-dialog__inner {
  position: relative;
  padding: 28px 24px 24px;
}
.ef-returns-dialog__title {
  margin: 0 0 12px;
  padding-right: 24px;
  font-family: var(--ef-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ef-gray-900);
}
.ef-returns-dialog__text {
  margin: 0 0 12px;
  font-family: var(--ef-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ef-gray-700);
}
.ef-returns-dialog__text:last-child { margin-bottom: 0; }
.ef-returns-dialog__text a {
  color: var(--ef-green-mid);
  font-weight: 600;
}
.ef-returns-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ef-gray-500);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ef-returns-dialog__close:hover,
.ef-returns-dialog__close:focus { background: var(--ef-gray-100); color: var(--ef-gray-900); }
@media (max-width: 420px) {
  .ef-returns-dialog { width: 94vw; }
  .ef-returns-dialog__inner { padding: 24px 18px 18px; }
}

/* ===== #1.5 értékelés-csillagok ===== */
.ef-review-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
}
.ef-review-stars__rating .star-rating { font-size: 14px; }
.ef-review-stars__count {
  font-family: var(--ef-font-body);
  font-size: 13px;
  color: var(--ef-gray-500);
  text-decoration: none;
}
.ef-review-stars__count:hover { color: var(--ef-gray-700); text-decoration: underline; }

/* ===== Single AJAX add-to-cart – gomb-állapot + üzenet ===== */
.single_add_to_cart_button.ef-qw-adding { opacity: .75; cursor: progress; }
.single_add_to_cart_button.ef-qw-added {
  background: var(--ef-green-dark, #0f7a34) !important;
}
.single_add_to_cart_button.ef-qw-added::before { display: none !important; }
.ef-qw-cart-msg {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: var(--ef-r, 8px);
}
.ef-qw-cart-msg.is-error {
  background: #fff4f4;
  border: 1px solid #f2c9c9;
  color: #b3261e;
}

/* ===== Ingyenes-szállítás badge (CTA közelében) ===== */
.ef-free-ship {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 9px 12px;
  border-radius: var(--ef-r, 8px);
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
}
.ef-free-ship__icon { flex-shrink: 0; }
.ef-free-ship--yes  { background: #e8f5ee; color: var(--ef-green-dark, #0f7a34); }
.ef-free-ship--hint { background: var(--ef-gray-50, #f7f7f5); color: var(--ef-gray-500, #7a7972); font-weight: 500; }

/* ===== Sticky CTA sáv (görgetéskor) ===== */
.ef-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9001; /* a mobil bottom-nav (9000) fölé */
  background: var(--ef-white, #fff);
  border-top: 1px solid var(--ef-gray-200, #e5e4e0);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  transform: translateY(100%);
  transition: transform .22s ease;
}
.ef-sticky-cta.is-visible { transform: translateY(0); }
.ef-sticky-cta__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
}
.ef-sticky-cta__img {
  width: 46px; height: 46px; object-fit: contain;
  border: 1px solid var(--ef-gray-100, #efeeeb); border-radius: 8px; flex-shrink: 0; background:#fff;
}
.ef-sticky-cta__info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.ef-sticky-cta__name {
  font-size: 14px; font-weight: 600; color: var(--ef-gray-900, #1a1917);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ef-sticky-cta__price { font-size: 14px; font-weight: 700; color: var(--ef-gray-900, #1a1917); }
.ef-sticky-cta__price .woocommerce-price-suffix { font-size: 12px; font-weight: 500; color: var(--ef-gray-500, #7a7972); }
.ef-sticky-cta__btn {
  flex-shrink: 0; border: 0; cursor: pointer;
  background: var(--ef-green, #00B342); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; white-space: nowrap;
  transition: background .15s;
}
.ef-sticky-cta__btn:hover { background: var(--ef-green-dark, #0f7a34); }
@media (max-width: 767px) {
  .ef-sticky-cta__inner { padding: 8px 12px; gap: 10px; }
  .ef-sticky-cta__img { width: 40px; height: 40px; }
  .ef-sticky-cta__btn { padding: 11px 16px; font-size: 14px; }
  /* A sticky átveszi az alsó sávot: aktívkor a fix bottom-nav lecsúszik. */
  body.ef-sticky-cta-active .ef-bottom-nav { transform: translateY(100%); transition: transform .22s ease; }
}
