/*
 * Jószerszámbolt Athalie bővítmény – oldalsáv stílusok
 * Két oldalsávra is érvényes:
 *   - Divi 5 Theme Builder oldalsáv modul (.et_pb_widget_area)
 *   - klasszikus Divi oldalsáv (#sidebar)
 * Elemek: kategóriafa (Iks Menu), szöveges cím, menü widget, termék widget.
 */

:root {
	--jszb-primary: #2f5999;
	--jszb-primary-hover: #244477;
	--jszb-text: #5b5b5b;
	--jszb-text-light: #888888;
	--jszb-radius: 4px;
	--jszb-border: #e6e8ec;
	--jszb-border-strong: #d3d7de;
	--jszb-bg-soft: #f6f7f9;
	--jszb-bg-tint: #eef2f8;
	--jszb-font: "Poppins", Helvetica, Arial, sans-serif;
}

/* =====================================================================
 * 1. Widget kártyák és térközök
 * =================================================================== */

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) {
	font-family: var(--jszb-font);
}

/* Divi 5 oldalsáv modul: widgetek egymás alatt, egyenletes közzel */
body.jszb-athalie .et_pb_widget_area {
	display: flex;
	flex-direction: column;
	gap: 20px;
	box-sizing: border-box;
	max-width: 100%;
}

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget {
	box-sizing: border-box;
	float: none;
	width: 100%;
	max-width: 100%;
	margin: 0 0 20px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--jszb-border);
	border-radius: var(--jszb-radius);
	box-shadow: 0 1px 3px rgba(32, 48, 80, .05);
	font-size: 13px;
	line-height: 1.6;
	font-weight: 300;
	letter-spacing: .4px;
	color: var(--jszb-text-light);
}
body.jszb-athalie .et_pb_widget_area > .et_pb_widget { margin-bottom: 0; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget:last-child { margin-bottom: 0; }

/* Üres widgetek (pl. csak egy üres bekezdés) ne foglaljanak helyet */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget:has(> p:empty:only-child) { display: none; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_block > p:empty { display: none; }

/* Linkek */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget a {
	color: var(--jszb-primary);
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget a:hover { color: var(--jszb-primary-hover); }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget a:focus-visible,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__inner:focus-visible,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle:focus-visible {
	outline: 2px solid var(--jszb-primary);
	outline-offset: 2px;
}

/* =====================================================================
 * 2. Szöveges cím widget (pl. "Termékeink" félkövér szöveg)
 *    – nincs kártya, csak cím kék kiemeléssel
 * =================================================================== */

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_block.widget_text {
	padding: 0;
	margin: 0 0 4px;
	background: none;
	border: 0;
	box-shadow: none;
}
body.jszb-athalie .et_pb_widget_area > .widget_block.widget_text { margin: 0 0 -8px; }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_block.widget_text p {
	position: relative;
	margin: 0;
	padding: 0 0 12px;
	font-family: var(--jszb-font);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3125;
	letter-spacing: .046875em;
	text-transform: uppercase;
	color: var(--jszb-text);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_block.widget_text p strong { font-weight: 700; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_block.widget_text p::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 40px;
	height: 3px;
	background: var(--jszb-primary);
	border-radius: 2px;
}

/* Widget cím (h4 / h3) a kártyákban */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widgettitle {
	position: relative;
	margin: 0 0 14px;
	padding: 0 0 12px;
	font-family: var(--jszb-font);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .046875em;
	text-transform: uppercase;
	color: var(--jszb-text);
	border-bottom: 1px solid var(--jszb-border);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widgettitle::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 40px;
	height: 3px;
	background: var(--jszb-primary);
	border-radius: 2px;
}

/* =====================================================================
 * 3. Kategóriafa (Iks Menu – .iksm-*)
 * =================================================================== */

/* A kategóriafát tartalmazó kártya: szorosabb belső tér, hogy a sorok teljes szélességűek legyenek */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget:has(.iksm) { padding: 6px; }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree__inner {
	background: transparent;
	border: 0;
	box-shadow: none;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree__inner { display: block; padding: 0; margin: 0; }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term { margin: 0; padding: 0; }

/* Első szint: elválasztó vonalak */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--parent { border-bottom: 1px solid var(--jszb-border); }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--parents > .iksm-terms-tree__inner > .iksm-term--parent:last-child { border-bottom: 0; }

/* Egy sor: link + nyitó gomb */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__inner {
	display: flex;
	align-items: stretch;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--jszb-radius);
	cursor: pointer;
	transition: background-color .2s ease, box-shadow .2s ease;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__inner:hover { background: var(--jszb-bg-soft); }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__link {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	padding: 10px 10px 10px 12px;
	font-family: var(--jszb-font);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: .3px;
	color: var(--jszb-text-light);
	text-decoration: none;
	background: transparent;
	border: 0;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__text { overflow-wrap: anywhere; }

/* A beépülő behúzás (15/30/45px) helyett vonalas behúzás van, így mély szinten sem szűkül be */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__shifts { display: none !important; }

/* Első szint: kicsit erősebb */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--parent > .iksm-term__inner > .iksm-term__link {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--jszb-text);
}

/* Hover */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__inner:hover > .iksm-term__link,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__link:hover { color: var(--jszb-primary); }

/* Aktuális kategória / aktív ág */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--current > .iksm-term__inner {
	background: var(--jszb-bg-tint);
	box-shadow: inset 3px 0 0 var(--jszb-primary);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--current > .iksm-term__inner > .iksm-term__link {
	color: var(--jszb-primary);
	font-weight: 600;
}

/* Nyitó/záró gomb */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle {
	flex: 0 0 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	color: var(--jszb-text-light);
	background: transparent;
	border: 0;
	border-left: 1px solid transparent;
	border-radius: 0 var(--jszb-radius) var(--jszb-radius) 0;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle:hover { color: var(--jszb-primary); background: var(--jszb-bg-tint); }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle__inner { display: flex; align-items: center; justify-content: center; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle__inner i {
	display: block;
	font-size: 11px;
	line-height: 1;
	transition: transform .25s ease;
}
/* Kinyitott állapot: a nyíl megfordul (a plugin osztálya vagy a látható gyerekfa alapján) */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--expanded > .iksm-term__inner .iksm-term__toggle__inner i,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term--open > .iksm-term__inner .iksm-term__toggle__inner i,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term:has(> .iksm-terms-tree--children[style*="display: block"]) > .iksm-term__inner .iksm-term__toggle__inner i {
	transform: rotate(180deg);
}

/* Gyerek szintek: függőleges vezetővonal */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--children { margin: 0; padding: 0; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--children > .iksm-terms-tree__inner {
	margin: 0 0 6px 14px;
	padding: 0 0 0 4px;
	border-left: 1px solid var(--jszb-border-strong);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--children .iksm-term__link {
	padding: 8px 8px 8px 10px;
	font-size: 12.5px;
	font-weight: 400;
	color: var(--jszb-text-light);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--children .iksm-term--has-children > .iksm-term__inner > .iksm-term__link {
	color: var(--jszb-text);
	font-weight: 500;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-terms-tree--children .iksm-term__toggle { flex-basis: 32px; }

/* =====================================================================
 * 4. Menü widget (Szolgáltatások, Gépkölcsönzés, Nagykereskedőknek)
 * =================================================================== */

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu { padding: 6px; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu ul,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu .menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li {
	margin: 0;
	padding: 0;
	background: none;
	border-bottom: 1px solid var(--jszb-border);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li:last-child { border-bottom: 0; }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 12px;
	font-family: var(--jszb-font);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: .3px;
	color: var(--jszb-text);
	border-radius: var(--jszb-radius);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li a::after {
	content: "";
	flex: 0 0 7px;
	width: 7px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: .45;
	transition: transform .2s ease, opacity .2s ease;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li a:hover {
	color: var(--jszb-primary);
	background: var(--jszb-bg-soft);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li a:hover::after { opacity: 1; transform: translateX(3px) rotate(45deg); }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li.current-menu-item > a,
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li.current_page_item > a {
	color: var(--jszb-primary);
	background: var(--jszb-bg-tint);
	box-shadow: inset 3px 0 0 var(--jszb-primary);
}

/* =====================================================================
 * 5. Termék widget (WooCommerce "Termékek" lista)
 * =================================================================== */

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li {
	position: relative;
	box-sizing: border-box;
	min-height: 88px;
	margin: 0;
	padding: 12px 0 12px 76px;    /* 64px kép + 12px köz */
	border-bottom: 1px solid var(--jszb-border);
	background: none;
	overflow: hidden;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li:first-child { padding-top: 0; min-height: 76px; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li:first-child img { top: 0; }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li:last-child { border-bottom: 0; padding-bottom: 0; }

body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li img {
	position: absolute;
	top: 12px;
	left: 0;
	float: none;
	width: 64px;
	height: 64px;
	margin: 0;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--jszb-border);
	border-radius: var(--jszb-radius);
	box-shadow: none;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li a {
	display: block;
	margin: 0 0 4px;
	font-weight: 500;
	color: var(--jszb-text);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li a:hover .product-title { color: var(--jszb-primary); }
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li .product-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: .2px;
	text-transform: none;
	color: var(--jszb-text);
	overflow-wrap: anywhere;
	transition: color .2s ease;
}

/* Ár: áthúzott régi + kék akciós ár */
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li del {
	margin-right: 6px;
	font-size: 12px;
	font-weight: 300;
	color: var(--jszb-text-light);
	opacity: .85;
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li ins {
	background: none;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--jszb-primary);
}
body.jszb-athalie :is(#sidebar, .et_pb_widget_area) ul.product_list_widget li > .woocommerce-Price-amount {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--jszb-primary);
}

/* =====================================================================
 * 6. Érintés, kis kijelzők
 * =================================================================== */

@media (pointer: coarse) {
	body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__link { padding-top: 12px; padding-bottom: 12px; }
	body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .iksm-term__toggle { flex-basis: 44px; }
	body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .widget_nav_menu li a { padding-top: 14px; padding-bottom: 14px; }
}

@media (max-width: 980px) {
	/* Az oldalsáv teljes szélességű, a kártyák között kisebb a köz */
	body.jszb-athalie .et_pb_widget_area { gap: 16px; }
	body.jszb-athalie :is(#sidebar, .et_pb_widget_area) .et_pb_widget { margin-bottom: 16px; }
	body.jszb-athalie .et_pb_widget_area > .et_pb_widget { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
	body.jszb-athalie :is(#sidebar, .et_pb_widget_area) * { transition: none !important; }
}
