/* =========================
   WCLA – GLOBAL / WRAPPERS
   ========================= */

.wcla-box{
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:16px;
  padding:16px;
  margin:14px auto;
  max-width:1100px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
}

.wcla-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.wcla-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border:1px solid #ececec;
  background:#fafafa;
  border-radius:999px;
  font-size:13px;
  line-height:1.15;
}

.wcla-err{color:#b00020;margin:10px 0;font-weight:700}
.wcla-ok{color:#0a7d2a;margin:10px 0;font-weight:700}

/* JS warning/closed stílusok (wcla-frontend.js használja) */
.wcla-warning{
  background:#f0ad4e !important;
  border-color:#eea236 !important;
  color:#000 !important;
}

.wcla-warn{
  background:#fff3cd;
  border:1px solid #ffeeba;
  color:#856404;
  padding:8px 10px;
  border-radius:10px;
  font-weight:700;
}

/* =========================
   AUCTION LIST (wcla_auction)
   ========================= */

/* Theme UL pötty/margó OFF, mert nálad a UL sima <ul> */
.wcla-box.wcla-lots ul{
  list-style:none !important;
  padding-left:0 !important;
  margin:14px 0 0 0 !important;
}
.wcla-box.wcla-lots ul > li{
  list-style:none !important;
  margin:0 0 14px 0 !important;
  padding:0 !important;
}

/* Filter bar */
.wcla-box.wcla-lots form.wcla-row{
  padding:10px 12px;
  background:#fbfbfb;
  border:1px solid #eee;
  border-radius:12px;
}
.wcla-box.wcla-lots label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
}
.wcla-box.wcla-lots select,
.wcla-box.wcla-lots input[type="text"],
.wcla-box.wcla-lots input[type="number"]{
  border:1px solid #ddd;
  border-radius:10px;
  padding:7px 10px;
  height:38px;
  background:#fff;
}

/* Kártya */
.wcla-card{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:14px;
  background:#fff;
  border:1px solid #eee;
  border-radius:16px;
  padding:12px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

.wcla-card__img{position:relative}
.wcla-card__img img{
  width:160px;
  height:160px;
  border-radius:14px;
  border:1px solid #eee;
  background:#fff;
  object-fit:contain; /* bélyeg/termék fotónál jobb, ne vágjon */
  display:block;
}

.wcla-card__badge{
  position:absolute;
  left:10px;
  top:10px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  letter-spacing:.3px;
}

.wcla-badge-closed{
  background:#e8f5e9;
  border:1px solid #2e7d32;
  color:#1b5e20;
}

.wcla-card__body{min-width:0}

.wcla-card__title{
  display:inline-block;
  font-size:16px;
  font-weight:800;
  text-decoration:none;
  color:inherit;
  word-break:break-word;
}
.wcla-card__title:hover{ text-decoration:underline; }

.wcla-card__meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

.wcla-card__prices{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* Actions */
.wcla-card__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.wcla-card__actions .button{
  border-radius:10px !important;
}

/* Fő “Kép nagyítás” gomb */
.wcla-btn-view{
  border-radius:10px !important;
  padding:9px 12px !important;
  border:1px solid #111 !important;
  background:#111 !important;
  color:#fff !important;
  font-weight:800 !important;
}
.wcla-btn-view:hover{ opacity:.92; }

/* Licit gomb (aukció listán) */
.wcla-btn-bid{
  border-radius:10px !important;
  padding:9px 12px !important;
  font-weight:800 !important;
}

/* Lenülő licit panel a kártyában */
.wcla-bidpanel{
  display:none;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #eee;
}
.wcla-bidpanel.is-open{display:block;}

.wcla-bidpanel__inner .wcla-row{gap:10px;}

.wcla-bidpanel__inner hr{border:0;border-top:1px solid #eee;}

/* Galéria thumbs */
.wcla-card__g{
  display:flex;
  align-items:center;
  gap:8px;
}
.wcla-gthumb{
  width:34px;
  height:34px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #eee;
  cursor:pointer;
  background:#fff;
}
.wcla-gthumb:hover{
  transform:translateY(-1px);
}
.wcla-gmore{
  font-size:12px;
  color:#666;
  user-select:none;
}

@media (max-width:768px){
  .wcla-card{ grid-template-columns:1fr; }
  .wcla-card__img img{ width:100%; height:240px; }
}

/* =========================
   LIGHTBOX / MODAL (wcla_auction)
   ========================= */

html.wcla-modal-open, body.wcla-modal-open{ overflow:hidden !important; }

#wcla-modal{
  position:fixed;
  inset:0;
  background:rgba(250,245,235,.92);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
  padding:18px;
}

#wcla-modal .wcla-modal-box{
  background:#fff;
  max-width:980px;
  width:100%;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}

#wcla-modal .wcla-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid #eee;
}

#wcla-modal .wcla-modal-title{
  font-weight:800;
  font-size:14px;
}

