/* ============================================================
   UDZBENICI CUSTOM — Responsive rewrite
   Originalne fiksne širine zamijenjene fluid layoutom
   ============================================================ */

/* ── SHOP HEAD CONTAINER ── */
.shop_head_container {
	width: 100%;
	margin: 0;
	padding-bottom: 45px;
	display: table;
	background: #0073c8;
	top: 0;
	z-index: 4500;
}

.shop_head_container section {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	display: table;
	padding: 0 16px;
	box-sizing: border-box;
}

/* ── LANGUAGE SWITCHER ── */
.language_content {
	width: auto;
	max-width: 320px;
	float: left;
	display: table;
}

.language_content ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.language_content ul li {
	float: left;
	width: auto;
	min-width: 120px;
	margin: 8px 20px 0 0;
}

.language_content ul li img {
	margin-right: 10px;
	vertical-align: middle;
}

.language_content ul li span {
	color: #fff;
}

.language_content ul li a {
	display: flex;
	align-items: center;
}

/* ── HEADER ── */
.header_udzbenici {
	width: 100%;
	max-width: 1080px;
	margin: -48px auto 20px auto;
	padding: 33px 0 85px 0;
	display: table;
	border-radius: 0 0 150px 150px;
	background: #0073c8;
	position: relative;
	rotate: -5deg;
	box-sizing: border-box;
	z-index: 80;
}

.header_udzbenici a {
	float: left;
	padding: 0 20px;
	rotate: 5deg;
	max-width: 200px;
}

.header_udzbenici h1 {
	color: #fff;
	font-size: clamp(24px, 4vw, 46px);
	position: absolute;
	top: 64px;
	rotate: 5deg;
	left: calc(50% - 265px);
	max-width: calc(100% - 220px);
	white-space: nowrap;
}

.header_udzbenici h1::after {
	position: absolute;
	top: 53px;
	border-bottom: 1px solid #fff;
	content: '';
	width: 100%;
	left: 0;
}

.header_udzbenici h2 {
	position: absolute;
	top: 114px;
	color: #fff;
	font-size: clamp(16px, 2.5vw, 27px);
	rotate: 5deg;
	left: calc(50% - 265px);
	max-width: calc(100% - 220px);
	white-space: nowrap;
}

/* ── MAIN CONTAINER ── */
.main_container {
	width: 100%;
	max-width: 1080px;
	margin: 80px auto;
	padding: 0 16px;
	box-sizing: border-box;
}

/* ── NAV (subpage upper menu) ── */
.main_container nav {
	width: 100%;
	margin: 0 0 30px;
	padding: 0;
	display: table;
}

.main_container nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.main_container nav ul.udzbenik_ul li {
	width: 90%;
	margin: 0 10px 10px 0;
}

.main_container nav ul li {
	width: auto;
	float: left;
	margin: 0 10px 0 0;
}

.main_container nav ul li a {
	font-size: 13px;
	color: #000;
	font-weight: 500;
	text-transform: none;
	margin: 0;
	padding: 9px 15px 10px;
	background: #cdcdcd;
	border-radius: 4px;
	display: block;
}

.main_container nav ul li a:hover,
.main_container nav ul li a.active {
	color: #fff;
	background: #0073c8;
}

/* ── BOOKS CONTAINER GROUP ── */
.books_container_group .upper_menu {
	margin: 0 auto;
	display: flex;
	width: 100%;
	position: sticky;
	top: 37px;
	z-index: 100;
}

.main_container .upper_menu ul.udzbenik_ul {
	width: auto;
	max-width: 450px;
	margin: 0 auto;
}

.books_container_group .upper_menu p.left_menu {
	width: 201px;
	flex-shrink: 0;
}

.main_container .upper_menu ul.udzbenik_ul li {
	border-radius: 0;
	margin: 0;
	width: 33.33%;
}

.upper_menu nav {
	display: flex;
	align-items: center;
	align-content: center;
	width: 100%;
	background: #fff;
}

