.eshop-uc-section {
	margin: 1rem 0;
	clear: both;
}

.eshop-uc-heading {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	line-height: 1.3;
}

.eshop-uc-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}

.eshop-uc-card {
	border: 1px solid #e9e9e9;
	padding: 8px;
	background: #fff;
	border-radius: 3px;
	display: flex;
	flex-direction: column;
}

.eshop-uc-image {
	display: block;
	margin-bottom: 6px;
}

.eshop-uc-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	display: block;
}

.eshop-uc-title {
	font-size: 0.85rem;
	margin: 0 0 4px;
	line-height: 1.25;
	min-height: 2.1em;
	overflow: hidden;
}

.eshop-uc-title a {
	text-decoration: none;
}

.eshop-uc-price {
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.88rem;
}

.eshop-uc-add .button {
	width: 100%;
	text-align: center;
	font-size: 0.78rem;
	padding: 0.42rem 0.5rem;
	line-height: 1.2;
	min-height: 0;
}

.eshop-uc-popup {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.eshop-uc-popup.is-open {
	display: flex;
}

.eshop-uc-popup-dialog {
	background: #fff;
	width: min(980px, 100%);
	max-height: 90vh;
	overflow: auto;
	padding: 20px;
	position: relative;
	border-radius: 6px;
}

.eshop-uc-popup-close {
	position: absolute;
	top: 6px;
	right: 8px;
	background: transparent;
	border: 0;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.woocommerce-checkout .eshop-uc-checkout {
	width: 100%;
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 0.9rem;
	border: 1px solid #e9e9e9;
	background: #fff;
	border-radius: 6px;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-heading {
	font-size: 0.95rem;
	margin-bottom: 0.55rem;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-card {
	padding: 9px;
	gap: 5px;
	border-radius: 6px;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-image {
	margin-bottom: 4px;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-image img {
	height: 104px;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-title {
	font-size: 0.82rem;
	margin-bottom: 4px;
	line-height: 1.35;
	min-height: 2.7em;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-price {
	font-size: 0.84rem;
	margin-bottom: 5px;
}

.woocommerce-checkout .eshop-uc-checkout .eshop-uc-add .button {
	font-size: 0.75rem;
	padding: 0.4rem 0.45rem;
}

@media (max-width: 991px) {
	.eshop-uc-cart .eshop-uc-grid,
	.eshop-uc-checkout .eshop-uc-grid {
		display: flex;
		gap: 10px;
		overflow-x: auto;
		padding-bottom: 6px;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.eshop-uc-cart .eshop-uc-grid::-webkit-scrollbar,
	.eshop-uc-checkout .eshop-uc-grid::-webkit-scrollbar {
		display: none;
	}

	.eshop-uc-cart .eshop-uc-card,
	.eshop-uc-checkout .eshop-uc-card {
		flex: 0 0 165px;
		scroll-snap-align: start;
	}

	.woocommerce-checkout .eshop-uc-checkout .eshop-uc-card {
		flex: 0 0 156px;
		scroll-snap-align: start;
	}

	.woocommerce-checkout .eshop-uc-checkout .eshop-uc-grid {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		padding-bottom: 8px;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.woocommerce-checkout .eshop-uc-checkout .eshop-uc-grid::-webkit-scrollbar {
		display: none;
	}

	.woocommerce-checkout .eshop-uc-checkout .eshop-uc-image img {
		height: 92px;
	}

	.eshop-uc-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.eshop-uc-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	.eshop-uc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