#wcla-modal .wcla-modal-x{
  cursor:pointer;
  border:0;
  background:transparent;
  border-radius:12px;
  padding:6px 10px;
  font-weight:900;
  font-size:20px;
}

#wcla-modal .wcla-modal-body{
  display:grid;
  grid-template-columns:1fr 340px;
}

#wcla-modal .wcla-modal-img{
  background:#faf5eb;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}

#wcla-modal .wcla-modal-prev,
#wcla-modal .wcla-modal-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:rgba(255,255,255,.85);
  width:44px;
  height:44px;
  border-radius:999px;
  cursor:pointer;
  font-size:26px;
  line-height:44px;
  text-align:center;
}
#wcla-modal .wcla-modal-prev{ left:10px; }
#wcla-modal .wcla-modal-next{ right:10px; }

#wcla-modal .wcla-modal-count{
  position:absolute;
  bottom:10px;
  right:10px;
  background:rgba(255,255,255,.85);
  padding:4px 8px;
  border-radius:12px;
  font-weight:700;
  font-size:12px;
}

#wcla-modal .wcla-modal-bid .wcla-bidpanel{ display:block !important; }
#wcla-modal .wcla-modal-bid .wcla-bidpanel__head{ display:none; }

/* Modal: licit panel kiemelése (UX fókusz) */
#wcla-modal .wcla-modal-bid .wcla-bidpanel__inner{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(60,60,60,.12);
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

#wcla-modal .wcla-modal-bid .wcla-js-current{
  font-size:1.35em;
  font-weight:800;
}

#wcla-modal .wcla-modal-bid .wcla-js-next{
  font-size:1.15em;
  font-weight:700;
}

#wcla-modal .wcla-modal-bid .wcla-proxy-form input[type="number"],
#wcla-modal .wcla-modal-bid .wcla-proxy-form button,
#wcla-modal .wcla-modal-bid .wcla-js-manual{
  height:40px;
  border-radius:10px;
}

#wcla-modal .wcla-modal-img img{
  max-width:100%;
  max-height:72vh;
  object-fit:contain;
}

#wcla-modal .wcla-modal-side{
  padding:12px 14px;
  max-height:72vh;
  overflow:auto;
}

#wcla-modal .wcla-modal-desc{
  color:#333;
  font-size:14px;
  line-height:1.5;
  white-space:pre-wrap;
}

@media (max-width:900px){
  #wcla-modal .wcla-modal-body{ grid-template-columns:1fr; }
  #wcla-modal .wcla-modal-side{ border-top:1px solid #eee; }
}

/* =========================
   LOT PAGE (wcla_lot)
   ========================= */

#wcla-history p{ margin:8px 0; }
#wcla-msg .wcla-err, #wcla-msg .wcla-ok{ margin:10px 0; }

/* =========================
   LIVE VIEW (wcla_live)
   ========================= */

