/**
 * Карточка товара «как в каталоге» внутри шапки: подсказки поиска и список заявки (корзины).
 *
 * В обоих местах выводится карточка каталога (templates/catalog/card.php, для корзины — её копия в
 * inc/custom_cart.php), а стили карточки лежат в catalog-page.css, который есть только на страницах
 * каталога. Здесь те же правила (блок «карточка» оттуда), привязанные к панели поиска и списку корзины,
 * чтобы карточка выглядела одинаково на любой странице. Если меняешь вид карточки каталога — поправь и здесь.
 */

.catalog-search-suggestions .card-wrapper,
.cart-product-list .card-wrapper {
	border-radius: var(--radius-lg);
	padding: 8px;
	background: var(--white-bg);
	border: 1px solid transparent;
	box-shadow: none;
	max-width: 367px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}


.catalog-search-suggestions .card-wrapper .product-badges,
.cart-product-list .card-wrapper .product-badges {
	z-index: 2;
}


.catalog-search-suggestions .card-wrapper .product-image,
.cart-product-list .card-wrapper .product-image {
	position: relative;
	z-index: 1;
}


.catalog-search-suggestions .custom-product-card .card-wrapper:hover,
.cart-product-list .custom-product-card .card-wrapper:hover {
	transform: translateY(-4px) scale(1.01);
	background: var(--white-bg);
	box-shadow: var(--glass-shadow-hover);
}


.catalog-search-suggestions .product-image,
.cart-product-list .product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: clamp(148px, 104px + 9.5vw, 272px);
	overflow: hidden;
	margin: 0;
	padding: 4px 5px;
	line-height: 0;
	background: var(--white-bg);
	border-radius: var(--radius-md) var(--radius-md) 0 0;
	box-sizing: border-box;
}


.catalog-search-suggestions .product-image img,
.cart-product-list .product-image img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	object-fit: contain;
	object-position: center center;
	display: block;
	transition: transform var(--transition-fast);
}


.catalog-search-suggestions .custom-product-card .card-wrapper:hover .product-image img,
.cart-product-list .custom-product-card .card-wrapper:hover .product-image img {
	transform: scale(1.02);
}


.catalog-search-suggestions .product-image--contain,
.cart-product-list .product-image--contain {
	display: flex;
	align-items: center;
	justify-content: center;
}


.catalog-search-suggestions .product-image--contain img,
.cart-product-list .product-image--contain img {
	object-fit: contain !important;
	object-position: center center;
}


.catalog-search-suggestions .product-badges .new,
.cart-product-list .product-badges .new,
.catalog-search-suggestions .product-badges .bestseller,
.cart-product-list .product-badges .bestseller {
	border-radius: 999px;
	padding: 3px 8px 3px 30px;
	background: var(--brand-yellow);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	font-family: var(--font-family);
	font-weight: 500;
	font-size: 14px;
	line-height: 157%;
	color: var(--grafit-black);
	position:relative
}


.catalog-search-suggestions .product-badges .new:after,
.cart-product-list .product-badges .new:after {
	content:"";
	position:absolute;
	left:5px;
	width:22px;
	height:22px;
	background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.83398 15.3651C4.48583 15.3651 6.63557 17.5148 6.63557 20.1667C6.63557 17.5148 8.78532 15.3651 11.4372 15.3651C8.78532 15.3651 6.63557 13.2153 6.63557 10.5635C6.63557 13.2153 4.48583 15.3651 1.83398 15.3651Z' fill='%23373838' /%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5641 12.7461C13.216 12.7461 15.3657 14.8958 15.3657 17.5476C15.3657 14.8958 17.5155 12.7461 20.1673 12.7461C17.5155 12.7461 15.3657 10.5963 15.3657 7.94446C15.3657 10.5963 13.216 12.7461 10.5641 12.7461Z' fill='%23373838' /%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.32602 6.63493C7.97786 6.63493 10.1276 8.78467 10.1276 11.4365C10.1276 8.78467 12.2774 6.63493 14.9292 6.63493C12.2774 6.63493 10.1276 4.48519 10.1276 1.83334C10.1276 4.48519 7.97786 6.63493 5.32602 6.63493Z' fill='%23373838' /%3E%3C/svg%3E");
}


