/* ===== Catalog ===== */
.catalog {
	padding: 80px 0;
	background: var(--color-bg-light);
}

.catalog__head {
	text-align: center;
	margin-bottom: 48px;
}

.catalog__title {
	font-size: 34px;
	font-weight: 800;
	color: var(--color-primary);
	margin: 0 0 10px;
}

.catalog__subtitle {
	font-size: 15px;
	color: #7A7F94;
	margin: 0;
}

/* --- Category cards (large lifestyle image tiles) --- */
.catalog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.catalog-card {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 88% 60%, rgba(27, 39, 129, 0.06) 0%, rgba(27, 39, 129, 0.06) 1px, transparent 1px) 0 0/28px 28px,
		linear-gradient(135deg, #DEE7FD 0%, #F6F8FF 100%);
	border: 1px solid rgba(27, 39, 129, 0.08);
	box-shadow: 0 14px 34px rgba(27, 39, 129, 0.1);
	border-radius: 20px;
	padding: 28px;
	min-height: 260px;
	display: flex;
	flex-flow: column;
	justify-content: space-between;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.catalog-card:hover {
	box-shadow: 0 22px 44px rgba(27, 39, 129, 0.16);
	transform: translateY(-4px);
}

.catalog-card__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-flow: column;
	max-width: 60%;
}

.catalog-card__eyebrow {
	width: 28px;
	height: 3px;
	border-radius: 2px;
	background: var(--color-accent);
	margin-bottom: 14px;
}

.catalog-card__title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--color-primary);
	margin: 0 0 20px;
}

.catalog-card__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-primary);
}

.catalog-card__link svg {
	color: var(--color-accent);
	transition: transform 0.2s ease;
}

.catalog-card:hover .catalog-card__link svg {
	transform: translateX(3px);
}

.catalog-card__image {
	position: absolute;
	right: -10px;
	bottom: -6px;
	height: 78%;
	width: auto;
	max-width: 62%;
	object-fit: contain;
	object-position: bottom right;
	transition: transform 0.25s ease;
}

.catalog-card:hover .catalog-card__image {
	transform: scale(1.04);
}

/* --- Grid ---
   .catalog__grid is used on the homepage catalog block.
   ul.products is WooCommerce's own loop wrapper (shop, category
   archives, search results) — same grid rules apply so the product
   card looks identical everywhere without extra setup. */
.catalog__grid,
ul.products {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* WooCommerce's legacy float-grid clearfix hack becomes a phantom flex item
   in a flex container, stealing one slot from the first row. Disable it.
   (Must match WooCommerce's own ".woocommerce ul.products::before" specificity.) */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
ul.products::before,
ul.products::after {
	content: none !important;
	display: none !important;
}

.product-card {
	position: relative;
	flex: 0 1 calc(25% - 16px);
	min-width: 0;
	background: var(--color-white);
	border: 1px solid rgba(27, 39, 129, 0.08);
	box-shadow: 0 8px 22px rgba(27, 39, 129, 0.07);
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-flow: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
	box-shadow: 0 16px 32px rgba(27, 39, 129, 0.1);
	transform: translateY(-3px);
}

.product-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	font-size: 11px;
	font-weight: 800;
	color: var(--color-white);
	padding: 4px 10px;
	border-radius: 6px;
	z-index: 1;
}

.product-card__badge--sale {
	background: #EF4444;
}

.product-card__badge--new {
	background: #22C55E;
}

.product-card__fav {
	position: absolute;
	top: 14px;
	right: 14px;
	color: #C7CBDA;
	transition: color 0.2s ease;
	z-index: 1;
}

.product-card__fav:hover {
	color: var(--color-accent);
}

.product-card__fav.is-active {
	color: var(--color-accent);
}

.product-card__fav.is-active svg path {
	fill: currentColor;
}

.product-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 210px;
	margin-bottom: 16px;
}

.product-card__image img {
	max-height: 100%;
	width: auto;
	object-fit: contain;
}

.product-card__name {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 12px;
	line-height: 1.4;
	min-height: 40px;
	overflow-wrap: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-card__bottom {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.product-card__price {
	display: flex;
	flex-flow: column;
}

.product-card__price-current {
	font-size: 17px;
	font-weight: 800;
	color: var(--color-primary);
}

.product-card__price-old {
	font-size: 12px;
	color: #B4B8C6;
	text-decoration: line-through;
}

.product-card__qty {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	background: var(--color-bg-light);
	border-radius: 10px;
	padding: 3px;
}

.product-card__qty-btn {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--color-primary);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.product-card__qty-btn:hover {
	background: var(--color-white);
}

.product-card__qty-input {
	width: 22px;
	padding: 0;
	border: none;
	background: transparent;
	text-align: center;
	font-size: 13px;
	font-weight: 800;
	color: var(--color-text);
	font-family: var(--font-main);
	appearance: textfield;
	-moz-appearance: textfield;
}

.product-card__qty-input::-webkit-outer-spin-button,
.product-card__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.product-card__cart {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 10px;
	background: var(--color-primary);
	color: var(--color-white);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-card__cart:hover {
	background: var(--color-accent);
	transform: translateY(-2px);
}

.product-card__cart-check {
	display: none;
}

.product-card__cart.added {
	background: #22C55E;
}

.product-card__cart.added .product-card__cart-icon {
	display: none;
}

.product-card__cart.added .product-card__cart-check {
	display: block;
}

/* WooCommerce appends a "Переглянути кошик" text link after the button by
   default — our icon-only card has no room for it, the checkmark is enough. */
.product-card a.added_to_cart {
	display: none !important;
}

@media (max-width: 1024px) {
	.catalog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.product-card {
		flex-basis: calc(50% - 11px);
	}
}

@media (max-width: 560px) {
	.catalog-grid {
		grid-template-columns: 1fr;
	}
	.catalog__grid,
	ul.products {
		gap: 12px;
	}
	.product-card {
		flex-basis: calc(50% - 7px);
		padding: 14px;
	}
	.product-card__bottom {
		flex-wrap: wrap;
	}
	.product-card__price {
		flex: 1 1 100%;
	}
}