.wcla-live-item{
  display:flex;
  gap:12px;
  align-items:center;
  margin:10px 0 2px 0;
}
.wcla-live-item #wcla-live-thumb{
  width:72px;
  height:72px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid #e5e5e5;
  display:block;
  background:#fff;
}
.wcla-live-item__title{
  font-size:18px;
  font-weight:800;
  line-height:1.2;
}

.wcla-live-buttons{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  max-width:720px;
}
.wcla-live-buttons .wcla-live-btn{
  padding:14px 10px;
  font-size:16px;
  border-radius:14px;
  font-weight:800;
}

@media (max-width:768px){
  .wcla-live-buttons{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wcla-live-buttons .wcla-live-btn[data-idx='6'],
  .wcla-live-buttons .wcla-live-btn[data-idx='7'],
  .wcla-live-buttons .wcla-live-btn[data-idx='8']{ display:none; }
}

/* LIVE phase states (wcla-live.js adja a class-t a wrapperre) */
.wcla-phase-warning .wcla-live-btn{
  background:#f0ad4e !important;
  border-color:#eea236 !important;
  color:#000 !important;
}
.wcla-phase-warning .wcla-phase-msg{
  background:#fff3cd;
  border:1px solid #ffeeba;
  color:#856404;
  padding:8px 10px;
  border-radius:10px;
  margin:10px 0;
  font-weight:800;
}
.wcla-phase-closed .wcla-live-btn{
  background:#e5e5e5 !important;
  border-color:#ccc !important;
  color:#777 !important;
  pointer-events:none;
}
.wcla-phase-closed .wcla-phase-msg{
  background:#f8d7da;
  border:1px solid #f5c6cb;
  color:#721c24;
  padding:8px 10px;
  border-radius:10px;
  margin:10px 0;
  font-weight:900;
}

/* =========================
   SMALL POLISH
   ========================= */
.wcla-box p{ margin:10px 0; }

/* =========================
   KATEGÓRIA UI (AUKCIÓ LISTA)
   Asztali: gombok, Mobil: legördülő
   ========================= */
.wcla-catbar{ display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.wcla-catselect{ display:none; }

@media (max-width:768px){
  .wcla-catbar{ display:none; }
  .wcla-catselect{ display:flex; align-items:center; gap:8px; }
}
/* ===== BID PANEL (inline a kártyában) ===== */
.wcla-bidpanel{
  margin-top:12px;
  padding:12px;
  border:1px solid #eee;
  border-radius:14px;
  background:#fbfbfb;
}

.wcla-bidpanel__top{ gap:10px; }

.wcla-bidpanel__actions .button{
  border-radius:10px !important;
}

.wcla-bid-toggle{
  border-radius:10px !important;
}

/* Licit gomb a listán */
.wcla-btn-bid{
  border-radius:10px !important;
  padding:9px 12px !important;
  font-weight:800 !important;
}
/* --- Bidpanel polish --- */
.wcla-bidpanel { margin-top: 12px; }
.wcla-bidpanel__inner { position: relative; }

.wcla-bidpanel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.08);
  margin-bottom:10px;
}

.wcla-bidpanel__head .wcla-js-bidpanel-close{
  line-height:1;
  padding:6px 10px;
}

.wcla-pill { border:1px solid rgba(0,0,0,.08); }
.wcla-ok { padding:8px 10px; border-radius:10px; }
.wcla-err { padding:8px 10px; border-radius:10px; }

/* Státusz badge */
.wcla-pill strong { font-weight:700; }
/* --- Card UX --- */
.wcla-card { transition: transform .12s ease, box-shadow .12s ease; }
.wcla-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }

.wcla-card__title { text-decoration:none; }
.wcla-card__title:hover { text-decoration:underline; }
// Kártyára kattintás: nyissa a licit panelt (de ne ha gomb/link mezőn kattintasz)
$(document).on("click", ".wcla-card", function(e){
  // ha gombra, linkre, inputra kattint -> ne avatkozzunk
  if ($(e.target).closest("button,a,input,select,textarea,label,.wcla-card__g,.wcla-gthumb").length) return;

  var $btn = $(this).find("[data-wcla-bid-toggle]").first();
  if ($btn.length) $btn.trigger("click");
});