.catalog-search-suggestions .product-badges .bestseller:after,
.cart-product-list .product-badges .bestseller:after {
	content:"";
	position:absolute;
	left:5px;
	width:22px;
	height:22px;
	background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.68189 6.92972L8.87445 3.20508L12.3164 7.22069L14.5435 4.62233L16.3188 6.69353C17.4596 8.02444 18.0866 9.71951 18.0866 11.4724V11.7086C18.0866 13.588 17.3401 15.3904 16.0111 16.7194C14.6822 18.0483 12.8798 18.7949 11.0003 18.7949C7.0867 18.7949 3.91406 15.6223 3.91406 11.7086C3.91406 9.95571 4.54112 8.26063 5.68189 6.92972Z' fill='%23373838' /%3E%3C/svg%3E");
}


.catalog-search-suggestions .product-badges .sale,
.cart-product-list .product-badges .sale {
	border-radius: 999px;
	padding: 3px 5px;
	background: var(--grafit-grey);
	font-family: var(--font-family);
	font-weight: 500;
	font-size: 14px;
	line-height: 157%;
	color: var(--white-bg);
	padding-left:30px;
	position:relative;
}


.catalog-search-suggestions .product-badges .sale:after,
.cart-product-list .product-badges .sale:after {
	content:"";
	position:absolute;
	left:5px;
	width:20px;
	height:20px;
	background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2054_643)'%3E%3Cpath d='M11.9908 0.859369C11.3892 1.07812 10.522 1.61718 9.64704 2.32031L9.15486 2.71093L8.67829 2.46874C7.65486 1.95312 6.56892 1.57812 5.95173 1.53124C5.44392 1.49218 5.19392 1.62499 4.96736 2.07031C4.82673 2.34374 4.65486 2.89843 4.54548 3.41406C4.44392 3.91406 4.27986 5.05468 4.27986 5.28906V5.42187L3.81111 5.57812C2.42829 6.03906 1.25642 6.65624 0.920481 7.09374C0.772044 7.28906 0.740794 7.62499 0.842356 7.94531C1.03767 8.52343 1.59236 9.42968 2.31892 10.3359L2.70954 10.8203L2.46736 11.3047C1.95173 12.3594 1.58454 13.4219 1.52986 14.0391C1.47517 14.7031 1.71736 14.9531 2.67048 15.2578C3.26423 15.4453 4.27986 15.6328 5.08454 15.7031L5.42048 15.7344L5.52986 16.0703C5.99861 17.5 6.63923 18.7344 7.09236 19.0859C7.28767 19.2344 7.62361 19.2656 7.94392 19.1641C8.52204 18.9687 9.42048 18.4219 10.3424 17.6875L10.8345 17.2969L11.3111 17.5391C12.3345 18.0547 13.4205 18.4297 14.0377 18.4766C14.7017 18.5312 14.9517 18.2969 15.2564 17.3359C15.4205 16.8281 15.5767 16.0234 15.6627 15.2266L15.733 14.5781L16.0064 14.4922C17.4595 14.0156 18.733 13.3594 19.0767 12.9141C19.2252 12.7187 19.2564 12.3828 19.1549 12.0625C18.9595 11.4844 18.4049 10.5781 17.6783 9.66406L17.2877 9.17187L17.5299 8.69531C18.0455 7.67187 18.4205 6.58593 18.4674 5.96874C18.5064 5.46093 18.3736 5.21093 17.9283 4.98437C17.6549 4.84374 17.1002 4.67187 16.5845 4.56249C16.0845 4.46093 14.9439 4.29687 14.7095 4.29687C14.5767 4.29687 14.5689 4.28906 14.483 4.01562C13.9986 2.54687 13.3502 1.28124 12.897 0.937494C12.6939 0.765619 12.3033 0.742181 11.9908 0.859369ZM8.96736 6.49218C9.27986 6.60937 9.49079 6.81249 9.67048 7.12499C9.80329 7.37499 9.81111 7.39843 9.82673 7.92968C9.85017 8.56249 9.78767 8.81249 9.56892 9.10156C9.41267 9.30468 9.12361 9.50781 8.86579 9.59374C8.60017 9.67968 7.96736 9.65624 7.68611 9.55468C7.37361 9.43749 7.06892 9.15624 6.92829 8.85937C6.82673 8.65624 6.81111 8.57031 6.80329 8.12499C6.78767 7.74999 6.80329 7.56249 6.85017 7.39843C6.99079 6.92187 7.35017 6.57031 7.82673 6.43749C8.11579 6.35156 8.65486 6.38281 8.96736 6.49218ZM11.9908 7.48437C12.0064 7.51562 8.70954 12.8594 8.60798 12.9531C8.58454 12.9766 8.13923 12.7656 8.01423 12.6719L7.91267 12.6016L9.45173 10.1406C10.3033 8.78124 11.0689 7.55468 11.1627 7.39843L11.3424 7.12499L11.6549 7.28906C11.8189 7.37499 11.9752 7.46874 11.9908 7.48437ZM12.3424 10.4453C12.6549 10.5625 12.9205 10.8047 13.0689 11.1016C13.1783 11.3281 13.1861 11.3594 13.1861 11.9609V12.5859L13.0455 12.8672C12.8814 13.1875 12.6236 13.4141 12.2877 13.5312C12.0377 13.625 11.3814 13.6328 11.1314 13.5469C10.6939 13.4062 10.3345 13.0469 10.2252 12.6484C10.1236 12.3125 10.1627 11.4141 10.2799 11.1484C10.4439 10.7891 10.7877 10.5156 11.2408 10.3906C11.4908 10.3047 12.0533 10.3359 12.3424 10.4453Z' fill='white' /%3E%3Cpath d='M7.99023 7.27343C7.79492 7.39062 7.72461 7.58593 7.72461 8.03125C7.72461 8.36718 7.74023 8.4375 7.81836 8.55468C8.06836 8.92968 8.62305 8.92187 8.82617 8.53906C8.92773 8.35156 8.92773 7.67968 8.82617 7.49218C8.67773 7.21875 8.26367 7.10937 7.99023 7.27343Z' fill='%23373838' /%3E%3Cpath d='M11.3887 11.2188C11.1543 11.3438 11.0762 11.5156 11.0762 11.9688C11.0762 12.2891 11.0918 12.3828 11.1621 12.5C11.3496 12.8203 11.8418 12.8906 12.0996 12.6328C12.2246 12.5078 12.2324 12.5 12.2402 12.0547C12.2637 11.4063 12.1465 11.2031 11.7246 11.1641C11.584 11.1484 11.4902 11.1641 11.3887 11.2188Z' fill='%23373838' /%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2054_643'%3E%3Crect width='20' height='20' fill='white' transform='translate(-0.00976562)' /%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");;
}


