/* Cart page + drawer */
.cart-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; list-style: none; margin: 0 0 18px; padding: 0; }
.cart-list li { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; }
.cart-list img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 4px; }
.cart-list span { display: block; margin-top: 6px; font-weight: 700; }
.cart-totals { display: grid; gap: 6px; margin: 0 0 16px; }
.cart-totals div { display: flex; justify-content: space-between; gap: 12px; }
.cart-totals dt, .cart-totals dd { margin: 0; }
.cart-files { padding-left: 18px; }
.cart-note { margin: 0 0 14px; color: #3f3f46; }
.ai-cart-count-wrap { position: relative; }
.ai-cart-count { position: absolute; top: -7px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #111; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-style: normal; }
body.ai-cart-open { overflow: hidden; }
.ai-cart-drawer { position: fixed; inset: 0; z-index: 110000; }
.ai-cart-drawer[hidden] { display: none; }
.ai-cart-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .45); }
.ai-cart-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; box-shadow: -12px 0 40px rgba(0, 0, 0, .16); animation: ai-cart-in .28s ease; }
#moderncart-slide-out-modal, .ai-cart-sheet { height: 100%; min-height: 0; }
.ai-cart-sheet { display: flex; flex-direction: column; }
.ai-cart-head, .ai-cart-foot { padding: 16px 18px; }
.ai-cart-panel .ai-cart-head { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 12px; width: 100%; box-sizing: border-box; border-bottom: 1px solid #ececec; }
.ai-cart-panel .ai-cart-head strong { margin: 0; font-size: 18px; line-height: 1; font-weight: 700; }
.ai-cart-panel .ai-cart-close { margin: 0 0 0 auto !important; flex: 0 0 36px !important; width: 36px !important; min-width: 36px !important; max-width: 36px !important; height: 36px !important; display: inline-flex !important; align-items: center; justify-content: center; border: 0 !important; border-radius: 0; background: transparent !important; color: #111 !important; font-size: 28px; font-weight: 400; line-height: 1; padding: 0 !important; cursor: pointer; }
.ai-cart-body { flex: 1; overflow: auto; padding: 16px 18px; }
.ai-cart-foot { border-top: 1px solid #ececec; }
.ai-cart-empty { margin: 12px 0; color: #3f3f46; }
.ai-cart-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-cart-item { display: flex; align-items: center; gap: 12px; }
.ai-cart-thumb,
.ai-cart-archive-mark { width: 72px; height: 72px; min-width: 72px; min-height: 72px; max-width: 72px; max-height: 72px; aspect-ratio: 1 / 1; flex: 0 0 72px; align-self: center; box-sizing: border-box; }
.ai-cart-thumb { display: block; overflow: hidden; border-radius: 8px; background: #f4f4f5; }
.ai-cart-thumb img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; min-width: 100%; min-height: 100%; aspect-ratio: 1 / 1; object-fit: cover !important; object-position: center; border-radius: 0; }
.ai-cart-item-name { flex: 1; min-width: 0; }
.ai-cart-item-copy { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; align-self: center; gap: 6px; box-sizing: border-box; width: auto; min-width: 0; height: 72px; max-height: 72px; overflow: hidden; }
.ai-cart-item-copy .ai-cart-item-name { flex: 0 1 auto; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-cart-item--file .ai-cart-download,
.ai-cart-item--archive .ai-cart-download { width: auto; max-width: 100%; height: 32px; min-height: 32px; margin: 0; box-sizing: border-box; line-height: 1; }
.cart-paid-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #f4f4f5; color: #18181b; }
.ai-cart-download,
.ai-cart-download:visited,
.ai-cart-download:hover,
.ai-cart-download:active,
body.ai-site a.ai-cart-download,
body.ai-site a.ai-cart-download:visited,
body.ai-site a.ai-cart-download:hover,
body.ai-site a.ai-cart-download:active,
body.cart-page a.ai-cart-download,
.ai-cart-panel a.ai-cart-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	height: 36px;
	padding: 0 14px;
	border-radius: 8px;
	background: #111 !important;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}
.ai-cart-archive-mark { display: grid; place-items: center; border-radius: 8px; background: #f4f4f5; color: #111; font-weight: 800; letter-spacing: .04em; }
body.cart-page #content,
body.cart-page #primary,
body.cart-page .site-content,
body.cart-page .entry-content { background: #fff; }
body.cart-page .ai-cart-page { max-width: 760px; margin: 8px auto 56px; border: 1px solid #e7e5e4; border-radius: 16px; background: #fff; overflow: hidden; }
body.cart-page .ai-cart-body,
body.cart-page .ai-cart-foot { padding: 22px 24px; }
body.cart-page .ai-cart-items { gap: 10px; }
body.cart-page li.ai-cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 0; padding: 10px; border: 1px solid #ececec; border-radius: 12px; background: #fff; }
body.cart-page .ai-cart-thumb,
body.cart-page .ai-cart-archive-mark { width: 96px; height: 96px; min-width: 96px; min-height: 96px; max-width: 96px; max-height: 96px; flex-basis: 96px; }
body.cart-page li.ai-cart-item--file { grid-template-columns: 96px minmax(0, 1fr); }
body.cart-page .ai-cart-item--file .ai-cart-item-copy,
body.cart-page .ai-cart-item--archive .ai-cart-item-copy { height: 96px; max-height: 96px; }
body.cart-page .ai-cart-item-name { font-weight: 600; }
@media (min-width: 641px) {
	body.cart-page .ai-cart-item--archive .ai-cart-item-copy { display: contents; }
}
@media (max-width: 921px) {
	body.cart-page .page-banner { height: 200px !important; min-height: 200px !important; max-height: 200px !important; }
	body.cart-page .ai-container { width: 100%; max-width: 100%; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
	body.cart-page .ai-cart-page { width: 100%; margin: 0 0 32px; box-sizing: border-box; }
}
@media (max-width: 640px) {
	body.cart-page .page-banner { height: 148px !important; min-height: 148px !important; max-height: 148px !important; padding: 0 16px !important; }
	body.cart-page .page-banner h1, body.cart-page .page-banner .page-banner__title { font-size: 32px; line-height: 1.15; }
	body.cart-page .ai-cart-page { border-radius: 12px; margin: 0 0 28px; }
	body.cart-page .ai-cart-body,
	body.cart-page .ai-cart-foot { padding: 16px; }
	body.cart-page .ai-cart-thumb,
	body.cart-page .ai-cart-archive-mark,
	.ai-cart-panel .ai-cart-thumb,
	.ai-cart-panel .ai-cart-archive-mark { width: 72px !important; height: 72px !important; min-width: 72px !important; min-height: 72px !important; max-width: 72px !important; max-height: 72px !important; flex-basis: 72px; }
	body.cart-page li.ai-cart-item,
	.ai-cart-panel li.ai-cart-item { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; box-sizing: border-box; }
	body.cart-page li.ai-cart-item--file,
	body.cart-page li.ai-cart-item--archive,
	.ai-cart-panel li.ai-cart-item--file,
	.ai-cart-panel li.ai-cart-item--archive { grid-template-columns: 72px minmax(0, 1fr); }
	body.cart-page .ai-cart-item--file .ai-cart-item-copy,
	body.cart-page .ai-cart-item--archive .ai-cart-item-copy,
	.ai-cart-panel .ai-cart-item--file .ai-cart-item-copy,
	.ai-cart-panel .ai-cart-item--archive .ai-cart-item-copy { display: flex; height: 72px; max-height: 72px; }
	body.cart-page .ai-cart-item--file .ai-cart-download,
	body.cart-page .ai-cart-item--archive .ai-cart-download,
	.ai-cart-panel .ai-cart-item--file .ai-cart-download,
	.ai-cart-panel .ai-cart-item--archive .ai-cart-download { width: auto; min-height: 32px; height: 32px; margin: 0; }
	.ai-cart-panel li.ai-cart-item { display: grid; margin: 0; align-items: center; }
	.cart-paid-note { font-size: 14px; line-height: 1.45; }
	.ai-pay-chips { flex-wrap: wrap; justify-content: center; }
	.ai-pay-chip { flex: 1 1 22%; }
}
.ai-cart-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ai-cart-form input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d4d4d8; border-radius: 8px; }
.ai-cart-form button { width: 100%; border: 0; border-radius: 8px; background: #111; color: #fff !important; padding: 12px 16px; font-weight: 700; cursor: pointer; }
.ai-pay-methods { display: flex; flex-direction: column; gap: 8px; }
.ai-pay-sbp, .ai-pay-other { display: flex; align-items: center; justify-content: center; }
.ai-cart-form button.ai-pay-sbp,
.ai-cart-form button.ai-pay-other,
.ai-cart-form button.ai-pay-sbp:hover,
.ai-cart-form button.ai-pay-other:hover {
	background: #fff;
	/* Перебиваем .ai-cart-form button { color:#fff !important } — иначе белый текст на белом. */
	color: #111 !important;
	border: 1px solid #d4d4d8;
}
.ai-cart-form button.ai-pay-sbp .ai-pay-copy,
.ai-cart-form button.ai-pay-sbp .ai-pay-copy b,
.ai-cart-form button.ai-pay-sbp .ai-pay-copy small {
	color: inherit;
}
.ai-cart-form button.ai-pay-sbp .ai-pay-copy small {
	color: #52525b;
}
.ai-pay-sbp { gap: 12px; }
.ai-pay-sbp img { height: 26px; width: auto; display: block; }
.ai-pay-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.04em; }
.ai-pay-copy small { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: #52525b; }
.ai-pay-other { flex-direction: column; }
.ai-pay-chips { display: flex; flex-direction: row; width: 100%; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ai-pay-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.15; color: #3f3f46; text-transform: none; }
.ai-pay-chip img { height: 22px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.moderncart-floating-cart-button, #moderncart-floating-cart { display: none !important; }
@keyframes ai-cart-in { from { transform: translateX(100%); } to { transform: none; } }

/* Native product cards */
.ai-product-list,
ul.ai-product-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}
.ai-product-list--home,
.ai-home-catalog-list .ai-product-list,
.ai-home-catalog-list ul.ai-product-list {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ai-product-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
}
.ai-product-card-media {
	display: block;
	position: relative;
	aspect-ratio: 1;
	background: #f8fafc;
}
.ai-product-card-media picture {
	display: block;
	width: 100%;
	height: 100%;
}
.ai-product-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ai-product-card-sale {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 4px 10px;
	background: #fff;
	color: #111;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	border: 1px solid #111;
}
.ai-product-card-body { padding: 12px; }
.ai-product-card-title {
	margin: 0;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 700;
	color: #111827;
}
.ai-product-card .shop-card-buy {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	margin-top: 8px;
}
.ai-product-card .shop-card-price {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: #6b7280;
}
.ai-product-card a.shop-cart,
.ai-product-card a.shop-cart:visited,
.ai-product-card a.shop-cart:hover,
.ai-product-card a.shop-cart:active,
body.ai-site a.shop-cart,
body.ai-site a.shop-cart:visited,
body.ai-site a.shop-cart:hover,
body.ai-site a.shop-cart:active {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 12px;
	border-radius: 0;
	background: #1e73be;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.ai-home-catalog-list .ai-product-card .shop-card-buy {
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
}
.ai-home-catalog-list .ai-product-card a.shop-cart {
	width: auto;
	background: #111827;
	text-transform: none;
	letter-spacing: 0;
	padding: 8px 12px;
}
@media (max-width: 1024px) {
	.ai-product-list,
	ul.ai-product-list,
	.ai-product-list--home,
	.ai-home-catalog-list ul.ai-product-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 640px) {
	.ai-product-list,
	ul.ai-product-list,
	.ai-product-list--home,
	.ai-home-catalog-list ul.ai-product-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ai-product-page {
	width: min(1100px, calc(100% - 32px));
	margin: 24px auto 48px;
}
.ai-product-page .product {
	display: grid;
	grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}
.ai-product-gallery img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}
.ai-product-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
.ai-product-thumbs img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 4px;
}
.ai-product-page .summary { float: none; width: auto; }
.ai-product-page .product_title {
	font-size: 28px;
	line-height: 1.25;
	font-weight: 700;
	word-break: normal;
	overflow-wrap: break-word;
}
.ai-product-page .price {
	font-size: 20px;
	line-height: 1.3;
}
.ai-product-category {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #64748b;
}
.ai-product-buy-note {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.45;
	color: #475569;
}
.ai-product-cart-form {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.ai-product-add-cart,
button.ai-product-add-cart,
body.ai-site button.ai-product-add-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 0;
	border-radius: 4px;
	background: #1e73be;
	color: #fff !important;
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
}
.ai-product-add-cart:disabled { opacity: .7; cursor: wait; }
.ai-product-cart-status { color: #b42318; font-size: 14px; }
@media (max-width: 800px) {
	.ai-product-page .product {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}
