/* Život hvězdy – Produktová mřížka s infinite scroll */

.zh-product-grid {
	--zh-grid-purple: #9770e9;
	--zh-grid-navy: #2d2d5f;
	--zh-grid-pink: #e84393;
	--zh-grid-bg: #f4f3f8;
	--zh-grid-border: #e8e6f0;
	--zh-grid-columns: 5;
	--zh-grid-font: Figtree, Helvetica, Arial, sans-serif;

	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px 48px;
	color: #1a1a2e;
	font-family: var(--zh-grid-font);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.zh-product-grid,
.zh-product-grid .zh-product-grid__name,
.zh-product-grid .zh-product-grid__price .woocommerce-Price-amount.amount,
.zh-product-grid .zh-product-grid__category,
.zh-product-grid .zh-product-grid__category-link,
.zh-product-grid .zh-product-grid__btn,
.zh-product-grid .zh-product-grid__btn span {
	font-family: var(--zh-grid-font) !important;
}

.zh-product-grid__title {
	margin: 0 0 24px;
	font-size: clamp(1.2rem, 2.5vw, 1.5rem);
	font-weight: 800;
	color: var(--zh-grid-navy);
	letter-spacing: -0.02em;
	text-align: center;
}

.zh-product-grid__list {
	display: grid;
	grid-template-columns: repeat(var(--zh-grid-columns), minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zh-product-grid__card {
	min-width: 0;
}

.zh-product-grid__card-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--zh-grid-bg);
	border: 1px solid var(--zh-grid-border);
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.zh-product-grid__card-inner:hover {
	box-shadow: 0 10px 28px rgba(151, 112, 233, 0.15);
	transform: translateY(-3px);
	border-color: rgba(151, 112, 233, 0.35);
}

.zh-product-grid__thumb {
	position: relative;
	display: block;
	aspect-ratio: 1;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
}

.zh-product-grid__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.35s ease;
}

.zh-product-grid__card-inner:hover .zh-product-grid__thumb img {
	transform: scale(1.04);
}

.zh-product-grid__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 5px;
	background: #e84393 !important;
	background-color: #e84393 !important;
	border-radius: 50%;
	font-size: 10px;
	font-weight: 700;
	color: #fff !important;
	line-height: 1.1;
	text-align: center;
	box-shadow: 0 2px 8px rgba(232, 67, 147, 0.35);
	pointer-events: none;
}

.zh-product-grid__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	padding: 8px 6px 10px;
	gap: 4px;
	text-align: center;
}

.zh-product-grid__category {
	width: 100%;
	margin: 0;
	padding: 0 2px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
}

.zh-product-grid__category-link {
	color: #3d2d6b;
	text-decoration: none;
	transition: color 0.2s;
}

.zh-product-grid__category-link:hover {
	color: #9770e9;
}

.zh-product-grid__category-sep {
	color: #3d2d6b;
}

.zh-product-grid__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	width: 100%;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 600;
	color: var(--zh-grid-navy);
	text-align: center;
	text-decoration: none;
	line-height: 1.3;
	transition: color 0.2s;
}

.zh-product-grid__name:hover {
	color: var(--zh-grid-purple);
}

.zh-product-grid__price {
	width: 100%;
	margin-top: auto;
	padding-top: 2px;
	text-align: center;
}

.zh-product-grid__price .woocommerce-Price-amount.amount {
	display: inline-block;
	font-family: var(--zh-grid-font) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #000 !important;
	line-height: 1.3;
}

.zh-product-grid__price del,
.zh-product-grid__price ins {
	background: transparent !important;
	background-color: transparent !important;
	text-decoration: none !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.zh-product-grid__price del .woocommerce-Price-amount.amount {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #6b6b8a !important;
	text-decoration: line-through !important;
}

.zh-product-grid__price ins .woocommerce-Price-amount.amount {
	text-decoration: none !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: var(--zh-grid-pink) !important;
}

.zh-product-grid__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 8px;
	padding: 8px 10px;
	background: var(--zh-grid-navy) !important;
	border: none !important;
	border-radius: 8px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #fff !important;
	text-align: center;
	text-decoration: none;
	transition: background 0.2s !important;
	line-height: 1.3;
}

.zh-product-grid__btn:hover {
	background: var(--zh-grid-pink) !important;
	color: #fff !important;
}

.zh-product-grid__btn-icon {
	flex: 0 0 auto;
}

.zh-product-grid__status {
	display: flex;
	justify-content: center;
	min-height: 28px;
	margin-top: 20px;
	font-size: 14px;
	font-weight: 600;
	color: #6b6b8a;
}

.zh-product-grid__sentinel {
	width: 100%;
	height: 1px;
}

/* Skrýt wishlist / quick view z tématu (ne naše .zh-fav-btn) */
.zh-product-grid .shopengine-quick-view-trigger,
.zh-product-grid .shopengine-wishlist,
.zh-product-grid [class*="shopengine-icon-quick-view"],
.zh-product-grid a[class*="wishlist"],
.zh-product-grid a[class*="quick-view"],
.zh-product-grid button[class*="wishlist"]:not(.zh-fav-btn),
.zh-recommended .shopengine-quick-view-trigger,
.zh-recommended .shopengine-wishlist,
.zh-recommended [class*="shopengine-icon-quick-view"],
.zh-recommended a[class*="wishlist"],
.zh-recommended a[class*="quick-view"] {
	display: none !important;
}

