/* ==========================================================================
   Страница «Список желаний» (inc/rs-wishlist.php). Одинаковый файл на aquasnab, trubosnab, radiatorsnab.
   Только страница списка (.rs-wl); иконки избранного и всплывающее окно не затрагиваются.
   Цвета --rs-wl-* задаются из настроек темы; здесь — запасные значения.
   ========================================================================== */

.rs-wl {
	--rs-wl-accent: #0a7ea4;
	--rs-wl-heading: #1a1a1a;
	--rs-wl-text: #3d4148;
	--rs-wl-muted: #7a808a;
	--rs-wl-line: #e6ebef;
	--rs-wl-soft: #f4f6f8;
	--rs-wl-btn-bg: var(--rs-wl-accent);
	--rs-wl-btn-text: #fff;
	--rs-wl-btn-hover-bg: var(--rs-wl-btn-bg);
	--rs-wl-btn-hover-text: var(--rs-wl-btn-text);

	max-width: 1040px;
	margin: 0 auto;
	padding: 8px 0 72px;
	color: var(--rs-wl-heading);
	-webkit-font-smoothing: antialiased;
}
.rs-wl *,
.rs-wl *::before,
.rs-wl *::after { box-sizing: border-box; }
.rs-wl a { text-decoration: none; transition: color .15s; }
.rs-wl .woosw-list { display: flex; flex-direction: column; overflow: visible; }

/* --- Заголовок списка: «Избранное» ……… «1 товар» --- */
.rs-wl .woosw-switcher { margin: 0; }
.rs-wl .woosw-name-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--rs-wl-line);
}
.rs-wl .woosw-name { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--rs-wl-heading); }
.rs-wl .rs-wl-count { margin-left: auto; font-size: 14px; color: var(--rs-wl-muted); }
.rs-wl .woosw-switcher-dropdown { margin-top: 12px; }

/* --- Товары: таблица плагина раскладывается сеткой --- */
.rs-wl table.woosw-items,
.rs-wl table.woosw-items > tbody { display: block; width: 100%; margin: 0; border: 0; }
.rs-wl .woosw-items .woosw-item {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto auto 44px;
	grid-template-areas:
		"img name price atc rm"
		"img time price atc rm";
	column-gap: 24px;
	row-gap: 6px;
	align-items: center;
	padding: 20px 0;
	border: 0;
	border-bottom: 1px solid var(--rs-wl-line) !important;
}
.rs-wl .woosw-items td {
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	min-width: 0 !important;
	width: auto !important;
}
.rs-wl .woosw-items td.woosw-item--info,
.rs-wl .woosw-items td.woosw-item--actions { display: contents; }

/* Фото */
.rs-wl .woosw-item--image { grid-area: img; }
.rs-wl .woosw-item--image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	border-radius: 12px;
	background: var(--rs-wl-soft);
	overflow: hidden;
}
.rs-wl .woosw-item--image img {
	width: 64px !important;
	height: 64px !important;
	object-fit: contain;
	mix-blend-mode: multiply;
	border-radius: 0;
}

/* Название и дата */
.rs-wl .woosw-item--name { grid-area: name; align-self: end; margin: 0; font-size: 16px; font-weight: 500; line-height: 1.4; text-wrap: pretty; }
.rs-wl .woosw-item--name a { color: var(--rs-wl-heading); }
.rs-wl .woosw-item--name a:hover { color: var(--rs-wl-accent); }
.rs-wl .woosw-item--time { grid-area: time; align-self: start; margin: 0; font-size: 13px; line-height: 1.4; color: var(--rs-wl-muted); }
.rs-wl .woosw-item--note,
.rs-wl .woosw-item--note-add,
.rs-wl .woosw-item--stock { display: none !important; }
.rs-wl .woosw-item--price-change { grid-area: time; align-self: end; justify-self: end; font-size: 12px; color: var(--rs-wl-muted); }

/* Цена */
.rs-wl .woosw-item--price {
	grid-area: price;
	margin: 0;
	font-size: 20px !important;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--rs-wl-heading);
}
.rs-wl .woosw-item--price .amount,
.rs-wl .woosw-item--price .price { font-size: inherit !important; font-weight: inherit; color: inherit !important; }
.rs-wl .woosw-item--price .woocommerce-Price-currencySymbol { margin-left: 2px; font-size: 15px; font-weight: 500; color: var(--rs-wl-muted); }
.rs-wl .woosw-item--price del { display: block; font-size: 13px; font-weight: 400; color: var(--rs-wl-muted); }
.rs-wl .woosw-item--price del .woocommerce-Price-currencySymbol { font-size: inherit; }
.rs-wl .woosw-item--price ins { text-decoration: none; background: none; }

/* «В корзину» */
.rs-wl .woosw-item--atc { grid-area: atc; }
.rs-wl .woosw-item--atc p,
.rs-wl .woosw-item--atc .woocommerce_loop_add_to_cart_wrap { margin: 0 !important; padding: 0 !important; border: 0 !important; text-align: left; }
.rs-wl .woosw-item--atc .woocommerce_loop_add_to_cart_wrap::before,
.rs-wl .woosw-item--atc .woocommerce_loop_add_to_cart_wrap::after { display: none !important; }
.rs-wl .woosw-item--atc .button,
.rs-wl .rs-wl-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 0 !important;
	height: 44px !important;
	padding: 0 22px !important;
	border: 1px solid var(--rs-wl-btn-bg) !important;
	border-radius: 8px !important;
	background: var(--rs-wl-btn-bg) !important;
	box-shadow: none !important;
	color: var(--rs-wl-btn-text) !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.rs-wl .woosw-item--atc .button:hover,