.catalog-search-suggestions .product-title,
.cart-product-list .product-title {
	font-family: var(--font-family);
	font-weight: 600;
	font-size: clamp(13px, 12.24px + 0.20vw, 16px) !important;
	line-height: 150%;
	color: var(--grafit-black);
	margin: 0;
}


/* Truncate to 2 lines max; card height is equalized by the grid + flex column below, not by reserving space here. */
.catalog-search-suggestions .custom-product-card .product-title,
.cart-product-list .custom-product-card .product-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
}


.catalog-search-suggestions .product-info,
.cart-product-list .product-info {
	width: 100%;
}


.catalog-search-suggestions .product-sku,
.cart-product-list .product-sku {
	font-family: var(--font-family);
	font-weight: 500;
	font-size: clamp(11px, 10.6px + 0.1vw, 12px);
	line-height: 157%;
	color: var(--grafit-secon-text);
	margin: 0 0 2px !important;
	padding: 0 !important;
}


.catalog-search-suggestions .product-meta-badges,
.cart-product-list .product-meta-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 6px;
}


.catalog-search-suggestions .product-meta-badge,
.cart-product-list .product-meta-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--font-family);
	font-weight: 500;
	font-size: 13px;
	line-height: 1;
	color: var(--brand-graphite-light);
}


