/**
 * Корзина, оформление заказа, «Заказ принят», личный кабинет, избранное и сравнение.
 *
 * Дизайна этих страниц в вёрстке нет — они собраны из UI-кита и блоков вёрстки: белые плашки на сером фоне
 * (как .details__box / .options__box), .input, .button, .counter, .checkbox, .mark-title, строки «подпись … значение»
 * как .product__params, цена — как .product__price-value, таблица сравнения — как .specs. Острые углы,
 * бордеры #C4C4C4, отступы секций — --section-margin. Файл подключается только на этих страницах
 * (smd_cart_needs_styles()); уведомления WooCommerce, которые бывают и в каталоге, и на товаре, — в smd-cart-notices.css
 * на всех страницах. style.css не правится — только дополнения.
 */

/* ==================================== Страница */

.smd-page {
	padding-top: 3rem;
	padding-bottom: var(--section-margin);
}

.smd-page__title {
	margin-bottom: 3rem;
}

/* Секция страницы и сразу консультация — один отступ, а не два. */
.smd-page + .consult {
	padding-top: 0;
}

/* ==================================== Уведомления WooCommerce (основные стили — smd-cart-notices.css) */

/* Внутри «Вашего заказа» (нет способов оплаты) уведомление без плашки. */
.smd-payment .smd-notice {
	padding: 0 0 0 3.6rem;
	border-left: 0;
	background-color: transparent;
	font-size: 1.4rem;
}

.smd-payment .smd-notice::before {
	left: 0;
	top: 0;
	width: 2rem;
	height: 2rem;
	background-size: 1rem auto;
}

/* ==================================== Общие блоки */

/* Пустой список / сообщение со ссылкой в каталог. */
.smd-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2.4rem;
	padding: 4rem;
	background-color: var(--white);
}

.smd-empty[hidden] {
	display: none;
}

.smd-empty__text {
	font-size: 1.8rem;
	line-height: 1.4;
}

.smd-empty__button {
	gap: 2.4rem;
	min-height: 4.4rem;
	padding: 0.6rem 1.6rem 0.6rem 2.2rem;
}

.smd-empty__action {
	min-width: 26.4rem;
}

/* В плашке раздела кабинета — без своей плашки. */
.smd-empty--flat {
	padding: 0;
}

/* Белая плашка с формой (вход, восстановление пароля, проверка почты). */
.smd-form-box {
	max-width: 55.2rem;
	padding: 4rem;
	background-color: var(--white);
}

.smd-form-box--wide {
	max-width: none;
	margin-bottom: 2.4rem;
}

.smd-form-box__title {
	margin-bottom: 3rem;
}

/* Уведомление внутри плашки с формой (ошибка подтверждения почты на «Заказ принят») — с отступом до текста. */
.smd-form-box > .smd-notice {
	margin-bottom: 2.4rem;
}

.smd-form-box__text {
	margin-bottom: 2.4rem;
	font-size: 1.6rem;
	line-height: 1.5;
}

.smd-form-box__text p + p {
	margin-top: 1rem;
}

.smd-form-box .form-row + .form-row,
.smd-form-box .smd-fields + .form-row {
	margin-top: 2rem;
}

.smd-form-box .smd-fields .form-row {
	margin-top: 0;
}

.smd-form-box .form-row + .smd-form-box__text {
	margin-top: 2rem;
}

/* Текст о политике конфиденциальности WooCommerce в форме регистрации (если регистрация включена). */
.smd-form-box .woocommerce-privacy-policy-text {
	margin-top: 1.6rem;
	color: rgba(54, 61, 71, 0.7);
	font-size: 1.3rem;
	line-height: 1.4;
}

.smd-form-box .woocommerce-privacy-policy-text a {
	text-decoration: underline;
	transition: color 0.3s ease 0s;
}

.smd-form-box .woocommerce-privacy-policy-text a:hover {
	color: var(--green);
}

.smd-form-box__row {
	margin-top: 2rem;
}

.smd-form-box__actions,
.smd-page .form-row.smd-form-box__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.6rem 3rem;
	margin-top: 3rem;
}

.smd-form-box__actions .button {
	min-width: 20rem;
	min-height: 5.6rem;
}

.smd-form-box__link {
	font-size: 1.4rem;
}

/* Строки «подпись … значение» — как .product__params на странице товара: подписи в общей колонке, линия-выноска
   от подписи до значения, значения выстроены по одной вертикали. */
.smd-params {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	align-items: start;
	gap: 0.8rem 0.3rem;
	margin: 1.2rem 0 0;
	font-size: 1.4rem;
	line-height: 1.2;
}

.smd-params__name {
	display: flex;
	align-items: flex-end;
	gap: 0.3rem;
	color: rgba(54, 61, 71, 0.7);
}

.smd-params__name::after {
	content: "";
	flex: 1 1 auto;
	min-width: 1.6rem;
	height: 0.1rem;
	margin-bottom: 0.4rem;
	background-color: #C4C4C4;
}

.smd-params__value {
	margin: 0;
	overflow-wrap: break-word;
}

.smd-params__value p {
	margin: 0;
}

/* Компактный вид («Ваш заказ» на оформлении): «Подпись: значение» строками, без выноски. Значение — строчный блок:
   не рвётся посередине («4 / по 540x50x50»), а если не помещается за подписью, целиком переходит на следующую
   строку (и переносится внутри, только когда длиннее строки). Каждая подпись — с новой строки (пустой блок ::before). */