.rs-wl .rs-wl-btn:hover,
.rs-wl .rs-wl-btn:focus-visible {
	border-color: var(--rs-wl-btn-hover-bg) !important;
	background: var(--rs-wl-btn-hover-bg) !important;
	color: var(--rs-wl-btn-hover-text) !important;
}
.rs-wl .woosw-item--atc .button::before,
.rs-wl .woosw-item--atc .button::after { display: none !important; }
.rs-wl .woosw-item--atc .button span { display: inline !important; position: static !important; color: inherit !important; font-size: inherit !important; opacity: 1 !important; visibility: visible !important; }
.rs-wl .woosw-item--atc .button.loading { opacity: .7; }
.rs-wl .woosw-item--atc .added_to_cart { display: none !important; }
/* Товар уже в корзине — кнопка-контур */
.rs-wl .woosw-item--atc .button.added {
	background: #fff !important;
	color: var(--rs-wl-btn-bg) !important;
}

/* Удалить (×) — справа от кнопки */
.rs-wl .woosw-item--remove,
.rs-wl .woosw-item--add { grid-area: rm; }
.rs-wl .woosw-item--remove span,
.rs-wl .woosw-item--add span {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--rs-wl-line);
	border-radius: 8px;
	background: #fff;
	color: var(--rs-wl-muted);
	cursor: pointer;
	transition: color .15s, border-color .15s;
}
.rs-wl .woosw-item--remove span::before {
	content: "×" !important;
	font-family: inherit !important;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	color: inherit !important;
}
.rs-wl .woosw-item--remove span:hover,
.rs-wl .woosw-item--add span:hover { border-color: #c9d1d8; color: var(--rs-wl-heading); }
.rs-wl .woosw-item--remove span.woosw-item--removing { opacity: .5; pointer-events: none; }

/* Пустой список */
.rs-wl .rs-wl-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	min-height: 0;
	padding: 48px 0;
	border-bottom: 1px solid var(--rs-wl-line);
	color: var(--rs-wl-muted);
	font-size: 16px;
	text-align: center;
}
.rs-wl .rs-wl-empty a { color: var(--rs-wl-accent); font-weight: 500; }
.rs-wl .rs-wl-empty a:hover { color: var(--rs-wl-heading); }

/* «Вас может заинтересовать…» */
.rs-wl .woosw-suggested { margin-top: 40px; }
.rs-wl .woosw-suggested-heading { font-size: 18px; font-weight: 600; }

/* --- Поделиться списком --- */
.rs-wl .woosw-actions { display: block; margin: 40px 0 0; }
.rs-wl .woosw-share { margin-bottom: 16px; }
.rs-wl .rs-wl-share {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	padding: 24px;
	border-radius: 14px;
	background: var(--rs-wl-soft);
}
.rs-wl .rs-wl-share > span { margin: 0 !important; }
.rs-wl .rs-wl-share__title { font-size: 16px; font-weight: 600; color: var(--rs-wl-heading); }
.rs-wl .rs-wl-share__text { font-size: 14px; line-height: 1.45; color: var(--rs-wl-muted); }
.rs-wl .rs-wl-share__row { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-wl .rs-wl-share__row > span { display: flex; margin: 0 !important; }
.rs-wl .rs-wl-share__row .woosw-copy-url { flex: 1 1 240px; }
.rs-wl .rs-wl-share__input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #dde3e8;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--rs-wl-text);
	font-family: inherit;
	font-size: 15px;
	outline: none;
}
.rs-wl .rs-wl-share__input:focus { border-color: var(--rs-wl-accent); }

/* --- Телефон --- */
@media (max-width: 720px) {
	.rs-wl { padding-bottom: 48px; }
	.rs-wl .woosw-items .woosw-item {
		grid-template-columns: 72px minmax(0, 1fr) 44px;
		grid-template-areas:
			"img name name"
			"img time time"
			"img price price"
			"atc atc rm";
		column-gap: 16px;
		row-gap: 6px;
	}
	.rs-wl .woosw-item--image { align-self: start; }
	.rs-wl .woosw-item--image a { width: 72px; height: 72px; }
	.rs-wl .woosw-item--image img { width: 52px !important; height: 52px !important; }
	.rs-wl .woosw-item--name { font-size: 15px; }
	.rs-wl .woosw-item--price { font-size: 18px !important; }
	.rs-wl .woosw-item--atc { margin-top: 6px; }
	.rs-wl .woosw-item--remove { margin-top: 6px; }
	.rs-wl .woosw-item--atc .button { width: 100% !important; }
	.rs-wl .woosw-item--atc .woocommerce_loop_add_to_cart_wrap,
	.rs-wl .woosw-item--atc p { width: 100%; }
	.rs-wl .rs-wl-share { padding: 20px 16px; }
	.rs-wl .rs-wl-share__row .rs-wl-btn { width: 100%; }
	.rs-wl .rs-wl-share__row .woosw-copy-btn { flex: 1 1 100%; }
}