/* WooCommerce archiv – stejná mřížka jako shortcode [zh_product_grid] */
.zh-product-grid--archive {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	font-family: var(--zh-grid-font) !important;
}

.woocommerce .zh-product-grid--archive,
.woocommerce .zh-product-grid--archive .zh-product-grid__name,
.woocommerce .zh-product-grid--archive .zh-product-grid__price,
.woocommerce .zh-product-grid--archive .zh-product-grid__price .amount,
.woocommerce .zh-product-grid--archive .zh-product-grid__price bdi,
.woocommerce .zh-product-grid--archive .zh-product-grid__category,
.woocommerce .zh-product-grid--archive .zh-product-grid__category-link,
.woocommerce .zh-product-grid--archive .zh-product-grid__btn,
.woocommerce .zh-product-grid--archive .zh-product-grid__btn span {
	font-family: var(--zh-grid-font) !important;
}

.zh-product-grid--archive .zh-product-grid__list.products {
	display: grid !important;
	grid-template-columns: repeat(var(--zh-grid-columns), minmax(0, 1fr)) !important;
	gap: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	clear: both;
}

.zh-product-grid--archive .zh-product-grid__list.products::before,
.zh-product-grid--archive .zh-product-grid__list.products::after {
	display: none !important;
	content: none !important;
}

.zh-product-grid--archive li.product,
.zh-product-grid--archive .zh-product-grid__card {
	width: auto !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
	list-style: none !important;
}