.smd-review__info .smd-params {
	display: block;
	margin-top: 0.8rem;
	font-size: 1.2rem;
	line-height: 1.45;
}

.smd-review__info .smd-params__name {
	display: inline;
	margin-right: 0.4rem;
}

.smd-review__info .smd-params__name::before {
	content: "";
	display: block;
}

.smd-review__info .smd-params__name::after {
	content: none;
}

.smd-review__info .smd-params__value {
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
}

/* Радиокнопки (доставка, оплата) — белый круг с точкой, как .product__temp; выбранная — зелёная. */
.smd-radios {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
	list-style: none;
}

.smd-radio {
	position: relative;
}

.smd-radio__input {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
}

.smd-radio__label {
	display: inline-flex;
	align-items: flex-start;
	gap: 1rem;
	font-size: 1.5rem;
	line-height: 1.3;
	cursor: pointer;
}

.smd-radio__label::before {
	content: "";
	flex-shrink: 0;
	width: 1.6rem;
	height: 1.6rem;
	margin-top: 0.1rem;
	border-radius: 50%;
	background-color: #C4C4C4;
	box-shadow: inset 0 0 0 0.4rem var(--white), 0 0 0 0.1rem #C4C4C4;
	transition: 0.3s ease 0s;
}

.smd-radio__label:hover::before {
	box-shadow: inset 0 0 0 0.4rem var(--white), 0 0 0 0.1rem var(--green);
}

.smd-radio__input:checked + .smd-radio__label::before {
	background-color: var(--green);
	box-shadow: inset 0 0 0 0.4rem var(--white), 0 0 0 0.1rem var(--green);
}

.smd-radio__input:focus-visible + .smd-radio__label::before {
	outline: 0.2rem solid rgba(113, 190, 0, 0.45);
	outline-offset: 0.2rem;
}

/* Единственный способ — без кружка (WooCommerce прячет его радиокнопку). */
.smd-radio input[type="hidden"] + .smd-radio__label::before,
.smd-radio__input[style*="none"] + .smd-radio__label::before {
	display: none;
}

.smd-radio__label img {
	max-height: 2.4rem;
	width: auto;
}

.smd-radio__note {
	margin-top: 0.8rem;
	padding-left: 2.6rem;
	color: rgba(54, 61, 71, 0.7);
	font-size: 1.3rem;
	line-height: 1.4;
}

.smd-radio__note p + p {
	margin-top: 0.6rem;
}

/* Загрузка (blockUI WooCommerce): поверх белой вуали — кольцо с зелёным сектором. */
.blockUI.blockOverlay::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 3.2rem;
	height: 3.2rem;
	margin: -1.6rem 0 0 -1.6rem;
	border: 0.3rem solid #C4C4C4;
	border-top-color: var(--green);
	border-radius: 50%;
	animation: smd-spin 0.8s linear infinite;
}

@keyframes smd-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==================================== Поля форм WooCommerce */

.smd-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2.4rem;
}

.smd-page .form-row {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin: 0;
}

.smd-fields .form-row-wide,
.smd-fields .notes {
	grid-column: 1 / -1;
}

/* Скрытые поля: страна (продаём только в Россию; address-i18n.js ставит строке display инлайном). */
.smd-field-hidden,
#billing_country_field,
#shipping_country_field {
	display: none !important;
}

.smd-page .form-row label:not(.checkbox) {
	font-size: 1.4rem;
	line-height: 1.2;
	color: rgba(54, 61, 71, 0.7);
}

.smd-page .form-row label .required {
	color: var(--error);
	text-decoration: none;
}

.smd-page .form-row label .optional {
	display: none;
}

.smd-page .woocommerce-input-wrapper {
	display: block;
}

.smd-page .form-row .input,
.smd-form-box .input {
	min-height: 5.6rem;
	padding: 0 2rem;
	font-size: 1.6rem;
	outline: none;
	transition: border-color 0.3s ease 0s;
}

.smd-page .input:focus {
	border-color: var(--dark);
}

.smd-page select.input {
	padding-right: 4rem;
	background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23353E48' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 2rem center / 1.2rem auto;
	appearance: none;
	cursor: pointer;
}

.smd-page .form-row .smd-textarea {
	min-height: 12rem;
	padding: 1.6rem 2rem;
	line-height: 1.4;
	resize: vertical;
}

.smd-fields__hint {
	font-size: 1.2rem;
	line-height: 1.3;
	color: rgba(54, 61, 71, 0.7);
}

/* Ошибка поля (checkout.js ставит строке .woocommerce-invalid, подпись — .checkout-inline-error-message). */
.smd-page .form-row.woocommerce-invalid .input {
	border-color: var(--error);
}

.smd-page .form-row.woocommerce-invalid .checkbox__box {
	border-color: var(--error);
}

.checkout-inline-error-message {
	margin: 0;
	color: var(--error);
	font-size: 1.2rem;
	line-height: 1.2;
}

/* Чекбоксы WooCommerce в разметке .checkbox UI-кита. */
.smd-page .form-row .checkbox {
	align-items: flex-start;
}

.smd-page .form-row .checkbox__box {
	margin-top: 0.1rem;
}

.smd-page .form-row .checkbox__text {
	font-size: 1.3rem;
}

/* Показать пароль (кнопку добавляет woocommerce.js). */
.password-input {
	position: relative;
	display: block;
}

.password-input .input {
	width: 100%;
	padding-right: 5.6rem;
}

