/* Попапот „Добредојде“. Префикс .cen-dd. Банерот има свој стил (.cen-ddb) во шаблонот.
   Формата е иста во вградениот и во WoodMart попапот (`inc/forma.php`); стилот на почетниот WoodMart попап е на крајот.
   Прагови како WoodMart: десктоп ≥1025px · таблет 768–1024 · мобилен под 768. */

.cen-dd[hidden] { display: none !important; }

.cen-dd {
	position: fixed;
	inset: 0;
	z-index: 100000; /* над заглавјето и менијата на WoodMart */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 28, 18, .62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	overflow-y: auto;
	animation: cen-dd-vlez .25s ease-out;
}
@keyframes cen-dd-vlez { from { opacity: 0; } to { opacity: 1; } }

html.cen-dd-otvoren, html.cen-dd-otvoren body { overflow: hidden !important; }

.cen-dd-kutija {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	width: 100%;
	max-width: 980px;
	max-height: calc(100vh - 48px);
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	color: #1f2933;
}

.cen-dd-baner { min-height: 100%; }
.cen-dd-baner > * { height: 100%; }

/* 🔴 Темата (WoodMart) стилизира секое копче со `:is(.btn, .button, button, [type=submit])` и полето за пребарување со
   `input[type=search]` (box-sizing: content-box). Мерено на стендот со WoodMart 8.4 (09.11): сиво копче, сиви маркети,
   скриеното „Додај“ видливо, полето надвор од колоната. Затоа сè во формата е со префикс `.cen-dd-forma`, плус ова. */
.cen-dd-forma [hidden] { display: none !important; }
.cen-dd-forma button { min-height: 0; box-shadow: none; letter-spacing: normal; text-transform: none; }
.cen-dd-forma input[type="search"] { box-sizing: border-box; max-width: 100%; }

.cen-dd-forma {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 34px 32px 26px;
	overflow-y: auto;
	min-width: 0;
}