.main_container .left_menu ul li {
	margin: 0 10px 0 0 !important;
}

.main_container .upper_menu ul li a,
.main_container .left_menu ul li a {
	border-radius: 0;
	text-transform: uppercase;
	font-size: 18px;
	padding: 5px 25px;
	text-align: center;
	color: #fff;
}

.main_container .left_menu ul li a {
	padding: 15px 25px;
}

/* Colour coding left/upper menu */
.main_container .upper_menu ul li:nth-of-type(1) a,
.main_container .left_menu ul li:nth-of-type(3n-2) a { background: #7da7d9; }
.main_container .upper_menu ul li:nth-of-type(2) a,
.main_container .left_menu ul li:nth-of-type(3n-1) a { background: #f4989d; }
.main_container .upper_menu ul li:nth-of-type(3) a,
.main_container .left_menu ul li:nth-of-type(3n-3) a { background: #fec689; }

.main_container .upper_menu ul li a:hover,
.main_container .left_menu ul li a:hover { font-size: 18px; }

.main_container .upper_menu ul li:nth-of-type(1) a:hover,
.main_container .left_menu ul li:nth-of-type(3n-2) a:hover { background: #4580c9; }
.main_container .upper_menu ul li:nth-of-type(2) a:hover,
.main_container .left_menu ul li:nth-of-type(3n-1) a:hover { background: #ee4d55; }
.main_container .upper_menu ul li:nth-of-type(3) a:hover,
.main_container .left_menu ul li:nth-of-type(3n-3) a:hover { background: #ff9c32; }

/* ── LEFT MENU SIDEBAR ── */
.books_container_group aside.left_menu {
	width: 230px;
	float: left;
	padding: 0 0 0 10px;
	position: sticky;
	top: 60px;
	flex-shrink: 0;
}

.glossymenu li a {
	font-family: "Rubik", Arial, Tahoma, Calibri, Verdana, sans-serif;
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	text-transform: uppercase;
}

.glossymenu li a.active,
.glossymenu li a:hover {
	font-size: 18px !important;
	color: #fff !important;
}

/* ── BOOK HOMEPAGE CONTENT ── */
.books_container_group .book_homepage {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	margin-left: 200px; /* matches sidebar width + padding */
}

/* ── BOOK GROUP VIEW ── */
.books_container_group .book_group_view {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
}

.books_container_group .book_group_view h2 {
	margin: 0 auto 20px auto;
	font-weight: 700;
}

.books_container_group .book_group_view .book_categ_group {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	border: 1px solid #f3f3f3;
	box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
	box-sizing: border-box;
	padding: 5px;
	margin: 5px 0;
}

.books_container_group .book_group_view .book_categ_group h3 {
	margin: 20px 0;
	display: table;
	border-bottom: 1px solid #d9d9d9;
	width: 100%;
	scroll-margin-top: 70px;
	text-align: center;
}

.books_container_group .book_group_view article {
	display: table;
	width: 33%;
	margin: 10px 1px;
}

/* ── BOOK ARTICLE CARD ── */
article.udzbenici {
	position: relative;
	width: 197px;
	margin: 0 24px 10px 0;
	height: 150px;
}

article.udzbenici figure,
article.udzbenici_details {
	max-width: 197px;
	max-height: 150px;
	margin: 0 auto !important;
	overflow: hidden;
	vertical-align: middle;
	text-align: center;
	background: transparent;
	border: none;
	float: none;
	padding: 0;
	width: 100%;
	height: 100%;
}

article.udzbenici figure.normal_img img,
article.udzbenici_details figure.normal_img img {
	width: 197px;
	max-height: 150px;
	vertical-align: middle;
	text-align: center;
	height: 196px;
	object-fit: cover;
}

article.udzbenici figure.hover_img,
article.udzbenici_details figure.hover_img { display: none; }

article.udzbenici figure img,
article.udzbenici_details figure img {
	width: 100%;
	height: auto;
	transition: opacity 0.5s ease-in-out;
}

article.udzbenici strong {
	text-transform: uppercase;
	margin: 5px auto;
	display: table;
	font-size: 14px;
	font-weight: 500;
}

article.udzbenici h1 {
	text-align: center;
	font-size: 16px;
	margin-top: 10px;
	height: 20px;
	overflow: hidden;
}

article.udzbenici em {
	font-size: 12px;
	text-align: center;
	color: rgba(0, 0, 0, 0.65);
	font-weight: 400;
	margin: 0;
	padding: 20px 0 0;
	line-height: 22px;
	overflow: hidden;
	height: 44px;
	display: table;
}

article.udzbenici a.udz_btn,
article.udzbenici_details a.udz_btn {
	display: table;
	width: 200px;
	margin: 10px auto;
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	text-transform: none;
	padding: 7px 15px 8px;
	border-radius: 4px;
	color: #fff;
	background: #0073c8;
}

article.udzbenici_details a.udz_btn { margin: 10px 0; }

article.udzbenici a.udz_btn:hover,
article.udzbenici_details a.udz_btn:hover {
	font-size: 12px;
	color: #000;
	background: #cdcdcd;
}

article.udzbenici figure a {
	padding: 0;
	border-radius: 0;
	background-color: transparent;
}

/* ── BOOK DETAIL VIEW ── */
.book_group_view_details {
	display: table;
	margin: 0 auto;
}

.book_group_view_details .udzbenici_details {
	position: relative;
	width: 100%;
	max-width: 750px;
	margin: 30px auto 0 auto !important;
	display: table;
	height: auto; /* was fixed 150px — causes overflow on mobile */
}

.udzbenici_details .normal_img,
.udzbenici_details .hover_img {
	float: left;
	width: 300px;
	height: 300px;
	max-height: 300px;
	margin: 0 20px 0 0;
}

article.udzbenici_details figure.normal_img a img {
	width: 100%;
	height: auto;
	min-height: 100%;
}

.udzbenici_details h1 {
	text-align: left;
	font-size: 20px;
	margin-bottom: 5px;
	font-weight: 700;
}

.udzbenici_details em {
	text-align: left;
	font-size: 16px;
	margin-bottom: 15px;
	font-weight: 400;
	padding: 0;
}

.udzbenici_details em:nth-of-type(1) { margin-top: 0; }

.udzbenici_details em label { font-weight: 700; }

/* ── NEWS ARTICLES ── */
.books_container_group .book_homepage_news article {
	border-top: 1px solid #000;
	border-bottom: 1px solid #000;
	display: table;
	width: 100%;
	box-sizing: border-box;
}

.books_container_group .book_homepage_news article h1 {
	font-size: 20px;
	color: #000;
	padding-bottom: 15px;
	padding-top: 15px;
	font-weight: 900;
}

.books_container_group .book_homepage_news article em { font-size: 16px; }
.books_container_group .book_homepage_news article p { font-size: 14px; }

.books_container_group .book_homepage_news article div {
	float: left;
	display: table-cell;
	width: 70%;
}

.books_container_group .book_homepage_news article figure {
	max-width: 320px;
	max-height: 270px;
	display: table-cell;
	overflow: hidden;
	vertical-align: middle;
	text-align: center;
	background: transparent;
	border: none;
	float: right;
	margin: 0;
	padding: 0;
	width: 30%;
}

.books_container_group .book_homepage_news article figure img {
	max-width: 320px;
	max-height: 270px;
	vertical-align: middle;
	text-align: center;
	padding: 20px;
}

/* ── PRICE ── */
.product_price_cnt { margin: 12px 0; }
.product_price_cnt > div {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.kn_price {
	font-size: 22px;
	font-weight: 700;
	color: #0073c8;
	width: 100%;
}
.kn_oldprice {
	font-size: 15px;
	font-weight: 400;
	color: #aaa;
	text-decoration: line-through;
}

/* ============================================================
   LOGIN MODAL FIX
   leanModal trebá overflow:hidden na body + z-index stacking
   ============================================================ */
#lean_overlay {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background: #000;
	display: none;
}

#signin,
#signup,
#forgotten {
	display: none;
	position: fixed;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%);
	z-index: 200;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	padding: 0;
	min-width: 340px;
	max-width: 90vw;
	box-sizing: border-box;
}

#signin-ct,
#signup-ct,
#forgotten-ct {
	padding: 0;
}

#signin-header,
#signup-header,
#forgotten-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px 14px;
	border-bottom: 1px solid #e0e0e0;
	background: #0073c8;
	border-radius: 8px 8px 0 0;
}

#signin-header h1,
#signup-header h1,
#forgotten-header h1 {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 8px;
}

#signin-header h1 .material-icons,
#signup-header h1 .material-icons,
#forgotten-header h1 .material-icons {
	font-size: 22px;
	color: #fff;
}