.show-password-input {
	position: absolute;
	right: 1.6rem;
	top: 50%;
	width: 2.4rem;
	height: 2.4rem;
	translate: 0 -50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23353E48' stroke-width='1.6'%3E%3Cpath d='M2 12s3.6-6.5 10-6.5S22 12 22 12s-3.6 6.5-10 6.5S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.3s ease 0s;
}

.show-password-input:hover {
	opacity: 1;
}

.show-password-input.display-password {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23353E48' stroke-width='1.6'%3E%3Cpath d='M2 12s3.6-6.5 10-6.5S22 12 22 12s-3.6 6.5-10 6.5S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 20L20 4'/%3E%3C/svg%3E");
}

/* ==================================== Корзина */

.smd-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 36rem;
	align-items: start;
	gap: 2.4rem;
}

.smd-cart__form {
	min-width: 0;
}

.smd-cart__items {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

/* Без JS — кнопка «Обновить корзину»; с JS корзина обновляется сама (smd-cart.js). */
.smd-cart__actions {
	display: flex;
	justify-content: flex-end;
}

.smd-cart-auto .smd-cart__actions {
	display: none;
}

.smd-cart__update {
	min-height: 4.4rem;
	font-size: 1.4rem;
}

.smd-cart__update:disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* Позиция: фото | название и параметры | количество и сумма; крестик — в правом верхнем углу. */
.smd-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 12rem minmax(0, 1fr) 14rem;
	grid-template-areas: "photo info side";
	align-items: start;
	gap: 2.4rem;
	padding: 2.4rem 5rem 2.4rem 2.4rem;
	background-color: var(--white);
}

.smd-cart-item__photo {
	grid-area: photo;
	display: block;
	height: 8.6rem;
}

.smd-cart-item__photo a {
	display: block;
	height: 100%;
}

.smd-cart-item__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.smd-cart-item__info {
	grid-area: info;
	min-width: 0;
}

.smd-cart-item__title {
	display: inline-block;
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 1.3;
	transition: color 0.3s ease 0s;
}

a.smd-cart-item__title:hover {
	color: var(--green);
}

.smd-cart-item__note,
.smd-cart-item .backorder_notification {
	margin-top: 1rem;
	font-size: 1.3rem;
	line-height: 1.4;
	color: rgba(54, 61, 71, 0.7);
}

.smd-cart-item__side {
	grid-area: side;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1.6rem;
}

.smd-cart-item__quantity {
	display: flex;
	justify-content: flex-end;
}

.smd-cart-item__sum {
	text-align: right;
}

.smd-cart-item__total {
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.smd-cart-item__price {
	margin-top: 0.4rem;
	font-size: 1.2rem;
	line-height: 1.3;
	white-space: nowrap;
	opacity: 0.7;
}

.smd-cart-item__remove {
	position: absolute;
	right: 1.6rem;
	top: 1.6rem;
}

.smd-cart-item__remove-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	background-color: #F5F5F5;
	color: var(--dark);
	transition: 0.3s ease 0s;
}

.smd-cart-item__remove-link svg {
	width: 1rem;
	height: 1rem;
}

.smd-cart-item__remove-link:hover {
	background-color: var(--green);
	color: var(--white);
}

/* В заказе (без счётчика): количество — «× 2» над суммой. */
.smd-cart-item--static {
	padding-right: 2.4rem;
}

.smd-cart-item--static .smd-cart-item__side {
	gap: 0.8rem;
}

.smd-cart-item__qty {
	font-size: 1.6rem;
	line-height: 1.3;
	opacity: 0.7;
}

/* Счётчик количества WooCommerce (global/quantity-input.php) — .counter вёрстки на сером фоне, как на товаре. */
.smd-counter.counter {
	width: 13rem;
	min-height: 4.6rem;
	background: rgba(196, 196, 196, 0.30);
}

.smd-counter .counter__button {
	min-width: 2.2rem;
}

.smd-counter .counter__input {
	width: 4.6rem;
	padding: 0;
	border: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.smd-counter .counter__input::-webkit-outer-spin-button,
.smd-counter .counter__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.smd-counter--fixed {
	font-size: 1.6rem;
}

/* ==================================== Итоги: корзина, «Ваш заказ» на оформлении, заказ */

.smd-summary {
	padding: 3rem 2.4rem;
	background-color: var(--white);
}

.smd-summary__title {
	margin-bottom: 2.4rem;
}

.smd-summary__rows {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	padding-bottom: 2.4rem;
	border-bottom: 0.1rem solid #C4C4C4;
}

.smd-summary__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	font-size: 1.6rem;
	line-height: 1.3;
}

.smd-summary__label {
	flex-shrink: 0;
	color: rgba(54, 61, 71, 0.7);
}

.smd-summary__value {
	font-weight: 500;
	text-align: right;
}

.smd-summary__row--shipping {
	flex-direction: column;
	gap: 1.4rem;
}

.smd-summary__row--shipping .smd-summary__value {
	font-weight: 400;
	text-align: left;
}

.smd-summary__total {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	column-gap: 2rem;
	padding-top: 2.4rem;
}

.smd-summary__total .smd-summary__label {
	color: var(--black-txt);
	font-size: 1.8rem;
	font-weight: 600;
	text-transform: uppercase;
}

.smd-summary__price {
	font-size: 3rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: right;
	white-space: nowrap;
}

.smd-summary__price small {
	display: block;
	font-size: 1.2rem;
	font-weight: 400;
	white-space: normal;
}