/* Skrýt zbytky výchozího WooCommerce loopu uvnitř naší mřížky */
.zh-product-grid--archive li.product > a.woocommerce-loop-product__link,
.zh-product-grid--archive li.product > .woocommerce-loop-product__title,
.zh-product-grid--archive li.product > .price,
.zh-product-grid--archive li.product > .star-rating,
.zh-product-grid--archive li.product > .button:not(.zh-product-grid__btn),
.zh-product-grid--archive li.product > .add_to_cart_button:not(.zh-product-grid__btn) {
	display: none !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__card-inner,
.woocommerce .zh-product-grid--archive .zh-product-grid__thumb,
.woocommerce .zh-product-grid--archive .zh-product-grid__body,
.woocommerce .zh-product-grid--archive .zh-product-grid__name,
.woocommerce .zh-product-grid--archive .zh-product-grid__price,
.woocommerce .zh-product-grid--archive .zh-product-grid__btn {
	display: flex !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__thumb {
	display: block !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__name,
.woocommerce .zh-product-grid--archive .zh-product-grid__price {
	display: block !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__price .woocommerce-Price-amount.amount {
	font-family: var(--zh-grid-font) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #000 !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__price del,
.woocommerce .zh-product-grid--archive .zh-product-grid__price ins {
	background: transparent !important;
	background-color: transparent !important;
	text-decoration: none !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__price del .woocommerce-Price-amount.amount {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #6b6b8a !important;
	text-decoration: line-through !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__price ins .woocommerce-Price-amount.amount {
	font-size: 15px !important;
	font-weight: 700 !important;
	color: var(--zh-grid-pink) !important;
	text-decoration: none !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__name {
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
}

.woocommerce .zh-product-grid--archive .zh-product-grid__btn {
	display: inline-flex !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	white-space: nowrap;
}

/* WooCommerce řazení – moderní select (fallback bez zh-ordering) */
.woocommerce .woocommerce-ordering:not(.zh-ordering) {
	float: none;
	margin: 0 0 24px;
	display: flex;
	justify-content: flex-end;
}

.woocommerce .woocommerce-ordering:not(.zh-ordering) select.orderby {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	min-width: 240px;
	max-width: 100%;
	padding: 12px 44px 12px 16px;
	border: 1.5px solid var(--zh-grid-border, #e8e6f0);
	border-radius: 12px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2d5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
	font-family: var(--zh-grid-font, Figtree, Helvetica, Arial, sans-serif) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--zh-grid-navy, #2d2d5f) !important;
	line-height: 1.3;
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(45, 45, 95, 0.06);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.woocommerce .woocommerce-ordering:not(.zh-ordering) select.orderby:hover {
	border-color: #d0cee0;
}

.woocommerce .woocommerce-ordering:not(.zh-ordering) select.orderby:focus {
	outline: none;
	border-color: var(--zh-grid-pink, #e84393);
	box-shadow: 0 0 0 4px rgba(232, 67, 147, 0.12);
}

/* WooCommerce stránkování – moderní pill tlačítka */
.woocommerce .woocommerce-pagination {
	clear: both;
	margin: 32px 0 16px;
	padding: 0 !important;
	text-align: center;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

.woocommerce .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}

.woocommerce .woocommerce-pagination ul.page-numbers li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

.woocommerce .woocommerce-pagination ul.page-numbers li::before,
.woocommerce .woocommerce-pagination ul.page-numbers li::after {
	display: none !important;
	content: none !important;
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border: 1.5px solid var(--zh-grid-border, #e8e6f0);
	border-radius: 12px;
	background: #fff;
	font-family: var(--zh-grid-font, Figtree, Helvetica, Arial, sans-serif) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--zh-grid-navy, #2d2d5f) !important;
	text-decoration: none !important;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(45, 45, 95, 0.05);
	transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.woocommerce .woocommerce-pagination ul.page-numbers li a.page-numbers:hover {
	border-color: var(--zh-grid-navy, #2d2d5f);
	background: var(--zh-grid-navy, #2d2d5f);
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(45, 45, 95, 0.18);
	transform: translateY(-1px);
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers.current {
	border-color: var(--zh-grid-navy, #2d2d5f);
	background: var(--zh-grid-navy, #2d2d5f);
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(45, 45, 95, 0.2);
	cursor: default;
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers.dots {
	min-width: auto;
	padding: 0 6px;
	border: none;
	background: transparent;
	box-shadow: none;
	color: #8a8aa8 !important;
	cursor: default;
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers.dots:hover {
	border: none;
	background: transparent;
	color: #8a8aa8 !important;
	box-shadow: none;
	transform: none;
}

.woocommerce .woocommerce-pagination ul.page-numbers li .next.page-numbers,
.woocommerce .woocommerce-pagination ul.page-numbers li .prev.page-numbers {
	min-width: 42px;
	padding: 0 12px;
	font-size: 18px !important;
	font-weight: 700 !important;
}

@media (max-width: 768px) {
	.woocommerce .woocommerce-ordering:not(.zh-ordering) {
		justify-content: stretch;
	}

	.woocommerce .woocommerce-ordering:not(.zh-ordering) select.orderby {
		width: 100%;
		min-width: 0;
	}

	.woocommerce .woocommerce-pagination ul.page-numbers {
		gap: 6px;
	}

	.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers {
		min-width: 38px;
		height: 38px;
		padding: 0 10px;
		font-size: 13px !important;
		border-radius: 10px;
	}
}

@media (max-width: 1100px) {
	.zh-product-grid {
		--zh-grid-columns: 4;
	}

	.zh-product-grid--archive {
		--zh-grid-columns: 4;
	}
}

@media (max-width: 900px) {
	.zh-product-grid {
		--zh-grid-columns: 3;
	}

	.zh-product-grid--archive {
		--zh-grid-columns: 3;
	}
}

@media (max-width: 768px) {
	.zh-product-grid,
	.zh-product-grid--archive,
	.zh-product-grid[style] {
		--zh-grid-columns: 2 !important;
	}

	.zh-product-grid__list,
	.zh-product-grid__list.products,
	.zh-product-grid--archive .zh-product-grid__list.products,
	.woocommerce .zh-product-grid--archive .zh-product-grid__list.products,
	.zh-product-grid .products.columns-1,
	.zh-product-grid .products.columns-2,
	.zh-product-grid .products.columns-3,
	.zh-product-grid .products.columns-4,
	.zh-product-grid .products.columns-5,
	.zh-product-grid .products.columns-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px !important;
	}

	.zh-product-grid--archive li.product,
	.zh-product-grid--archive .zh-product-grid__card,
	.zh-product-grid__card {
		width: 100% !important;
		max-width: 100% !important;
	}

	.zh-product-grid__card-inner,
	.zh-product-grid--archive .zh-product-grid__card-inner {
		border-radius: 12px;
	}

	.zh-product-grid__body {
		padding: 10px 8px 12px;
		gap: 6px;
	}

	.zh-product-grid__name,
	.woocommerce .zh-product-grid--archive .zh-product-grid__name {
		font-size: 13px !important;
		line-height: 1.3 !important;
	}

	.zh-product-grid__price .woocommerce-Price-amount.amount,
	.woocommerce .zh-product-grid--archive .zh-product-grid__price .woocommerce-Price-amount.amount {
		font-size: 14px !important;
	}

	.zh-product-grid__category {
		font-size: 11px !important;
	}

	.zh-product-grid__btn {
		padding: 8px 10px !important;
		font-size: 11px !important;
		border-radius: 10px !important;
	}

	.zh-product-grid__badge {
		min-width: 38px;
		height: 38px;
		font-size: 9px;
	}
}

@media (max-width: 480px) {
	.zh-product-grid {
		--zh-grid-columns: 2;
		padding: 0 10px 28px;
	}

	.zh-product-grid--archive {
		--zh-grid-columns: 2;
	}

	.zh-product-grid__title {
		margin-bottom: 14px;
		font-size: 1.1rem;
	}

	.zh-product-grid__list {
		gap: 8px;
	}

	.zh-product-grid__body {
		padding: 8px 7px 10px;
	}

	.zh-product-grid__btn {
		padding: 8px 8px !important;
		font-size: 11px !important;
	}
}

@media (hover: none) {
	.zh-product-grid__card:hover {
		transform: none;
		box-shadow: 0 2px 12px rgba(45, 45, 95, 0.06);
	}
}