/* =========================
   KATALÓGUS UI: Részletek lenyíló nézet
   ========================= */
.wcla-card__title{
  font-size:18px;
  font-weight:700;
  line-height:1.25;
  margin-bottom:6px;
}
.wcla-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.wcla-metaitem{
  font-size:13px;
  color:#333;
  background:#f6f6f6;
  padding:4px 10px;
  border-radius:999px;
}
.wcla-meta-k{ color:#666; font-weight:600; margin-right:6px; }

.wcla-card__actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:12px;
}

.wcla-btn-details{
  background:#f3f3f3;
  border:1px solid #ddd;
}

.wcla-details{
  margin-top:12px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(250,245,235,.92); /* krém */
  overflow:hidden;
}

.wcla-details__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:rgba(255,255,255,.65);
}
.wcla-details__title{
  font-weight:800;
}
.wcla-details__close{
  border:0;
  background:transparent;
  font-size:22px;
  line-height:1;
  padding:4px 8px;
  cursor:pointer;
}

.wcla-details__body{
  padding:14px;
}

.wcla-gal{
  position:relative;
  background:#fff;
  border-radius:16px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.wcla-gal-img{
  max-width:100%;
  max-height:70vh;
  width:auto;
  height:auto;
  border-radius:12px;
  display:block;
}
.wcla-gal-prev,
.wcla-gal-next{
  border:0;
  background:rgba(0,0,0,.06);
  border-radius:999px;
  width:42px;
  height:42px;
  font-size:26px;
  line-height:42px;
  cursor:pointer;
}
.wcla-gal-count{
  position:absolute;
  bottom:10px;
  right:12px;
  background:rgba(0,0,0,.55);
  color:#fff;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
}

.wcla-desc{
  margin-top:12px;
  background:rgba(255,255,255,.75);
  border-radius:14px;
  padding:12px 14px;
}

@media (max-width: 768px){
  .wcla-gal-prev, .wcla-gal-next{ width:38px; height:38px; font-size:24px; line-height:38px; }
  .wcla-gal-img{ max-height:55vh; }
}

/* =========================
   WCLA – MODAL + PROXY UI
   ========================= */

/* Modal legyen szélesebb desktopon */
#wcla-modal .wcla-modal-box{ max-width:1180px; }
#wcla-modal .wcla-modal-body{ grid-template-columns:1fr 420px; }

@media (max-width:900px){
  #wcla-modal .wcla-modal-body{ grid-template-columns:1fr; }
}

/* Proxy sor: input + gomb egy sorban, label nélkül (placeholder-t használunk) */
.wcla-proxy-form,
#wcla-proxy-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
}

.wcla-proxy-form input,
#wcla-proxy-form input{
  flex:1 1 auto;
  min-width:220px;
  height:40px;
  padding:6px 12px;
  border-radius:10px;
  text-align:right;
  font-size:16px;
  font-variant-numeric: tabular-nums;
}

.wcla-proxy-form button,
#wcla-proxy-form button{
  flex:0 0 auto;
  height:40px;
  border-radius:10px;
  white-space:nowrap;
}

/* ==================================================
   WCLA – CLEAN LIST HIERARCHY (AUCTION LIST)
   Less "dzsungel": rácsos ár blokk + tipográfia hierarchy
   Scoped to .wcla-box.wcla-lots
   ================================================== */

.wcla-box.wcla-lots{
  --wcla-main:#5F7F73;
  --wcla-main-2:#4f6b61;
  --wcla-soft:#eef3f1;
  --wcla-accent:#2f4f45;
  --wcla-text:#1f1f1f;
  --wcla-muted:#6f7378;
  --wcla-border:#d9dde0;
}