.smd-summary__note {
	grid-column: 2;
	margin-top: 0.4rem;
	font-size: 1.2rem;
	text-align: right;
	opacity: 0.7;
}

.smd-summary__actions {
	margin-top: 2.4rem;
}

.smd-summary__button {
	width: 100%;
	min-height: 5.5rem;
	font-size: 1.8rem;
}

.smd-summary__hint {
	margin-top: 0.8rem;
	font-size: 1.2rem;
	line-height: 1.4;
	opacity: 0.7;
}

.smd-summary__block {
	margin-top: 2.4rem;
	padding-top: 2.4rem;
	border-top: 0.1rem solid #C4C4C4;
	font-size: 1.5rem;
	line-height: 1.5;
}

.smd-summary__block .smd-summary__label {
	margin-bottom: 0.8rem;
	font-size: 1.4rem;
}

.smd-summary__list {
	list-style: none;
}

.smd-summary__list li + li {
	margin-top: 0.2rem;
}

/* ==================================== Оформление заказа */

.smd-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 45.6rem;
	align-items: start;
	gap: 2.4rem;
}

/* Ошибки checkout.js вставляет первым элементом формы — над обеими колонками. */
.smd-checkout > .woocommerce-NoticeGroup,
.smd-checkout > .woocommerce-error,
.smd-checkout > .woocommerce-message,
.smd-checkout > .woocommerce-info {
	grid-column: 1 / -1;
	margin-bottom: 0;
}

.smd-checkout__main {
	min-width: 0;
}

.smd-checkout__box {
	padding: 4rem;
	background-color: var(--white);
}

.smd-checkout__title {
	margin-bottom: 3rem;
}

.smd-checkout .woocommerce-additional-fields:not(:empty) {
	margin-top: 2.4rem;
}

.smd-checkout__account {
	margin-top: 2.4rem;
}

.smd-checkout__account .create-account.smd-fields {
	margin-top: 2rem;
}

.smd-checkout__toggle {
	margin: 2.4rem 0 2rem;
	font-size: inherit;
	font-weight: 400;
	text-transform: none;
}

/* «Ваш заказ»: позиции списком — фото, название × количество, параметры, сумма. */
.smd-review__items {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	margin-bottom: 2.4rem;
	padding-bottom: 2.4rem;
	border-bottom: 0.1rem solid #C4C4C4;
}

.smd-review__item {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr) auto;
	align-items: start;
	gap: 1.6rem;
}

.smd-review__photo {
	height: 5rem;
}

.smd-review__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.smd-review__name {
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.3;
}

.smd-review__name .product-quantity {
	font-weight: 400;
	white-space: nowrap;
	opacity: 0.7;
}

.smd-review__total {
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.smd-payment {
	margin-top: 2.4rem;
	padding-top: 2.4rem;
	border-top: 0.1rem solid #C4C4C4;
}

.smd-payment__label {
	margin-bottom: 1.4rem;
	color: rgba(54, 61, 71, 0.7);
	font-size: 1.6rem;
	line-height: 1.3;
}

.smd-page .smd-payment__place {
	margin-top: 3rem;
}

.smd-agree {
	margin-bottom: 2rem;
}

.smd-agree .form-row {
	gap: 0.4rem;
}

.smd-agree .checkbox__text {
	font-size: 1.3rem;
}

.smd-agree .woocommerce-terms-and-conditions {
	max-height: 20rem;
	margin-bottom: 1.6rem;
	padding: 1.6rem;
	overflow: auto;
	border: 0.1rem solid #C4C4C4;
	font-size: 1.3rem;
	line-height: 1.4;
}

/* ==================================== Заказ принят */

.smd-thanks__box {
	padding: 4rem;
	background-color: var(--white);
}

.smd-thanks__title {
	position: relative;
	padding-left: 5.2rem;
	font-size: 2.4rem;
	font-weight: 600;
	line-height: 1.3;
}

/* Заголовок «Ваш заказ принят» без своей плашки (заказ другого покупателя — дальше форма входа). */
.woocommerce > .smd-thanks__title {
	margin-bottom: 2.4rem;
	padding: 3.2rem 4rem 3.2rem 9.2rem;
	background-color: var(--white);
}

.woocommerce > .smd-thanks__title::before {
	left: 4rem;
	top: 3.2rem;
}

.smd-thanks__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 3.2rem;
	height: 3.2rem;
	border-radius: 0.2rem;
	background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='11' viewBox='0 0 14 11'%3E%3Cpath d='M13.8625 0H12.6633C12.4951 0 12.3356 0.0768812 12.2326 0.208434L5.15914 9.13179L1.76736 4.85206C1.71605 4.78719 1.65065 4.73473 1.57607 4.69863C1.50149 4.66253 1.41967 4.64373 1.33674 4.64363H0.137527C0.0225806 4.64363 -0.0408973 4.77518 0.029443 4.86402L4.72852 10.7924C4.94812 11.0692 5.37016 11.0692 5.59148 10.7924L13.9706 0.218685C14.0409 0.131552 13.9774 0 13.8625 0Z' fill='white'/%3E%3C/svg%3E") no-repeat center / 1.5rem auto;
}

.smd-thanks__box--failed .smd-thanks__title {
	font-size: 1.8rem;
}

.smd-thanks__box--failed .smd-thanks__title::before {
	background: var(--error) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 5.5v8.5' stroke='white' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='18.5' r='1.6' fill='white'/%3E%3C/svg%3E") no-repeat center / 2.2rem auto;
}