.cen-dd-forma .cen-dd-naslov { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; color: #0c4a2c; }
.cen-dd-forma .cen-dd-pod { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: #52606d; }

.cen-dd-forma .cen-dd-label { display: block; margin: 6px 0 2px; padding: 0; font-size: 14px; font-weight: 700; color: #1f2933; }
.cen-dd-forma .cen-dd-label abbr { color: #e63946; text-decoration: none; border: 0; }
.cen-dd-forma .cen-dd-izborno { font-weight: 400; color: #7b8794; }

.cen-dd-forma .cen-dd-select,
.cen-dd-forma .cen-dd-baraj {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid #cbd2d9;
	border-radius: 10px;
	background-color: #fff;
	font-size: 16px; /* 16px: iOS не зумира при фокус */
	color: #1f2933;
}
.cen-dd-forma .cen-dd-select:focus,
.cen-dd-forma .cen-dd-baraj:focus { outline: none; border-color: #178a4d; box-shadow: 0 0 0 3px rgba(23, 138, 77, .18); }
.cen-dd-forma .cen-dd-select.je-greska { border-color: #e63946; box-shadow: 0 0 0 3px rgba(230, 57, 70, .15); }

.cen-dd-forma .cen-dd-marketi { margin: 0; padding: 0; border: 0; min-width: 0; }
.cen-dd-forma .cen-dd-baraj { height: 40px; font-size: 15px; margin: 4px 0 8px; }

.cen-dd-forma .cen-dd-mreza {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	max-height: 188px;
	overflow-y: auto;
	padding: 2px;
	overscroll-behavior: contain;
}
.cen-dd-forma .cen-dd-m {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	padding: 6px;
	border: 1.5px solid #e4e7eb;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, transform .1s;
}
.cen-dd-forma .cen-dd-m img { max-width: 100%; max-height: 36px; object-fit: contain; pointer-events: none; }
.cen-dd-forma .cen-dd-m:hover { border-color: #9aa5b1; }
.cen-dd-forma .cen-dd-m:focus-visible { outline: 2px solid #178a4d; outline-offset: 2px; }
.cen-dd-forma .cen-dd-m[aria-pressed="true"] { border-color: #178a4d; box-shadow: 0 0 0 2px #178a4d inset; background: #f0faf4; }
.cen-dd-forma .cen-dd-m[aria-pressed="true"]::after {
	content: "";
	position: absolute;
	top: -6px;
	right: -6px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #178a4d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.cen-dd-forma .cen-dd-m[hidden] { display: none; }

.cen-dd-forma .cen-dd-dodaj {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 8px 12px;
	border: 1.5px dashed #178a4d;
	border-radius: 10px;
	background: #f0faf4;
	color: #0c4a2c;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
}
.cen-dd-forma .cen-dd-slobodni { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cen-dd-forma .cen-dd-slobodni:empty { display: none; }
.cen-dd-forma .cen-dd-cip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px 4px 10px;
	border-radius: 999px;
	background: #e9f5ee;
	color: #0c4a2c;
	font-size: 13px;
	font-weight: 600;
}
.cen-dd-forma .cen-dd-cip button {
	display: inline-block;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(12, 74, 44, .12);
	color: #0c4a2c;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

.cen-dd-forma .cen-dd-greska { margin: 4px 0 0; font-size: 14px; color: #c81e1e; }

.cen-dd-forma .cen-dd-prodolzi {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	margin-top: 8px;
	height: 50px;
	border: 0;
	border-radius: 10px;
	background: var(--cen-dd-kopce, #ff5a1f); /* портокаловата од „Додај во кошничка“, или бојата од елементот */
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, transform .1s;
}
.cen-dd-forma .cen-dd-prodolzi:hover { filter: brightness(.92); }
.cen-dd-forma .cen-dd-prodolzi:active { transform: translateY(1px); }
.cen-dd-forma .cen-dd-prodolzi[disabled] { opacity: .7; cursor: progress; }

.cen-dd-forma .cen-dd-reg { margin: 2px 0 0; font-size: 14px; text-align: center; color: #52606d; }
.cen-dd-forma .cen-dd-reg a { color: #1d4ed8; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.cen-dd-forma .cen-dd-preskokni {
	display: inline-block;
	align-self: center;
	padding: 6px 10px;
	border: 0;
	background: none;
	color: #7b8794;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}

/* Таблет: банерот горе, формата под него. */
@media (max-width: 1024px) {
	.cen-dd { padding: 20px; align-items: flex-start; }
	.cen-dd-kutija { grid-template-columns: 1fr; max-width: 680px; max-height: none; margin: auto 0; }
	.cen-dd-forma { padding: 24px 28px 22px; overflow: visible; }
	.cen-dd-forma .cen-dd-mreza { grid-template-columns: repeat(5, minmax(0, 1fr)); max-height: 172px; }
}

/* Мобилен: цел екран, банерот краток, копчето секогаш видливо долу. */
@media (max-width: 767px) {
	.cen-dd { padding: 0; align-items: stretch; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.cen-dd-kutija { border-radius: 0; min-height: 100%; max-width: none; box-shadow: none; display: flex; flex-direction: column; }
	.cen-dd-forma { padding: 18px 16px 0; gap: 8px; flex: 1; }
	.cen-dd-forma .cen-dd-naslov { font-size: 21px; }
	.cen-dd-forma .cen-dd-pod { font-size: 13px; }
	.cen-dd-forma .cen-dd-mreza { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 176px; }
	.cen-dd-forma .cen-dd-m { height: 48px; }
	.cen-dd-forma .cen-dd-prodolzi {
		position: sticky;
		bottom: 0;
		margin: 8px -16px 0;
		height: 56px;
		border-radius: 0;
		box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
	}
	.cen-dd-forma .cen-dd-reg { padding-bottom: 14px; order: 9; }
}

@media (prefers-reduced-motion: reduce) {
	.cen-dd { animation: none; }
	.cen-dd-pop-znak::before { animation: none; }
}

/* ── WoodMart попап (0.2.0) ─────────────────────────────────────────────────────
   Почетниот попап (`cen_dd_wd_pocetna_sodrzina()`): редот `cen-dd-pop`, лево `cen-dd-pop-baner`, десно
   `cen-dd-pop-forma`. Стилот виси САМО на тие класи: тргни ја класата во WPBakery и колоната е твоја.
   Позадината на колоната ја надгласува „Design Options“ во WPBakery (тој пишува !important). */

.vc_row.cen-dd-pop { margin-left: 0; margin-right: 0; }
.vc_row.cen-dd-pop > .vc_column_container > .vc_column-inner { padding: 0; height: 100%; }
.vc_row.cen-dd-pop > .vc_column_container > .vc_column-inner > .wpb_wrapper { height: 100%; }

.cen-dd-pop-baner > .vc_column-inner > .wpb_wrapper {
	display: flex;
	flex-direction: column;
	gap: 0;
	box-sizing: border-box;
	padding: 40px 36px 32px;
	color: #fff;
	background: radial-gradient(120% 90% at 100% 0%, #2fb36b 0%, rgba(47, 179, 107, 0) 55%), linear-gradient(160deg, #0c4a2c 0%, #11683c 55%, #178a4d 100%);
}
.cen-dd-pop-baner .wpb_content_element { margin-bottom: 0; }
.cen-dd-pop-baner .wpb_text_column { color: #fff; }
.cen-dd-pop-baner h2 { margin: 16px 0 12px; color: #fff; font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.cen-dd-pop-baner h2 span { color: #ffd166; }
.cen-dd-pop-baner p { margin: 0 0 16px; color: rgba(255, 255, 255, .9); font-size: 16px; line-height: 1.5; }
.cen-dd-pop-baner .cen-dd-pop-znak {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 14px 6px 10px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.3;
}
.cen-dd-pop-znak::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ffd166;
	box-shadow: 0 0 0 4px rgba(255, 209, 102, .25);
	animation: cen-dd-puls 1.8s ease-in-out infinite;
}
@keyframes cen-dd-puls { 50% { box-shadow: 0 0 0 8px rgba(255, 209, 102, 0); } }
.cen-dd-pop-baner ul { display: grid; gap: 9px; margin: 2px 0 0; padding: 0; list-style: none; }
.cen-dd-pop-baner li {
	position: relative;
	margin: 0;
	padding-left: 30px;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	list-style: none;
}
.cen-dd-pop-baner li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd166' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.cen-dd-pop-slika { width: 100%; max-width: 360px; margin: auto auto 0; padding-top: 18px; }
.cen-dd-pop-slika svg { display: block; width: 100%; height: auto; }

/* Таблет: колоните една под друга (одлука 09.11, три екрани), банерот пократок. */
@media (max-width: 1024px) {
	.vc_row.cen-dd-pop > .vc_column_container { width: 100%; }
	.cen-dd-pop-baner > .vc_column-inner > .wpb_wrapper { padding: 28px 28px 22px; }
	.cen-dd-pop-baner h2 { font-size: 28px; }
	.cen-dd-pop-slika { max-width: 220px; margin: 0 auto; }
}
/* Мобилен: само најважното, за формата да е на екранот без лизгање. */
@media (max-width: 767px) {
	.cen-dd-pop-baner > .vc_column-inner > .wpb_wrapper { padding: 22px 18px 18px; }
	.cen-dd-pop-baner h2 { margin: 10px 0 8px; font-size: 23px; }
	.cen-dd-pop-baner p { margin-bottom: 0; font-size: 14px; }
	.cen-dd-pop-baner ul, .cen-dd-pop-slika { display: none; }
}
