/* Ценотека Берза — стилови. Универзален responsive layout (desktop · таблет · мобилен).
   Сите контроли се стакуваат чисто на тесни екрани (без „собирање" на инпутите). */

:root {
	--cbz-blue:    #185fa5;
	--cbz-blue-d:  #0c447c;
	--cbz-green:   #0f6e56;
	--cbz-live:    #1d9e75;
	--cbz-ink:     #2c2c2a;
	--cbz-muted:   #5f5e5a;
	--cbz-faint:   #888780;
	--cbz-line:    #e3e1d8;
	--cbz-line2:   #d3d1c7;
	--cbz-chip:    #efeee8;
	--cbz-soft:    #f7f9fc;
	--cbz-max:     1000px;
}

.cen-bz-wrap { max-width: 100%; width: var(--cbz-max); margin: 0 auto; padding: 24px 16px 56px; overflow-x: clip; }
.cen-bz-wrap, .cen-bz-wrap *, .cen-bz-submit, .cen-bz-submit * { box-sizing: border-box; min-width: 0; }
.cen-bz-wrap img, .cen-bz-wrap svg { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.cen-bz-head { text-align: center; margin-bottom: 22px; }
.cen-bz-title { font-size: clamp(20px, 5.2vw, 30px); line-height: 1.15; margin: 0 0 6px; overflow-wrap: break-word; }
.cen-bz-title span { font-size: .46em; vertical-align: middle; background: var(--cbz-blue); color: #fff; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.cen-bz-sub { color: var(--cbz-muted); margin: 0 auto 16px; max-width: 600px; font-size: 15px; line-height: 1.5; }
.cen-bz-hint { color: var(--cbz-muted); font-size: 14px; margin: 12px 0 0; }

/* ---------- Toggle (намера) ---------- */
.cen-bz-toggle { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.cen-bz-toggle a { font-size: 14px; padding: 9px 16px; border: 1px solid var(--cbz-line2); border-radius: 24px; text-decoration: none; color: var(--cbz-ink); background: #fff; transition: all .15s ease; }
.cen-bz-toggle a:hover { border-color: var(--cbz-faint); }
.cen-bz-toggle a.is-active { background: var(--cbz-blue); border-color: var(--cbz-blue); color: #fff; }
.cen-bz-tabn { font-size: 11px; font-weight: 700; background: var(--cbz-chip); color: var(--cbz-muted); padding: 1px 7px; border-radius: 20px; margin-left: 4px; vertical-align: middle; }
.cen-bz-toggle a.is-active .cen-bz-tabn, .cen-bz-scope a.is-active .cen-bz-tabn { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- „Берзата диши" — ликвидност/свежина ---------- */
.cen-bz-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 0; font-size: 13px; color: var(--cbz-muted); }
.cen-bz-stats strong { color: var(--cbz-ink); }
.cen-bz-stat-sep { color: #c9c7bd; }
.cen-bz-stat-live { display: inline-flex; align-items: center; gap: 6px; }
.cen-bz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cbz-live); box-shadow: 0 0 0 0 rgba(29,158,117,.6); animation: cen-bz-pulse 2s infinite; }
@keyframes cen-bz-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(29,158,117,.5); }
	70%  { box-shadow: 0 0 0 6px rgba(29,158,117,0); }
	100% { box-shadow: 0 0 0 0 rgba(29,158,117,0); }
}
@media (prefers-reduced-motion: reduce) { .cen-bz-dot { animation: none; } }

/* ---------- Опсег (домашно / извоз / увоз) ---------- */
.cen-bz-scope { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 12px 0 0; }
.cen-bz-scope-lbl { font-size: 12px; color: var(--cbz-faint); margin-right: 2px; }
.cen-bz-scope a { font-size: 12px; padding: 5px 11px; border: 1px solid var(--cbz-line); border-radius: 20px; text-decoration: none; color: var(--cbz-muted); background: #fff; transition: all .15s ease; }
.cen-bz-scope a:hover { border-color: var(--cbz-faint); }
.cen-bz-scope a.is-active { background: var(--cbz-green); border-color: var(--cbz-green); color: #fff; }
.cen-bz-cta { margin: 16px 0 0; }

/* ---------- Breadcrumb + сродни / откривање ---------- */
.cen-bz-crumb { font-size: 13px; color: var(--cbz-faint); margin-bottom: 8px; }
.cen-bz-crumb a { color: var(--cbz-blue); text-decoration: none; }
.cen-bz-crumb a:hover { text-decoration: underline; }
.cen-bz-crumb span { color: var(--cbz-muted); }
.cen-bz-siblings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; margin: 0 0 18px; }
.cen-bz-sib-lbl { font-size: 12px; color: var(--cbz-faint); font-weight: 600; }
.cen-bz-siblings a { font-size: 12px; padding: 4px 11px; border: 1px solid var(--cbz-line); border-radius: 20px; text-decoration: none; color: var(--cbz-muted); background: #fff; transition: all .15s ease; }
.cen-bz-siblings a:hover { border-color: var(--cbz-blue); color: var(--cbz-blue); }
.cen-bz-discover { margin: 4px 0 22px; }
.cen-bz-discover a .cen-bz-tabn { margin-left: 2px; }

/* ---------- Пребарување (robust: flex што се стакува на мобилен) ---------- */
.cen-bz-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; max-width: 760px; margin: 18px auto 0; }
.cen-bz-search input, .cen-bz-search select { padding: 10px 12px; border: 1px solid var(--cbz-line2); border-radius: 9px; font-size: 14px; background: #fff; min-width: 0; }
.cen-bz-search .cen-bz-q { flex: 3 1 50px; }
.cen-bz-search .cen-bz-matsel { flex: 1 1 50px; }
.cen-bz-searchbtn { flex: 0 0 auto; padding: 10px 22px; background: var(--cbz-blue); color: #fff; border: none; border-radius: 9px; font-size: 14px; cursor: pointer; transition: background .15s ease; }
.cen-bz-searchbtn:hover { background: var(--cbz-blue-d); }
.cen-bz-clear { flex: 0 0 auto; display: inline-flex; align-items: center; font-size: 13px; color: var(--cbz-faint); text-decoration: none; padding: 0 6px; }
.cen-bz-clear:hover { color: var(--cbz-blue); }

/* ---------- Row layout: еден оглас по ред ---------- */
.cen-bz-rows { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.cen-bz-row { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--cbz-line); border-radius: 12px; padding: 13px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: box-shadow .15s ease, border-color .15s ease; }
.cen-bz-row:hover { border-color: #cdd6e0; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.cen-bz-thumb { position: relative; width: 92px; height: 92px; flex-shrink: 0; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cen-bz-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cen-bz-thumb-ph { background: #f1efe8; color: #b4b2a9; }
.cen-bz-thumb-tag { position: absolute; bottom: 4px; left: 4px; font-size: 9px; background: rgba(255,255,255,.92); color: var(--cbz-muted); padding: 1px 6px; border-radius: 10px; }
.cen-bz-row-main { flex: 1 1 auto; min-width: 0; }
.cen-bz-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.cen-bz-num { opacity: .65; font-weight: 400; }
.cen-bz-avail { font-size: 10px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--cbz-line2); color: var(--cbz-muted); }
.cen-bz-date { font-size: 12px; color: var(--cbz-faint); margin-left: auto; white-space: nowrap; }
.cen-bz-row-title { display: block; font-size: 15px; font-weight: 600; color: var(--cbz-blue); text-decoration: none; margin-bottom: 7px; line-height: 1.35; overflow-wrap: anywhere; }
.cen-bz-row-title:hover { text-decoration: underline; }
.cen-bz-row-meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.cen-bz-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.cen-bz-tag-nudi { background: #e1f5ee; color: var(--cbz-green); }
.cen-bz-tag-bara { background: #e6f1fb; color: var(--cbz-blue); }
.cen-bz-stars { font-size: 12px; color: var(--cbz-muted); }
.cen-bz-stars span { letter-spacing: 1px; }
.cen-bz-stars .on { color: #ef9f27; }
.cen-bz-stars .off { color: var(--cbz-line2); }
.cen-bz-reply { font-size: 11px; color: var(--cbz-muted); display: inline-flex; align-items: center; gap: 4px; }
.cen-bz-bars { display: inline-flex; gap: 2px; }
.cen-bz-bars i { width: 10px; height: 6px; border-radius: 1px; background: var(--cbz-line2); }
.cen-bz-bars i.on { background: var(--cbz-live); }
.cen-bz-pill { font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.cen-bz-export { background: #eaf3de; color: #3b6d11; }
.cen-bz-verified { background: #e1f5ee; color: var(--cbz-green); }
.cen-bz-ai { background: #faeeda; color: #854f0b; }
.cen-bz-row-action { display: flex; align-items: center; align-self: center; flex: 0 0 auto; }
.cen-bz-btn-sm { font-size: 12px; padding: 8px 16px; border: 1px solid var(--cbz-blue); color: var(--cbz-blue); border-radius: 6px; text-decoration: none; white-space: nowrap; transition: all .15s ease; }
.cen-bz-btn-sm:hover { background: var(--cbz-blue); color: #fff; }

/* ---------- Pager / празно ---------- */
.cen-bz-pager { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.cen-bz-pager .page-numbers { display: inline-block; padding: 8px 13px; border: 1px solid var(--cbz-line2); border-radius: 8px; text-decoration: none; color: var(--cbz-ink); }
.cen-bz-pager .current { background: var(--cbz-blue); color: #fff; border-color: var(--cbz-blue); }
.cen-bz-empty { text-align: center; padding: 48px 16px; color: var(--cbz-muted); }
.cen-bz-empty-sub { font-size: 13px; color: var(--cbz-faint); }

/* ---------- Single ---------- */
/* min(): капни на 760px на десктоп, но НИКОГАШ над 100% од родителот (инаку на мобилен
   760px го прелеваше тесниот екран — го газеше max-width:100% од .cen-bz-wrap). */
.cen-bz-single { max-width: min(760px, 100%); }
.cen-bz-back a { color: var(--cbz-blue); text-decoration: none; font-size: 14px; }
.cen-bz-s-head { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; flex-wrap: wrap; }
.cen-bz-s-head h1 { font-size: clamp(20px, 5vw, 26px); margin: 0; line-height: 1.2; }
.cen-bz-ainote { background: #faeeda; border: 1px solid #f0d48a; color: #854f0b; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.cen-bz-s-note { line-height: 1.6; color: var(--cbz-ink); }
.cen-bz-s-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.cen-bz-s-table th { text-align: left; width: 150px; color: var(--cbz-muted); font-weight: 600; padding: 9px 0; vertical-align: top; }
.cen-bz-s-table td { padding: 9px 0; border-bottom: 1px solid #eee; }
.cen-bz-s-products { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--cbz-line); }
.cen-bz-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.cen-bz-prod { text-decoration: none; color: var(--cbz-ink); font-size: 12px; text-align: center; display: block; }
.cen-bz-prod img { width: 100%; height: auto; border-radius: 8px; border: 1px solid #eee; margin-bottom: 4px; }
.cen-bz-prod-name { display: block; }

/* ---------- Форми (lead / submit) ---------- */
.cen-bz-lead { background: var(--cbz-soft); border: 1px solid #d3e0f0; border-radius: 12px; padding: 18px 20px; margin: 24px 0; }
.cen-bz-lead h3 { margin: 0 0 4px; font-size: 18px; }
.cen-bz-lead-sub { color: var(--cbz-muted); font-size: 13px; margin: 0 0 12px; }
.cen-bz-lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.cen-bz-lead input, .cen-bz-lead textarea, .cen-bz-lead select { width: 100%; padding: 10px 12px; border: 1px solid var(--cbz-line2); border-radius: 8px; font-size: 14px; background: #fff; }
.cen-bz-lead textarea { margin-bottom: 10px; }
.cen-bz-lead-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cen-bz-lead .cen-bz-btn { border: none; cursor: pointer; }
.cen-bz-lead-msg { font-size: 13px; }
.cen-bz-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden; }

/* Јавна форма за објава ([berza_objavi_oglas]) — надградба на .cen-bz-lead */
.cen-bz-submit { max-width: 620px; margin: 0 auto; }
.cen-bz-submit-as { font-size: 13px; color: var(--cbz-green); background: #eef6ec; border: 1px solid #bcd9b3; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.cen-bz-submit-dir { display: flex; gap: 18px; flex-wrap: wrap; border: none; padding: 0; margin: 0 0 12px; }
.cen-bz-submit-dir label { font-weight: 600; cursor: pointer; }
.cen-bz-submit-h { font-size: 14px; margin: 14px 0 6px; color: var(--cbz-muted); border-bottom: 1px solid #eee; padding-bottom: 4px; }
.cen-bz-submit-hint { font-size: 12px; color: var(--cbz-faint); margin: 4px 0 0; }
.cen-bz-submit-chk { display: block; font-size: 14px; margin: 4px 0; cursor: pointer; }

/* ---------- Блок „огласи на оваа фирма" (single + профил фирма) ---------- */
.cen-bz-firm-oglasi { border: 1px solid var(--cbz-line); border-radius: 12px; padding: 14px 16px; margin: 18px 0; background: #fff; }
.cen-bz-firm-oglasi-title { font-size: 16px; margin: 0 0 10px; }
.cen-bz-firm-oglasi-n { font-size: 12px; font-weight: 700; background: var(--cbz-chip); color: var(--cbz-muted); padding: 1px 8px; border-radius: 20px; vertical-align: middle; }
.cen-bz-mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cen-bz-mini-list a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--cbz-ink); padding: 7px 8px; border-radius: 8px; transition: background .15s ease; }
.cen-bz-mini-list a:hover { background: #f5f4ef; }
.cen-bz-mini-tag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.cen-bz-mini-txt { font-size: 14px; }
.cen-bz-firm-oglasi-all { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--cbz-blue); text-decoration: none; }
.cen-bz-firm-oglasi-all:hover { text-decoration: underline; }

/* ---------- Community trust — „Пријави го овој оглас" ---------- */
.cen-bz-report { margin: 22px 0 4px; text-align: center; }
.cen-bz-report-toggle { background: none; border: none; color: var(--cbz-faint); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 6px; }
.cen-bz-report-toggle:hover { color: #b32d2e; }
.cen-bz-report-form { max-width: 420px; margin: 10px auto 0; text-align: left; background: #fbf8f4; border: 1px solid #ecdfd0; border-radius: 10px; padding: 14px 16px; }
.cen-bz-report-sub { font-size: 12px; color: var(--cbz-muted); margin: 0 0 8px; }
.cen-bz-report-reason, .cen-bz-report-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--cbz-line2); border-radius: 8px; font-size: 13px; box-sizing: border-box; margin-bottom: 8px; background: #fff; }
.cen-bz-report-foot { display: flex; align-items: center; gap: 12px; }
.cen-bz-report-msg { font-size: 12px; }

/* ---------- Секција фирма + копче ---------- */
.cen-bz-s-firm { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--cbz-line); }
.cen-bz-btn { display: inline-block; background: var(--cbz-blue); color: #fff; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-size: 14px; transition: background .15s ease; }
.cen-bz-btn:hover { background: var(--cbz-blue-d); color: #fff; }

/* =========================================================
   RESPONSIVE — таблет и мобилен
   ========================================================= */

/* Таблет надолу: пребарувањето во колона (без собирање на паѓачките) */
@media (max-width: 640px) {
	.cen-bz-search { flex-direction: column; }
	.cen-bz-search > * { width: 100%; flex: none; }
	.cen-bz-clear { justify-content: center; padding: 8px; }
}

/* Мобилен */
@media (max-width: 560px) {
	.cen-bz-wrap { padding: 18px 14px 44px; }
	/* Ред на мобилен: слика горе-лево, „Контакт" ПОД сликата, содржината десно (spans двата реда) */
	.cen-bz-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "thumb main" "action main"; align-items: start; column-gap: 11px; row-gap: 8px; padding: 11px; }
	.cen-bz-thumb { grid-area: thumb; width: 72px; height: 72px; }
	.cen-bz-row-main { grid-area: main; }
	.cen-bz-row-action { grid-area: action; align-self: start; }
	.cen-bz-btn-sm { display: block; text-align: center; padding: 8px 12px; }
	.cen-bz-row-title { font-size: 14.5px; }
	.cen-bz-lead { padding: 16px 15px; }
	.cen-bz-lead-grid { grid-template-columns: 1fr; }
	.cen-bz-s-table th { width: 116px; font-size: 13px; }
	.cen-bz-prod-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* =========================================================
   Поправки за woodmart темата (опфаќаат само берза/фирма страни — CSS се вчитува таму)
   ========================================================= */

/* Скриј го лебдечкото „Sidebar" копче на берза страните (немаат sidebar) */
.post-type-archive-berza_oglas .wd-sidebar-opener,
.single-berza_oglas .wd-sidebar-opener,
.tax-berza_material .wd-sidebar-opener,
.tax-berza_location .wd-sidebar-opener { display: none !important; }

/* Темата им наметнува голема висина на инпутите/паѓачките → форсирај нормална, читлива висина */
.cen-bz-search input, .cen-bz-search select,
.cen-bz-lead input:not([type="checkbox"]):not([type="radio"]), .cen-bz-lead select {
	height: 46px !important;
	min-height: 0 !important;
	line-height: 1.3;
}