.smd-thanks__text {
	margin-top: 1rem;
	padding-left: 5.2rem;
	font-size: 1.6rem;
	line-height: 1.4;
	opacity: 0.7;
}

.smd-thanks__overview {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 3rem 2.4rem;
	margin-top: 4rem;
	padding-top: 4rem;
	border-top: 0.1rem solid #C4C4C4;
	list-style: none;
}

/* Почта длинная — на две колонки сводки. */
.smd-thanks__item--email {
	grid-column: span 2;
}

.smd-thanks__label.mark-title {
	display: block;
	margin-bottom: 1.2rem;
	font-size: 1.4rem;
}

.smd-thanks__value {
	display: block;
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.3;
}

.smd-thanks__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1.6rem;
	margin-top: 3rem;
	padding-left: 5.2rem;
}

.smd-thanks__more {
	margin-top: 4rem;
}

/* Реквизиты банковского перевода (если заданы в настройках способа оплаты). */
.smd-thanks .woocommerce-bacs-bank-details,
.smd-thanks > p {
	margin-top: 2.4rem;
	padding: 3rem 4rem;
	background-color: var(--white);
	font-size: 1.6rem;
	line-height: 1.5;
}

.smd-thanks .wc-bacs-bank-details-heading,
.smd-thanks .wc-bacs-bank-details-account-name {
	margin-bottom: 1.6rem;
	font-size: 1.8rem;
}

.smd-thanks .wc-bacs-bank-details li {
	list-style: none;
}

/* Состав заказа (заказ принят, заказ в кабинете). */
.smd-order-details {
	margin-top: var(--section-margin);
}

.smd-order-details__title {
	margin-bottom: 2.4rem;
}

.smd-order-details__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 36rem;
	align-items: start;
	gap: 2.4rem;
}

.smd-order-details__items {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	min-width: 0;
}

.smd-order-details .order-again {
	margin-top: 2.4rem;
}

/* ==================================== Личный кабинет */

.smd-account {
	display: grid;
	grid-template-columns: 26.4rem minmax(0, 1fr);
	align-items: start;
	gap: 2.4rem;
}

.smd-account__nav {
	padding: 1.2rem 0;
	background-color: var(--white);
}

.smd-account__menu {
	list-style: none;
}

.smd-account__link {
	position: relative;
	display: block;
	padding: 1.3rem 2.4rem 1.3rem 4rem;
	font-size: 1.6rem;
	line-height: 1.3;
	transition: color 0.3s ease 0s;
}

.smd-account__link::before {
	content: "";
	position: absolute;
	left: 2.4rem;
	top: 50%;
	width: 0.7rem;
	height: 0.7rem;
	translate: 0 -50%;
	background-color: var(--green);
	opacity: 0;
	transition: opacity 0.3s ease 0s;
}

.smd-account__link:hover,
.smd-account__item.is-active .smd-account__link {
	color: var(--green);
}

.smd-account__item.is-active .smd-account__link::before {
	opacity: 1;
}

.smd-account__item + .smd-account__item {
	border-top: 0.1rem solid #EBEBEB;
}

.smd-account__content {
	min-width: 0;
	padding: 4rem;
	background-color: var(--white);
}

.smd-account__text {
	font-size: 1.6rem;
	line-height: 1.5;
}

.smd-account__text p + p {
	margin-top: 1.6rem;
}

.smd-account__lead {
	margin-bottom: 2.4rem;
	font-size: 1.8rem;
	line-height: 1.5;
}

.smd-account__text .smd-account__lead {
	margin-bottom: 0;
}

.smd-account__lead strong,
.smd-account__lead mark {
	background: none;
	color: inherit;
	font-weight: 600;
}

.smd-account__lead .link {
	font-size: inherit;
}

/* Ссылки внутри фразы — строчные: у .link из UI-кита inline-block, и на узком экране фраза-ссылка переносилась бы
   блоком целиком, оставляя точку одну на строке. Подчёркивание (border-bottom) рисуется под каждой строкой ссылки. */
.smd-account__text .link {
	display: inline;
}

.smd-account__title {
	margin-bottom: 2.4rem;
}

.smd-account__form .woocommerce-address-fields__field-wrapper {
	margin-top: 0;
}

.smd-account__fieldset {
	min-width: 0;
	margin-top: 4rem;
	padding: 0;
	border: 0;
}

.smd-account__fieldset legend {
	float: left;
	width: 100%;
}

.smd-account__fieldset legend + * {
	clear: both;
}

.smd-account__actions {
	margin-top: 3rem;
}

.smd-account__actions .button {
	min-width: 26.4rem;
	min-height: 5.6rem;
}

.smd-account__notes {
	margin-bottom: 3rem;
	list-style: none;
}

.smd-account__notes .meta {
	margin-bottom: 0.4rem;
	font-size: 1.3rem;
	opacity: 0.7;
}

.smd-account__notes li + li {
	margin-top: 1.6rem;
}

.smd-account__content .smd-order-details {
	margin-top: 4rem;
}

/* В плашке кабинета заказ раскладывается в одну колонку: итоги под позициями. */
.smd-account__content .smd-order-details__grid {
	grid-template-columns: minmax(0, 1fr);
}

.smd-account__content .smd-cart-item {
	padding: 2rem 0;
	border-bottom: 0.1rem solid #C4C4C4;
}

.smd-account__content .smd-order-details__items {
	gap: 0;
}

.smd-account__content .smd-summary {
	padding: 0;
}

