/* UX / přístupnost – opravy z auditu (pouze CSS). */

/* 1) Homepage „Kategorie“ – názvy dlaždic se musí zalomit, ne useknout */
.kapee-product-categories .category-title,
.kapee-product-categories .category-title a {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: break-word;
	hyphens: auto;
}
.kapee-product-categories .category-title {
	line-height: 1.25;
}
@media (max-width: 575px) {
	.kapee-product-categories .category-title,
	.kapee-product-categories .category-title a {
		font-size: 12px;
	}
	.kapee-product-categories .category-content {
		height: auto;
	}
}

/* 2) Výpis zboží – název na max. 3 řádky, štítky/kategorie v kartě skryté */
.products .product .product-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	white-space: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	height: auto;
	max-height: none;
}
.products .product .product-title a {
	white-space: normal;
}
.products .product .product-cats {
	display: none;
}

/* 8) Mobil kategorie – řazení má viditelný popisek */
@media (max-width: 767px) {
	.products-header-right .woocommerce-ordering {
		width: auto;
		min-width: 30px;
		padding-left: 52px;
	}
	.products-header-right .woocommerce-ordering::before {
		content: "Řadit";
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		font-size: 15px;
		font-weight: 600;
		line-height: 1;
		color: #343330;
		pointer-events: none;
	}
	.products-header-right .woocommerce-ordering select {
		width: 100%;
		left: 0;
	}
}

/* 3) Pokladna / košík / účet – viditelná radio a checkboxy, tmavší okraje polí */
body.woocommerce-checkout input[type="checkbox"],
body.woocommerce-checkout input[type="radio"],
body.woocommerce-cart input[type="checkbox"],
body.woocommerce-cart input[type="radio"],
body.woocommerce-account input[type="checkbox"],
body.woocommerce-account input[type="radio"] {
	width: 22px !important; /* motiv nastavuje 18px !important */
	height: 22px;
	border: 2px solid #767676;
	background-color: #fff;
	margin: 0 8px 4px 0;
	flex: 0 0 22px;
}
body.woocommerce-checkout input[type="radio"]::before,
body.woocommerce-cart input[type="radio"]::before,
body.woocommerce-account input[type="radio"]::before {
	inset: 3px;
}
body.woocommerce-checkout .woocommerce-shipping-methods li,
body.woocommerce-cart .woocommerce-shipping-methods li,
body.woocommerce-checkout .wc_payment_methods > li,
body.woocommerce-checkout .woocommerce-form__label-for-checkbox,
body.woocommerce-checkout .form-row.validate-required label.checkbox {
	min-height: 32px;
}
body.woocommerce-checkout .woocommerce-shipping-methods label,
body.woocommerce-cart .woocommerce-shipping-methods label,
body.woocommerce-checkout .wc_payment_methods > li > label,
body.woocommerce-checkout label.checkbox,
body.woocommerce-checkout .woocommerce-form__label-for-checkbox {
	cursor: pointer;
}
body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select,
body.woocommerce-checkout .select2-container--default .select2-selection--single,
body.woocommerce-cart input.input-text,
body.woocommerce-cart input.qty,
body.woocommerce-cart select,
body.woocommerce-account input.input-text,
body.woocommerce-account textarea,
body.woocommerce-account select {
	border-color: #767676;
}

/* 4) Pokladna mobil – tlačítko Objednat nesmí být přilepené přes formulář */
@media (max-width: 767px) {
	body.woocommerce-checkout.has-mobile-bottom-navbar-single-page:not(.has-multi-step-checkout) .place-order button[type="submit"] {
		position: static !important; /* motiv má position: fixed !important */
		width: 100%;
		box-shadow: none;
		border-radius: 3px;
	}
}

/* 5) Doprava v souhrnu košíku/pokladny – sloupec nesmí být úzký */
/* tabulka jako blok, aby řádek Doprava mohl zabrat celou šířku (ostatní řádky zůstávají 2sloupcové) */
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table > thead,
.woocommerce-checkout-review-order-table > tbody,
.woocommerce-checkout-review-order-table > tfoot {
	display: block;
	width: 100%;
}
.woocommerce-checkout-review-order-table tr {
	display: table;
	table-layout: fixed;
	width: 100%;
}
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
	display: block;
}
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td {
	display: block;
	width: 100%;
	box-sizing: border-box;
}
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th {
	border-bottom: 0;
	padding-bottom: 0;
}
/* košík – mobil má vlastní rozložení motivu, upravuje se jen desktop/tablet */
@media (min-width: 768px) {
	.cart_totals table.shop_table,
	.cart_totals table.shop_table > tbody {
		display: block;
		width: 100%;
	}
	.cart_totals table.shop_table > tbody > tr {
		display: table;
		table-layout: fixed;
		width: 100%;
	}
	.cart_totals table.shop_table > tbody > tr.woocommerce-shipping-totals {
		display: block;
	}
	.cart_totals tr.woocommerce-shipping-totals th,
	.cart_totals tr.woocommerce-shipping-totals td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.cart_totals tr.woocommerce-shipping-totals th {
		border-bottom: 0;
		padding-bottom: 0;
	}
}
/* tlačítko „nahoru“ na košíku/pokladně nepřekrývá obsah (mobil) */
@media (max-width: 767px) {
	body.woocommerce-cart .kapee-back-to-top,
	body.woocommerce-checkout .kapee-back-to-top {
		width: 32px;
		height: 32px;
		right: 8px;
		bottom: 72px;
		opacity: .85;
	}
}
/* plovoucí „Nastavení cookies“ (Complianz) – menší, ať nepřekrývá obsah */
#cmplz-manage-consent .cmplz-manage-consent {
	font-size: 12px;
	line-height: 1.2;
	height: 32px;
	min-height: 0;
	padding: 3px 12px 0;
	bottom: -17px;
	right: 16px;
	opacity: .9;
}

/* 6) Vyhledávací našeptávač (desktop) – širší, cena viditelná */
@media (min-width: 992px) {
	.kapee-ajax-search .autocomplete-suggestions {
		left: auto;
		right: 0;
		width: 380px;
		max-width: calc(100vw - 32px);
		box-sizing: border-box;
	}
	.kapee-ajax-search .autocomplete-suggestion a {
		align-items: center;
	}
	.kapee-ajax-search .autocomplete-suggestion .search-name {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
	}
	.kapee-ajax-search .autocomplete-suggestion .search-price {
		flex: 0 0 auto;
		white-space: nowrap;
		flex-wrap: wrap;
		justify-content: flex-end;
		margin-left: 8px;
	}
}

/* 7) Přístupnost */
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid #0b3d91;
	outline-offset: 2px;
}
body :is(input, select, textarea):focus-visible {
	outline-offset: 0;
}
.site-footer :is(a, button, input, select, textarea):focus-visible,
.header-top :is(a, button):focus-visible,
.kapee-info-box :is(a, button):focus-visible {
	outline-color: #fff;
}
.stock.in-stock,
p.stock.in-stock,
.woocommerce div.product p.stock.in-stock,
.woocommerce div.summary .stock-availability.in-stock,
.stock-availability.in-stock,
.stock-availability.in-stock span {
	color: #1b5e20;
}
.kapee-info-box .info-box-description,
.kapee-info-box .info-box-description p {
	color: #fff;
}
.owl-carousel .owl-dots .owl-dot {
	position: relative;
	min-width: 24px;
	min-height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}
.owl-carousel .owl-dots .owl-dot span {
	margin: 0;
}