.wcla-box.wcla-lots .wcla-card{
  border:1px solid var(--wcla-border);
  box-shadow:0 10px 26px rgba(0,0,0,.07);
}

.wcla-box.wcla-lots .wcla-card__title{
  font-size:18px;
  font-weight:900;
  line-height:1.25;
}

.wcla-box.wcla-lots .wcla-card__meta,
.wcla-box.wcla-lots .wcla-metaitem,
.wcla-box.wcla-lots .wcla-meta-k{
  color:var(--wcla-muted);
  font-size:12px;
}

.wcla-box.wcla-lots .wcla-pill{
  background:#fff;
  border:1px solid var(--wcla-border);
  color:var(--wcla-muted);
  padding:8px 10px;
  font-size:12px;
}

/* Ár+meta blokk: 6 oszlopos rács.
   - első 3 (Induló / Aktuális / Köv. min) = nagy elemek, 2 oszlopot foglalnak (3 db / sor)
   - a többi (licit db / kategória / minőség / leütés ...) = kisebb "chip", 2 oszlop (3 db / sor)
   Mobilon: 2 oszlop, az árak teljes szélességűek, a chip-ek 1 oszloposak (2 db / sor)
*/
.wcla-box.wcla-lots .wcla-card__prices{
  display:grid;
  grid-template-columns:repeat(6, minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}

/* Induló / Aktuális / Köv. min */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(-n+3){
  grid-column: span 2;
}

/* Meta chip-ek */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(n+4){
  grid-column: span 2;
}

@media (max-width:640px){
  .wcla-box.wcla-lots .wcla-card__prices{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  .wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(-n+3){
    grid-column: 1 / -1; /* teljes szélesség */
  }
  .wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(n+4){
    grid-column: span 1;
  }
}

/* Ár pill-ek "soft" háttérrel */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill{
  background:var(--wcla-soft);
  border-color:transparent;
  padding:10px 14px;
}

.wcla-box.wcla-lots .wcla-card__prices strong{
  color:var(--wcla-accent);
  font-weight:900;
  letter-spacing:.2px;
}

/* 1=Induló, 2=Aktuális, 3=Köv. min (a frontend markup szerint) */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(1) strong{ font-size:16px; opacity:.92; }
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(2) strong{ font-size:22px; }
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(3) strong{ font-size:18px; }

/* A többi info (licit db, kategória, minőség...) halkabb, chip formában */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(n+4){
  background:#fff;
  border-color:var(--wcla-border);
  padding:7px 10px;
  border-radius:999px;
  font-size:11px;
  line-height:1.15;
}

/* Dzsungel-irtás: a listában csak a legfontosabb meta maradjon.
   1-3: Induló / Aktuális / Köv. min
   4-6: Licit db / Kategória / Minőség
   7+: nyertes, leütés, stb. – ezek menjenek a részletek/modal nézetbe. */
.wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(n+7){
  display:none;
}

/* SKU-t mobilon rejtsük (zsúfol) */
@media (max-width:640px){
  .wcla-box.wcla-lots .wcla-metaitem-sku{ display:none; }
}

/* mobilon még kisebb chip-ek */
@media (max-width:640px){
  .wcla-box.wcla-lots .wcla-card__prices .wcla-pill:nth-child(n+4){
    padding:6px 9px;
    font-size:11px;
  }
}

/* Részletek gomb egységes, nem "theme" kék */
.wcla-box.wcla-lots .wcla-card__actions .button,
.wcla-box.wcla-lots .wcla-btn-details{
  background:var(--wcla-main) !important;
  border-color:var(--wcla-main) !important;
  color:#fff !important;
  font-weight:900 !important;
  border-radius:12px !important;
  padding:10px 14px !important;
}
.wcla-box.wcla-lots .wcla-card__actions .button:hover,
.wcla-box.wcla-lots .wcla-btn-details:hover{
  background:var(--wcla-main-2) !important;
  border-color:var(--wcla-main-2) !important;
}