#signin-header a.modal_close,
#signup-header a.modal_close,
#forgotten-header a.modal_close {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color 0.2s;
}

#signin-header a.modal_close:hover,
#signup-header a.modal_close:hover,
#forgotten-header a.modal_close:hover {
	color: #fff;
}

#signin-header a.modal_close .material-icons,
#signup-header a.modal_close .material-icons,
#forgotten-header a.modal_close .material-icons {
	font-size: 24px;
}

#signin form,
#signup form,
#forgotten form {
	padding: 20px 24px 24px;
}

.txt-fld {
	margin-bottom: 16px;
}

.txt-fld label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
}

.txt-fld input[type="text"],
.txt-fld input[type="email"],
.txt-fld input[type="password"] {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid #d0d0d0;
	border-radius: 5px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.txt-fld input[type="text"]:focus,
.txt-fld input[type="email"]:focus,
.txt-fld input[type="password"]:focus {
	border-color: #0073c8;
	box-shadow: 0 0 0 3px rgba(0, 115, 200, 0.12);
	outline: none;
}

.txt-fld .submit_button {
	width: 100%;
	padding: 11px;
	background: #0073c8;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.2s;
	font-family: inherit;
}

.txt-fld .submit_button:hover {
	background: #005fa3;
}

.red_star {
	color: #e53e3e;
	margin-left: 3px;
}

.forgotten_password {
	display: block;
	margin-top: 10px;
	font-size: 12px;
	color: #0073c8;
	text-decoration: underline;
	text-align: right;
}

.lean_consent_data {
	font-size: 12px;
	line-height: 1.6;
	color: #555;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 10px;
}

.lean_consent_data input[type="checkbox"] {
	margin-right: 8px;
	vertical-align: top;
	margin-top: 3px;
	flex-shrink: 0;
}

.lean_consent_data label {
	display: inline;
	font-size: 11px;
	font-weight: 400;
	color: #555;
}

.lean_consent_data label p {
	margin-bottom: 6px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── TABLET (≤ 900px) ── */
@media (max-width: 900px) {

	.shop_head_container section {
		padding: 0 12px;
	}

	.header_udzbenici {
		border-radius: 0 0 80px 80px;
		padding: 24px 0 60px 0;
	}

	.header_udzbenici h1 {
		left: 180px;
		top: 50px;
	}

	.header_udzbenici h2 {
		left: 180px;
		top: 90px;
	}

	/* Sidebar stacks above content */
	.books_container_group {
		display: flex;
		flex-direction: column;
	}

	.books_container_group aside.left_menu {
		width: 100%;
		position: static;
		float: none;
		padding: 0;
		margin-bottom: 16px;
	}

	/* Left menu items horizontal on tablet */
	.books_container_group aside.left_menu .glossymenu {
		display: flex !important;
		flex-wrap: wrap;
		gap: 6px;
		list-style: none;
		padding: 0;
		margin: 0;
	}

	.books_container_group aside.left_menu .glossymenu li {
		flex: 1;
		min-width: 120px;
	}

	.glossymenu li a {
		font-size: 14px !important;
		padding: 8px 12px !important;
		text-align: center;
		display: block;
		border-radius: 4px;
	}

	.books_container_group .book_homepage {
		margin-left: 0;
	}

	/* Upper menu */
	.books_container_group .upper_menu {
		position: static;
		flex-wrap: wrap;
	}

	.books_container_group .upper_menu p.left_menu {
		display: none;
	}

	.main_container .upper_menu ul.udzbenik_ul {
		max-width: 100%;
		width: 100%;
	}

	.main_container .upper_menu ul.udzbenik_ul li {
		width: 33.33%;
	}

	/* Book detail */
	.udzbenici_details .normal_img,
	.udzbenici_details .hover_img {
		width: 220px;
		height: 220px;
		max-height: 220px;
	}

	/* News article */
	.books_container_group .book_homepage_news article div {
		width: 100%;
		float: none;
		display: block;
	}

	.books_container_group .book_homepage_news article figure {
		width: 100%;
		float: none;
		display: block;
		max-width: 100%;
		text-align: center;
	}
}

/* ── MOBILE (≤ 600px) ── */
@media (max-width: 600px) {

	.header_udzbenici {
		border-radius: 0 0 40px 40px;
		padding: 16px 0 50px 0;
		margin: -30px auto 20px auto;
		rotate: 0deg; /* Remove tilt on small screens */
	}

	.header_udzbenici a {
		rotate: 0deg;
		max-width: 130px;
		padding: 0 12px;
	}

	.header_udzbenici h1 {
		font-size: 20px;
		rotate: 0deg;
		position: static;
		display: block;
		padding: 10px 16px 0 160px;
		white-space: normal;
		max-width: 100%;
	}

	.header_udzbenici h1::after { display: none; }

	.header_udzbenici h2 {
		font-size: 14px;
		rotate: 0deg;
		position: static;
		display: block;
		padding: 4px 16px 0 160px;
		white-space: normal;
		max-width: 100%;
	}

	.main_container {
		margin: 20px auto;
	}

	/* Book grid: 2 columns */
	.books_container_group .book_group_view article {
		width: 50%;
	}

	article.udzbenici {
		width: 100%;
		height: auto;
		margin: 0 0 16px 0;
	}

	article.udzbenici figure,
	article.udzbenici_details {
		max-width: 100%;
		max-height: none;
		height: 140px;
	}

	article.udzbenici figure.normal_img img,
	article.udzbenici_details figure.normal_img img {
		width: 100%;
		height: 140px;
	}

	article.udzbenici a.udz_btn {
		width: 100%;
	}

	/* Book detail: stack vertically */
	.book_group_view_details .udzbenici_details {
		height: auto;
	}

	.udzbenici_details .normal_img,
	.udzbenici_details .hover_img {
		float: none;
		width: 100%;
		height: auto;
		max-height: none;
		margin: 0 0 16px 0;
	}

	article.udzbenici_details figure.normal_img a img {
		width: 100%;
		height: auto;
		max-height: 280px;
		object-fit: contain;
	}

	.udzbenici_details h1 { font-size: 16px; }
	.udzbenici_details em { font-size: 14px; }

	/* Upper menu: full width */
	.main_container .upper_menu ul li a,
	.main_container .left_menu ul li a {
		font-size: 12px;
		padding: 5px 8px;
	}

	/* Login modal */
	#signin,
	#signup,
	#forgotten {
		min-width: 300px;
		max-width: 96vw;
	}

	#signin form,
	#signup form,
	#forgotten form {
		padding: 16px;
	}
}

/* ── SMALL MOBILE (≤ 380px) ── */
@media (max-width: 380px) {

	.books_container_group .book_group_view article {
		width: 100%;
	}

	.language_content ul li {
		min-width: 100px;
		margin-right: 10px;
	}
}

.login_cnt a.login {
	background: #fff;
}

.language_content ul li a:hover {
	text-decoration: underline;
	color: #fff;
}

.login_udzbenici nav ul li a {
	color: #fff;
}

.login_udzbenici  nav ul li a:hover {
	color: #fff;
}

