/* Košarica webshopa: 3 koraka, greške uz polja, AJAX košarica, mini košarica (26.10.2026) */

/* mini košarica u zaglavlju */
.e5_minicart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}
.e5_minicart:hover { background: var(--bg-alt, #f2f4f7); text-decoration: none; }
.e5_minicart svg { display: block; }
.e5_minicart_count {
	position: absolute;
	top: 0;
	left: 24px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--brand, #ef4236);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.e5_minicart_empty .e5_minicart_count { background: #6b7280; }
.e5_minicart_total { margin-left: 8px; font-size: 14px; font-weight: 600; }
@media (max-width: 600px) { .e5_minicart_total { display: none; } }

/* koraci: 3 stavke */
.HeadShop.e5_steps3 dt { width: 33.33%; }
.HeadShop.e5_steps3 dt:nth-of-type(2):before { content: "\f2bd"; }
.HeadShop.e5_steps3 dt:nth-of-type(3):before { content: "\f14a"; }
@media (max-width: 600px) {
	.HeadShop.e5_steps3 dt a { padding: 10px 8px; font-size: 13px; }
	.HeadShop.e5_steps3 dt:before { display: none; }
}

/* popis grešaka iznad obrasca */
.e5_errors {
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 1px solid #f1b4b0;
	border-left: 4px solid #d93025;
	border-radius: 6px;
	background: #fdf1f0;
	color: #8a1c14;
}
.e5_errors p { margin: 0 0 6px; font-weight: 600; color: inherit; }
.e5_errors ul { margin: 0; padding-left: 18px; }
.e5_errors li { margin: 2px 0; color: inherit; }

/* obrazac koraka 2 */
.e5_checkout [hidden] { display: none !important; }
.e5_checkout_box {
	margin: 0 0 20px;
	padding: 20px;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	background: #fff;
}
.e5_checkout_box h2 { margin: 0 0 14px; font-size: 20px; }
.e5_checkout_box h3 { margin: 20px 0 8px; font-size: 16px; }
.e5_checkout .customer_type { margin: 0 0 14px; padding: 0; border: 0; }
.e5_checkout .customer_type label { margin: 0 18px 0 4px; }
.e5_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.e5_grid .e5_company { display: contents; }
@media (max-width: 700px) { .e5_grid { grid-template-columns: minmax(0, 1fr); } }
.e5_field { display: flex; flex-direction: column; min-width: 0; }
.e5_field label { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.e5_field input[type=text], .e5_field input[type=email], .e5_field input[type=tel], .e5_field input[type=password], .e5_field select,
.e5_pickup select, .e5_service select {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 11px;
	border: 1px solid #c9ced6;
	border-radius: 6px;
	background: #fff;
	font: inherit;
}
.e5_field input:focus, .e5_field select:focus { outline: 2px solid var(--brand, #33425b); outline-offset: 0; border-color: transparent; }
.e5_has_err input, .e5_has_err select, select.e5_err { border-color: #d93025 !important; background: #fffafa; }
.e5_field_err { display: block; margin: 4px 0 0; font-size: 13px; color: #c5221f; }
.e5_choices { margin: 0; padding: 0; list-style: none; }
.e5_choices li { margin: 0 0 8px; }
.e5_choices label { margin-left: 6px; cursor: pointer; }
.e5_pickup, .e5_service { margin: 10px 0 0; }
.e5_pickup label, .e5_service > label { display: block; margin: 0 0 4px; font-weight: 600; }
#delivery_cost p { margin: 8px 0 0; }
.e5_legal { margin: 0 0 12px; font-size: 14px; color: #555; }
.e5_same { margin: 0 0 12px; }
.e5_same label { margin-left: 6px; cursor: pointer; }
.e5_checkout .ButtonBox { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* pregled košarice: AJAX i dostava */
#e5_cart_box { transition: opacity .2s; }
#e5_cart_box.e5_busy { opacity: .55; pointer-events: none; }
#e5_cart_box .cart_quantity { white-space: nowrap; }
#e5_cart_box .cart_quantity input.kolicina { float: none; display: inline-block; width: 70px !important; vertical-align: middle; }
#e5_cart_box .cart_quantity a.e5_cart_remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-left: 6px;
	padding: 0;
	border: 1px solid #d7d7d7;
	border-radius: 6px;
	background: #fff;
	font-size: 22px;
	line-height: 1;
	color: #6b7280; /* ikona barem 3:1 (bilo #9aa3af = 2.5) */
	text-decoration: none;
	vertical-align: middle;
}
#e5_cart_box .cart_quantity a.e5_cart_remove:hover { color: #d93025; border-color: #d93025; }
.e5_delivery_hint { clear: both; margin: 4px 0 20px; text-align: center; }
.e5_delivery_hint p { margin: 2px 0; }
.e5_delivery_free { color: #188038; font-weight: 600; }
.e5_delivery_bar { width: 260px; max-width: 100%; height: 6px; margin: 6px auto 0; border-radius: 3px; background: #e3e6ea; overflow: hidden; }
.e5_delivery_bar span { display: block; height: 100%; background: #188038; }

/* potvrda i račun nakon narudžbe */
.shop_receipt_customer_info_extra { clear: both; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 0 20px 20px; }
.shop_receipt_customer_info .shop_receipt_customer_info_extra h3 { margin: 0; font-size: 17px; }
.shop_receipt_customer_info_extra p { margin: 0; font-weight: 600; }
.e5_change { font-size: 14px; }
.e5_register_after { max-width: 560px; margin: 24px auto; padding: 20px; border: 1px solid #e3e6ea; border-radius: 8px; text-align: left; }
.e5_register_after h3 { margin: 0 0 6px; }
.e5_register_after .nextStep { margin-top: 14px; }

/* izbori (radio/kvačica) u istom retku s oznakom, bez obzira na stil predloška za input/label */
.e5_checkout .customer_type, .e5_choices li, .e5_same { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.e5_checkout input[type=radio], .e5_checkout input[type=checkbox] { display: inline-block; width: auto; height: auto; margin: 0; flex: 0 0 auto; }
.e5_checkout .customer_type label, .e5_choices label, .e5_same label { display: inline; margin: 0 14px 0 0; font-weight: 400; }

/* uski ekrani: stavke košarice kao kartice (tablica je izlazila izvan ekrana) */
@media (max-width: 700px) {
	#e5_cart_box .checkout_process { display: block; }
	#e5_cart_box .checkout_process dl.ListTop { display: none; }
	#e5_cart_box .checkout_process dl[class^="ListBottom"] {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "product product" "price price" "size size" "qty total";
		align-items: center;
		gap: 8px 12px;
		padding: 14px 4px;
	}
	#e5_cart_box .checkout_process dl[class^="ListBottom"] dd { display: block; width: auto; padding: 0; border: 0; text-align: left; }
	#e5_cart_box .checkout_process dl dd.cart_number, #e5_cart_box .checkout_process dl dd.cart_unit { display: none; }
	#e5_cart_box .checkout_process dl dd.cart_product { grid-area: product; display: flex; align-items: center; gap: 12px; }
	#e5_cart_box .artikl-img { margin: 0; flex: 0 0 72px; }
	#e5_cart_box .artikl-info { width: auto; }
	#e5_cart_box .checkout_process dl dd.cart_unit_price { grid-area: price; font-size: 14px; font-weight: 400; color: #555; }
	#e5_cart_box .checkout_process dl dd.cart_size { grid-area: size; }
	#e5_cart_box .checkout_process dl dd.cart_quantity { grid-area: qty; }
	#e5_cart_box .checkout_process dl dd.cart_size:empty, #e5_cart_box .checkout_process dl dd.cart_size:not(:has(select)) { display: none; }
	#e5_cart_box .checkout_process dl dd.cart_total { grid-area: total; text-align: right; }
	#e5_cart_box .PDVList { float: none; width: 100%; padding: 20px 0; }
	.e5_checkout_box { padding: 14px; }
	.e5_checkout .ButtonBox > * { flex: 1 1 100%; text-align: center; }
}

/* poruka "Dodano u košaricu" (jquery.webshop.js e5CartToast) */
.e5_toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 10000;
	max-width: calc(100% - 40px);
	padding: 14px 18px;
	border-radius: 8px;
	background: #1d2329;
	color: #fff;
	font-size: 15px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
	animation: e5ToastIn .25s ease-out;
	transition: opacity .35s, transform .35s;
}
.e5_toast a { color: #fff; font-weight: 600; text-decoration: underline; margin-left: 6px; }
.e5_toast_out { opacity: 0; transform: translateY(10px); }
@keyframes e5ToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.e5_coupon_ok { display: block; margin: 6px 0 0; color: #188038; font-weight: 600; font-size: 14px; }