/* Заказы — строки с бордером, как в .specs. */
.smd-orders {
	width: 100%;
	border-collapse: collapse;
	font-size: 1.6rem;
	line-height: 1.3;
}

.smd-orders th,
.smd-orders td {
	padding: 2rem 1.2rem;
	border-bottom: 0.1rem solid #C4C4C4;
	font-weight: 400;
	text-align: left;
	vertical-align: middle;
}

.smd-orders th:first-child,
.smd-orders td:first-child {
	padding-left: 0;
}

.smd-orders th:last-child,
.smd-orders td:last-child {
	padding-right: 0;
	text-align: right;
}

.smd-orders thead th {
	padding-top: 0;
	padding-bottom: 1.4rem;
	color: rgba(54, 61, 71, 0.7);
	font-size: 1.4rem;
}

.smd-orders__number {
	font-weight: 600;
	transition: color 0.3s ease 0s;
}

.smd-orders__number:hover {
	color: var(--green);
}

.smd-orders__status {
	display: inline-flex;
	padding: 0.4rem 1.2rem;
	border-radius: 5rem;
	background-color: var(--light-gray);
	font-size: 1.3rem;
	white-space: nowrap;
}

.smd-orders__status--completed {
	background-color: rgba(113, 190, 0, 0.15);
}

.smd-orders__status--cancelled,
.smd-orders__status--failed {
	background-color: rgba(229, 45, 45, 0.1);
}

.smd-orders__action {
	min-height: 3.6rem;
	padding: 0.6rem 2rem;
	font-size: 1.4rem;
}

.smd-orders__action + .smd-orders__action {
	margin-left: 0.8rem;
}

.smd-orders__pagination {
	display: flex;
	gap: 1.2rem;
	margin-top: 2.4rem;
}

/* Адреса. */
.smd-address__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem 2.4rem;
	margin-bottom: 1.6rem;
}

.smd-address__title {
	margin-bottom: 0;
}

.smd-address__edit {
	font-size: 1.4rem;
}

.smd-address__body {
	font-size: 1.6rem;
	font-style: normal;
	line-height: 1.6;
}

/* Вход / регистрация. */
.smd-login {
	display: grid;
	grid-template-columns: minmax(0, 55.2rem);
	gap: 2.4rem;
}

.smd-login--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.smd-login .smd-form-box {
	max-width: none;
}

/* ==================================== Избранное */

.smd-wishlist__products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.smd-wishlist__products[hidden] {
	display: none;
}

.smd-wishlist .product-item {
	transition: opacity 0.3s ease 0s, scale 0.3s ease 0s;
}

.smd-wishlist .product-item.is-removing {
	opacity: 0;
	scale: 0.96;
	pointer-events: none;
}

/* ==================================== Сравнение */

.smd-compare__scroll {
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--green) transparent;
}

.smd-compare__scroll[hidden] {
	display: none;
}

/* Ширина — от числа товаров (--cols, его обновляет smd-wishlist.js при удалении): колонка товара от 22 до 26.4rem.
   Товары помещаются — таблица не шире контейнера, но и колонки не растягиваются сверх 26.4rem (при 1–3 товарах
   таблица уже страницы, фото не режется в полосу); не помещаются — колонки по 22rem и прокрутка.
   В адаптиве — те же правила со своими размерами (максимум колонки = минимум × 1.2). */
.smd-compare__table {
	width: clamp(calc(22rem + var(--cols, 1) * 22rem), 100%, calc(22rem + var(--cols, 1) * 26.4rem));
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 0;
}

.smd-compare__label {
	position: sticky;
	left: 0;
	z-index: 1;
	width: 22rem;
	padding: 1.6rem 2.4rem 1.6rem 0;
	background-color: #F9F9F9;
	color: rgba(54, 61, 71, 0.7);
	font-weight: 400;
	text-align: left;
	vertical-align: top;
}

.smd-compare__product {
	padding: 0 0 2.4rem 2.4rem;
	font-weight: 400;
	text-align: left;
	vertical-align: top;
}

.smd-compare__card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 34rem;
	padding: 1.2rem 1.2rem 1.6rem;
	background-color: var(--white);
}

.smd-compare__remove {
	position: absolute;
	right: 1.2rem;
	top: 1.2rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	background-color: #F5F5F5;
	color: var(--dark);
	cursor: pointer;
	transition: 0.3s ease 0s;
}

.smd-compare__remove svg {
	width: 1rem;
	height: 1rem;
}

.smd-compare__remove:hover {
	background-color: var(--green);
	color: var(--white);
}

.smd-compare__photo {
	display: block;
	height: 16.4rem;
}

.smd-compare__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.smd-compare__title {
	margin-top: 1.2rem;
	font-size: 1.6rem;
	font-weight: 500;
	line-height: 1.3;
	transition: color 0.3s ease 0s;
}

.smd-compare__title:hover {
	color: var(--green);
}