.catalog-search-suggestions .product-meta-badge svg,
.cart-product-list .product-meta-badge svg {
	flex-shrink: 0;
	color: var(--grafit-secon-text);
}


.catalog-search-suggestions .product-footer,
.cart-product-list .product-footer {
	display: flex;
	width: 100%;
	justify-content: stretch;
	margin-top: auto;
	padding-top: 8px;
}


.catalog-search-suggestions .product-footer a,
.cart-product-list .product-footer a,
.catalog-search-suggestions .product-footer button.algorithm-add-to-cart,
.cart-product-list .product-footer button.algorithm-add-to-cart {
	display:flex !important;
	justify-content:center;
	align-items:center;
	border: 1.20px solid var(--gr-gr) !important;
	border-radius: var(--radius-md) !important;
	padding: 5px 10px !important;
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
	height: 44px;
	font-family: var(--font-family) !important;
	font-weight: 500;
	font-size: 14px !important;
	line-height: 157%;
	text-align: center;
	color: var(--grafit-black) !important;
	background:transparent !important;
	position:relative;
	transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}


.catalog-search-suggestions .product-footer a:hover,
.cart-product-list .product-footer a:hover,
.catalog-search-suggestions .product-footer button.algorithm-add-to-cart:hover,
.cart-product-list .product-footer button.algorithm-add-to-cart:hover {
	border-color: var(--orange) !important;
	color: var(--orange) !important;
	transform: scale(1.02);
	box-shadow: 0 2px 12px rgba(255, 187, 16, 0.25);
}


.catalog-search-suggestions .product-footer a:after,
.cart-product-list .product-footer a:after,
.catalog-search-suggestions .product-footer button.algorithm-add-to-cart:after,
.cart-product-list .product-footer button.algorithm-add-to-cart:after {
	content:"";
	position:absolute;
	width:34px;
	height:34px;
	right:5px;
	background: var(--gr-gr);
	border-radius:50%;
	background-size:24px 24px;
	background-repeat:no-repeat;
	background-position:center;
	pointer-events:none;
	transition: background-color var(--transition-fast), background-image var(--transition-fast), transform var(--transition-fast);
	background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 8.75a3 3 0 0 1 6 0' stroke='%23373838' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='6.25' y='9.75' width='11.5' height='10.75' rx='3' stroke='%23373838' stroke-width='1.5'/%3E%3C/svg%3E");
}


.catalog-search-suggestions .product-footer a:hover:after,
.cart-product-list .product-footer a:hover:after,
.catalog-search-suggestions .product-footer button.algorithm-add-to-cart:hover:after,
.cart-product-list .product-footer button.algorithm-add-to-cart:hover:after {
	background-color: var(--orange);
	background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 8.75a3 3 0 0 1 6 0' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='6.25' y='9.75' width='11.5' height='10.75' rx='3' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E");
	transform: scale(1.08);
}


.catalog-search-suggestions .product-footer a.algorithm-add-to-cart,
.cart-product-list .product-footer a.algorithm-add-to-cart,
.catalog-search-suggestions .product-footer button.algorithm-add-to-cart,
.cart-product-list .product-footer button.algorithm-add-to-cart {
	cursor: pointer;
	text-decoration: none;
}


.catalog-search-suggestions .product-footer button.algorithm-add-to-cart,
.cart-product-list .product-footer button.algorithm-add-to-cart {
	appearance: none;
	-webkit-appearance: none;
}
