/* ============================================================
   VIA BIT — PRODUCT CARD (карточка в гриде)
   ============================================================ */

.product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0 0 16px;
	overflow: hidden;
	border: 1px solid #d7e5f4;
	border-radius: 20px;
	background: #fff;
	color: #334C5C;
}

.product-card__top {
	position: absolute;
	top: 16px;
	left: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 32px;
	pointer-events: none;
}
.product-card__top > * { pointer-events: auto; }

.product-card__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 20px;
	border-radius: 40px;
	color: #fff;
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 500;
	font-size: 12px;
	line-height: 12px;
	white-space: nowrap;
	background: #FFC107;
}
.product-card__badge--new { background: #25aa76; }

.product-card__favorite {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #314158;
	cursor: pointer;
	text-decoration: none;
	margin-left: auto;
}
.product-card__favorite svg { display: block; width: 18px; height: 17px; }
.product-card__favorite .heart-filled { display: none; }
.product-card__favorite.is-active .heart-outline { display: none; }
.product-card__favorite.is-active .heart-filled { display: block; }
.product-card__favorite:hover { color: #0090F0; }
.product-card__favorite.is-active { color: #E66B6B; }
.product-card__favorite.is-active svg path { fill: #E66B6B; stroke: #E66B6B; }

@keyframes heartPop {
	0% { transform: scale(1); }
	50% { transform: scale(1.3); }
	100% { transform: scale(1); }
}
.product-card__favorite.is-active svg { animation: heartPop 0.3s ease; }

.product-card__media {
	height: 260px;
	flex: 0 0 260px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-bottom: 14px;
}

.product-card__image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.product-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 20px;
}

.product-card__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #f2f6fa;
	color: #526b80;
	border-radius: 20px;
	text-align: center;
	gap: 4px;
}
.product-card__placeholder span { font-weight: 700; font-size: 16px; }
.product-card__placeholder small { font-size: 12px; opacity: 0.7; }

.product-card__title {
	margin: 0 0 15px;
	padding: 0 10px;
	color: #3d5668;
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 700;
	font-size: 20px;
	line-height: 1;
	flex: 0 0 auto;
}
.product-card__title a {
	color: inherit;
	text-decoration: none;
	display: inline-block;
}
.product-card__title a:hover { color: #0090F0; }

.product-card__availability {
	display: flex;
	gap: 10px;
	padding: 0 10px;
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 700;
	font-size: 16px;
	line-height: 16px;
	text-transform: uppercase;
	color: #334C5C;
	flex: 0 0 auto;
}
.product-card__availability .is-available { color: #0090F0; }
.product-card__availability .is-unavailable,
.is-unavailable { color: #E66B6B; }

.product-card__specs {
	margin: 0;
	padding: 0 10px;
	flex: 0 0 auto;
}

.product-card__spec-row {
	display: flex;
	margin-bottom: 5px;
	justify-content: space-between;
	align-items: baseline;
}
.product-card__spec-row dt {
	font-family: 'Gilroy', 'Inter', sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 18px;
	color: #334C5C;
	flex-shrink: 0;
}
.product-card__spec-dots {
	flex: 1;
	min-width: 20px;
	height: 6px;
	margin: 0 4px;
	background-image: radial-gradient(circle, #9aa7b3 1.5px, transparent 1.6px);
	background-size: 12px 6px;
	background-repeat: repeat-x;
	background-position: left center;
	align-self: center;
}
.product-card__spec-row dd {
	margin: 0;
	font-family: 'Gilroy', 'Inter', sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 18px;
	color: #334C5C;
	flex-shrink: 0;
	text-align: right;
	max-width: 60%;
}

.product-card__purchase {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 72px;
	margin-top: auto;
	padding: 16px 10px 0;
	background: #fff;
	flex: 0 0 auto;
}

.product-card__price { display: flex; flex-direction: column; }
.product-card__old-price {
	min-height: 20px;
	color: #e33150;
	font-size: 15px;
	text-decoration: line-through;
	font-family: 'IBM Plex Mono', monospace;
}
.product-card__old-placeholder { min-height: 20px; }

.product-card__current-price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	color: rgba(23, 38, 47, 0.8);
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 400;
	font-size: 24px;
	line-height: 20px;
	white-space: nowrap;
}
.product-card__current-price .amount {
	font-weight: 400;
	font-size: 24px;
}
.product-card__vat {
	margin-top: 2px;
	color: #26A871;
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 400;
	font-size: 14px;
	line-height: 15px;
}

/* --- Cart button --- */
.product-card__cart-wrap {
	flex: 0 0 120px;
	height: 50px;
	position: relative;
}
.product-card__cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 8px;
	border: 2px solid #0090F0;
	border-radius: 100px;
	background: #FFFFFF;
	color: #0090F0;
	cursor: pointer;
	transition: .2s ease;
	position: relative;
	overflow: hidden;
}
.product-card__cart-btn:hover {
	background: #0090F0;
	color: #fff;
}
.product-card__cart-icon,
.product-card__cart-spinner,
.product-card__cart-success {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .2s ease, transform .2s ease;
}
.product-card__cart-spinner {
	position: absolute;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0,144,240,0.25);
	border-top-color: #0090F0;
	border-radius: 50%;
	opacity: 0;
}
.product-card__cart-success {
	position: absolute;
	gap: 4px;
	color: #22C55E;
	font-family: 'Gilroy', 'Inter', sans-serif;
	font-weight: 600;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	transform: scale(0.8);
}
.product-card__cart-btn.is-loading .product-card__cart-icon {
	opacity: 0;
	transform: scale(0.8);
}
.product-card__cart-btn.is-loading .product-card__cart-spinner {
	opacity: 1;
	animation: cart-spin .6s linear infinite;
}
.product-card__cart-btn.is-success .product-card__cart-icon { opacity: 0; }
.product-card__cart-btn.is-success .product-card__cart-spinner { display: none; }
.product-card__cart-btn.is-success .product-card__cart-success {
	opacity: 1;
	transform: scale(1);
}
.product-card__cart-btn.is-in-cart {
	border-color: #22C55E;
	background: #F0FDF4;
	color: #22C55E;
	cursor: default;
}
.product-card__cart-btn.is-in-cart .product-card__cart-icon {
	opacity: 0;
	width: 0;
	overflow: hidden;
}
.product-card__cart-btn.is-in-cart .product-card__cart-success {
	opacity: 1;
	transform: scale(1);
	position: static;
}
.product-card__cart-btn.is-in-cart .product-card__cart-success svg {
	width: 16px;
	height: 16px;
}
.product-card__cart-btn.is-in-cart:hover {
	background: #F0FDF4;
	color: #22C55E;
}
.product-card__cart-go {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0090F0;
	color: #fff;
	border-radius: 100px;
	text-decoration: none;
	font-family: 'Gilroy', 'Inter', sans-serif;
	font-weight: 600;
	font-size: 13px;
	opacity: 0;
	transform: scale(0.9);
	transition: .2s ease;
	z-index: 2;
	pointer-events: none;
}
.product-card__cart-go:hover {
	background: #0078D0;
	color: #fff;
	text-decoration: none;
}
.product-card__cart-wrap.is-in-cart:hover .product-card__cart-btn { opacity: 0; }
.product-card__cart-wrap.is-in-cart:hover .product-card__cart-go {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

@keyframes cart-spin {
	to { transform: rotate(360deg); }
}

.product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 0;
	padding: 14px 10px 16px;
	color: #455159;
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 400;
	font-size: 12px;
	line-height: 11px;
	white-space: nowrap;
	flex: 0 0 auto;
}
.product-card__footer span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.product-card__footer svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	color: #455159;
}

/* --- Legacy product (viabit-products-grid) --- */
.viabit-products-grid .product {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	background: #fff;
	border: 1px solid #E0E8EF;
	border-radius: 10px;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.viabit-products-grid .product:hover {
	transform: translateY(-2px);
	border-color: #1290E5;
}
.viabit-products-grid .woocommerce-loop-product__link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.viabit-products-grid .product img {
	width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
}
.viabit-products-grid .woocommerce-loop-product__title {
	margin: 8px 0 4px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	color: #273348;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.viabit-products-grid .price {
	margin: 6px 0 10px;
	font-size: 1rem;
	font-weight: 700;
	color: #FFAD1C;
}
.viabit-products-grid .price del {
	color: #E95D65;
	font-weight: 400;
	font-size: 0.8125rem;
}
.viabit-products-grid .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: auto;
	padding: 8px 14px;
	border: 1px solid #1290E5;
	border-radius: 999px;
	background: transparent;
	color: #1290E5;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.viabit-products-grid .button:hover {
	background: #1290E5;
	color: #fff;
}

/* --- viabit-card (alt) --- */
.viabit-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.viabit-card__top {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	pointer-events: none;
}
.viabit-card__badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: var(--viabit-radius-pill);
	background: #FFB800;
	color: #314B5E;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.viabit-card__badge--green { background: #49A97D; color: #fff; }
.viabit-card__fav {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-left: auto;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.viabit-card__fav:hover { background: #E8F4FD; }
.viabit-card__fav.is-active svg path { fill: #E66B6B; stroke: #E66B6B; }
.viabit-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}
.viabit-card__link:hover,
.viabit-card__link:focus { text-decoration: none; color: inherit; }
.viabit-card__media {
	display: block;
	margin-bottom: 12px;
	text-align: center;
}
.viabit-card__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
}
.viabit-card__title {
	display: block;
	margin: 0 0 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: #314B5E;
	overflow-wrap: break-word;
	word-wrap: break-word;
	hyphens: auto;
}
.viabit-card__stock {
	display: inline-block;
	margin-bottom: 8px;
	color: #009BF0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.viabit-card__specs {
	margin: 0 0 12px;
	list-style: none;
	padding: 0;
}
.viabit-card__specs li {
	margin: 0 0 2px;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #697386;
}
.viabit-card__specs strong { color: #314B5E; font-weight: 600; }
.viabit-card__price {
	margin: 0 0 12px;
	font-family: 'Gilroy', 'Inter', sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: #2B3345;
}
.viabit-card__price .woocommerce-Price-amount {
	font-size: 1.25rem;
	font-weight: 700;
	color: #2B3345;
}
.viabit-card__price del { color: #E66B6B; font-weight: 400; opacity: 1; }
.viabit-card__price ins { text-decoration: none; }
.viabit-card__tax {
	display: block;
	margin: 2px 0 0;
	font-size: 0.75rem;
	color: #49A97D;
}
.viabit-card__actions { margin-top: auto; margin-bottom: 12px; }
.viabit-card__cart,
.viabit-products-grid .product .viabit-card__cart,
.viabit-catalog__content .product .viabit-card__cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid #009BF0;
	border-radius: var(--viabit-radius-pill);
	background: transparent;
	color: #009BF0;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.viabit-card__cart:hover,
.viabit-card__cart:focus {
	background: #009BF0;
	color: #fff;
	text-decoration: none;
}
.viabit-card__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-top: 10px;
	border-top: 1px solid #EEF2F7;
}
.viabit-card__warranty,
.viabit-card__delivery {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #697386;
}
.viabit-card__warranty { color: #49A97D; }
.viabit-card__delivery { color: #009BF0; }