.smd-compare__price {
	margin-top: auto;
	padding-top: 1.2rem;
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.smd-compare__price.is-unavailable {
	font-size: 1.6rem;
	font-weight: 500;
	opacity: 0.7;
}

.smd-compare__cart {
	width: 100%;
	min-height: 4.4rem;
	margin-top: 1.2rem;
	padding: 0.8rem 1.6rem;
	font-size: 1.4rem;
}

.smd-compare__cart:disabled {
	background-color: var(--gray-form);
	cursor: not-allowed;
}

.smd-compare__row > * {
	border-bottom: 0.1rem solid #C4C4C4;
	font-size: 1.5rem;
	line-height: 1.3;
}

.smd-compare__value {
	padding: 1.6rem 0 1.6rem 2.4rem;
	text-align: left;
	vertical-align: top;
}

.smd-compare__group-title {
	padding: 3rem 0 0.6rem;
	font-size: 1.8rem;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	text-transform: uppercase;
}

.smd-compare__group-title span {
	position: sticky;
	left: 0;
}

.smd-compare__group:first-of-type .smd-compare__group-title {
	padding-top: 1rem;
}

.smd-compare__group[hidden],
.smd-compare__row[hidden] {
	display: none;
}

/* ==================================== Адаптив */

@media (max-width: 1024px) {
	/* Позициям корзины нужна ширина — итоги уходят под них, вправо; оформление остаётся в две колонки. */
	.smd-cart,
	.smd-order-details__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-checkout {
		grid-template-columns: minmax(0, 1fr) 40rem;
	}

	/* Город и адрес (оформление, адрес в кабинете) — во всю ширину сетки полей: в половине колонки не помещается
	   подсказка «Номер дома и название улицы». */
	.smd-fields .form-row.address-field {
		grid-column: 1 / -1;
	}

	.smd-cart__aside,
	.smd-order-details__grid > .smd-summary {
		width: 100%;
		max-width: 45.6rem;
		margin-left: auto;
	}

	.smd-cart-item {
		grid-template-columns: 11rem minmax(0, 1fr) 14rem;
		gap: 2rem;
	}

	.smd-cart-item__photo {
		height: 7.9rem;
	}

	.smd-checkout__box,
	.smd-account__content,
	.smd-form-box,
	.smd-thanks__box,
	.smd-empty {
		padding: 3.5rem 3rem;
	}

	.smd-account {
		grid-template-columns: 22rem minmax(0, 1fr);
	}

	.smd-account__link {
		padding-left: 3.6rem;
		padding-right: 1.6rem;
	}

	.smd-account__link::before {
		left: 2rem;
	}

	.smd-wishlist__products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.smd-compare__table {
		width: clamp(calc(18rem + var(--cols, 1) * 24rem), 100%, calc(18rem + var(--cols, 1) * 28.8rem));
	}

	.smd-compare__label {
		width: 18rem;
	}
}

@media (max-width: 768px) {
	.smd-page {
		padding-top: 2rem;
	}

	.smd-page__title {
		margin-bottom: 2.4rem;
	}

	.smd-checkout {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-cart__aside,
	.smd-order-details__grid > .smd-summary {
		max-width: none;
	}

	/* Позиция: фото и название сверху, параметры на всю ширину, ниже строкой счётчик и сумма. */
	.smd-cart-item {
		grid-template-columns: 10rem minmax(0, 1fr);
		grid-template-areas:
			"photo title"
			"params params"
			"side side";
		align-items: center;
		gap: 1.6rem;
		padding: 2rem 5rem 2rem 2rem;
	}

	.smd-cart-item--static {
		padding-right: 2rem;
	}

	.smd-cart-item__photo {
		height: 7.2rem;
	}

	.smd-cart-item__info {
		display: contents;
	}

	.smd-cart-item__title {
		grid-area: title;
		font-size: 1.6rem;
	}

	.smd-cart-item .smd-params {
		grid-area: params;
		margin-top: 0;
	}

	.smd-cart-item__note,
	.smd-cart-item .backorder_notification {
		grid-column: 1 / -1;
		margin-top: 0;
	}

	.smd-cart-item__side,
	.smd-cart-item--static .smd-cart-item__side {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 1.6rem;
		margin-right: -3rem;
	}

	.smd-cart-item--static .smd-cart-item__side {
		margin-right: 0;
	}

	.smd-cart-item__total {
		font-size: 1.8rem;
	}

	.smd-cart-item__remove {
		right: 1.2rem;
		top: 1.2rem;
	}

	.smd-params {
		font-size: 1.3rem;
	}

	.smd-checkout__box,
	.smd-account__content,
	.smd-form-box,
	.smd-thanks__box,
	.smd-empty {
		padding: 3rem 2rem;
	}

	.smd-summary {
		padding: 2.4rem 2rem;
	}

	.smd-thanks .woocommerce-bacs-bank-details,
	.smd-thanks > p {
		padding: 2.4rem 2rem;
	}

	.smd-fields {
		gap: 2rem 1.6rem;
	}

	.smd-thanks__title {
		font-size: 2rem;
	}

	.woocommerce > .smd-thanks__title {
		padding: 2.4rem 2rem 2.4rem 7.2rem;
	}

	.woocommerce > .smd-thanks__title::before {
		left: 2rem;
		top: 2.4rem;
	}

	.smd-thanks__overview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-top: 3rem;
		padding-top: 3rem;
	}

	.smd-account {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
	}

	.smd-account__menu {
		display: flex;
		flex-wrap: wrap;
	}

	.smd-account__nav {
		padding: 0.8rem 1.2rem;
	}

	.smd-account__item + .smd-account__item {
		border-top: 0;
	}

	.smd-account__link {
		padding: 1rem 1.2rem 1rem 2.4rem;
		font-size: 1.5rem;
	}

	.smd-account__link::before {
		left: 0.8rem;
	}

	.smd-account__content .smd-cart-item {
		padding: 1.6rem 0;
	}

	/* Заказы — карточками: подпись колонки слева, значение справа. */
	.smd-orders thead {
		display: none;
	}

	.smd-orders,
	.smd-orders tbody,
	.smd-orders tr,
	.smd-orders th,
	.smd-orders td {
		display: block;
	}

	.smd-orders tr {
		padding: 1.2rem 0;
		border-bottom: 0.1rem solid #C4C4C4;
	}

	.smd-orders tr:first-child {
		padding-top: 0;
	}

	.smd-orders th,
	.smd-orders td,
	.smd-orders th:last-child,
	.smd-orders td:last-child {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.6rem;
		padding: 0.6rem 0;
		border: 0;
		text-align: right;
	}

	.smd-orders th::before,
	.smd-orders td::before {
		content: attr(data-title);
		color: rgba(54, 61, 71, 0.7);
		font-size: 1.4rem;
		text-align: left;
	}

	.smd-login--two {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-login {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-wishlist__products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Сравнение во всю ширину экрана с прокруткой, подписи остаются закреплены слева. */
	.smd-compare__scroll {
		margin-inline: calc(var(--wrapper-padding) * -1);
		padding-inline: var(--wrapper-padding);
	}

	.smd-compare__table {
		width: clamp(calc(16rem + var(--cols, 1) * 19rem), 100%, calc(16rem + var(--cols, 1) * 22.8rem));
	}

	.smd-compare__label {
		width: 16rem;
		padding-right: 1.6rem;
		font-size: 1.4rem;
	}

	.smd-compare__product,
	.smd-compare__value {
		padding-left: 1.6rem;
	}

	.smd-compare__card {
		min-height: 30rem;
	}

	.smd-compare__photo {
		height: 13.6rem;
	}

	.smd-compare__row > * {
		font-size: 1.4rem;
	}

	.smd-compare__group-title {
		font-size: 1.6rem;
	}
}

@media (max-width: 480px) {
	.smd-page__title {
		margin-bottom: 2rem;
	}

	.smd-empty__text {
		font-size: 1.6rem;
	}

	.smd-empty__button,
	.smd-empty__action {
		width: 100%;
		min-width: 0;
	}

	.smd-cart-item {
		grid-template-columns: 8rem minmax(0, 1fr);
		gap: 1.2rem;
		padding: 1.6rem 4.4rem 1.6rem 1.6rem;
	}

	.smd-cart-item--static {
		padding-right: 1.6rem;
	}

	.smd-cart-item__photo {
		height: 5.7rem;
	}

	.smd-cart-item__title {
		font-size: 1.5rem;
	}

	.smd-cart-item__side {
		gap: 1.2rem;
		margin-right: -2.8rem;
	}

	.smd-cart-item__remove {
		right: 1rem;
		top: 1rem;
	}

	.smd-counter.counter {
		width: 12rem;
		min-height: 4.2rem;
	}

	.smd-params {
		font-size: 1.2rem;
	}

	.smd-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-page .form-row .input,
	.smd-form-box .input {
		min-height: 5rem;
		font-size: 1.5rem;
	}

	.smd-checkout__box,
	.smd-account__content,
	.smd-form-box,
	.smd-thanks__box,
	.smd-empty {
		padding: 2.4rem 1.6rem;
	}

	.smd-summary {
		padding: 2.4rem 1.6rem;
	}

	.smd-thanks .woocommerce-bacs-bank-details,
	.smd-thanks > p {
		padding: 2rem 1.6rem;
		font-size: 1.5rem;
	}

	.smd-summary__price {
		font-size: 2.6rem;
	}

	.smd-review__item {
		grid-template-columns: 6rem minmax(0, 1fr);
	}

	.smd-review__photo {
		height: 4.3rem;
	}

	.smd-review__total {
		grid-column: 2;
	}

	.smd-thanks__title {
		padding-left: 4.4rem;
		font-size: 1.8rem;
	}

	.smd-thanks__title::before {
		width: 2.8rem;
		height: 2.8rem;
	}

	.woocommerce > .smd-thanks__title {
		padding: 2rem 1.6rem 2rem 6rem;
	}

	.woocommerce > .smd-thanks__title::before {
		left: 1.6rem;
		top: 2rem;
	}

	.smd-thanks__text,
	.smd-thanks__actions {
		padding-left: 0;
		margin-top: 1.6rem;
	}

	.smd-thanks__overview {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.smd-thanks__item--email {
		grid-column: auto;
	}

	.smd-thanks__value {
		font-size: 1.8rem;
	}

	.smd-thanks__actions .button,
	.smd-form-box__actions .button,
	.smd-account__actions .button {
		width: 100%;
		min-width: 0;
	}

	.smd-orders__action {
		width: auto;
	}

	.smd-wishlist__products {
		grid-template-columns: minmax(0, 1fr);
	}

	.smd-compare__table {
		width: clamp(calc(12rem + var(--cols, 1) * 18rem), 100%, calc(12rem + var(--cols, 1) * 21.6rem));
	}

	.smd-compare__label {
		width: 12rem;
		padding-right: 1.2rem;
		font-size: 1.3rem;
	}

	.smd-compare__product,
	.smd-compare__value {
		padding-left: 1.2rem;
	}

	.smd-compare__card {
		min-height: 26rem;
		padding: 1rem 1rem 1.2rem;
	}

	.smd-compare__photo {
		height: 11.4rem;
	}

	.smd-compare__title {
		font-size: 1.4rem;
	}

	.smd-compare__price {
		font-size: 1.7rem;
	}

	.smd-compare__row > * {
		font-size: 1.3rem;
	}
}
