/*
Theme Name: whitesoap
Description: Мыло и мытьё — светлый «аптечно-бытовой» справочник: белый фон, пастельные разделы, рецепты с блоками ингредиентов, шагов и безопасности.
Version: 1.0.0
Author: whitesoap.ru
Text Domain: whitesoap
Requires PHP: 8.0
*/

:root {
	--white: #ffffff;
	--foam: #f3f8f7;
	--foam-2: #e6f1ef;
	--ink: #1d2b2d;
	--text: #33403f;
	--muted: #687876;
	--line: #e1eae8;
	--teal: #1d7a70;
	--teal-deep: #135a52;
	--sand: #f5eedf;   --sand-ink: #7a5a26;
	--lilac: #eeeaf7;  --lilac-ink: #5b4a8c;
	--sky: #e5f1fa;    --sky-ink: #2d6690;
	--mint: #e0f3ec;   --mint-ink: #25745a;
	--blush: #f8e9ec;  --blush-ink: #94475a;
	--warn: #fff4e5;   --warn-ink: #9a5b0c;
	--radius: 18px;
	--text-font: "Wix Madefor Text", "Segoe UI", Roboto, Arial, sans-serif;
	--display: "Wix Madefor Display", "Wix Madefor Text", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--white); color: var(--text); font: 400 18px/1.7 var(--text-font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; font-weight: 700; }
.ws-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: #fff; padding: 6px 12px; border-radius: 99px; z-index: 10; }
.ws-skip:focus { left: 8px; }
.ws-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Тона разделов */
.ws-tone--sand { background: var(--sand); --tone-ink: var(--sand-ink); }
.ws-tone--lilac { background: var(--lilac); --tone-ink: var(--lilac-ink); }
.ws-tone--sky { background: var(--sky); --tone-ink: var(--sky-ink); }
.ws-tone--mint { background: var(--mint); --tone-ink: var(--mint-ink); }
.ws-tone--blush { background: var(--blush); --tone-ink: var(--blush-ink); }
.ws-tone--foam { background: var(--foam); --tone-ink: var(--teal); }

/* ---------- Логотип: брусок мыла ---------- */
.ws-soap { position: relative; display: inline-block; flex: none; width: 40px; height: 28px; border-radius: 12px; background: linear-gradient(160deg, #fff 0%, var(--foam-2) 100%); border: 2px solid var(--teal); }
.ws-soap::before { content: ""; position: absolute; left: 7px; top: 5px; width: 13px; height: 5px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--foam-2); }
.ws-soap::after { content: ""; position: absolute; right: -7px; top: -9px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 1.5px solid var(--teal); }
.ws-soap--sm { width: 30px; height: 21px; border-radius: 9px; }
.ws-soap--sm::before { left: 5px; top: 4px; width: 9px; height: 4px; }
.ws-soap--sm::after { width: 8px; height: 8px; right: -5px; top: -7px; }

/* ---------- Шапка ---------- */
.ws-header { border-bottom: 1px solid var(--line); background: var(--white); }
.ws-header__row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.ws-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.ws-logo__name { font: 700 21px/1 var(--display); letter-spacing: -.01em; text-transform: lowercase; }
.ws-nav { display: none; }
.ws-nav__list, .ws-drawer__list { list-style: none; margin: 0; padding: 0; }
.ws-drawer summary { list-style: none; cursor: pointer; padding: 8px 16px; border-radius: 99px; background: var(--foam); color: var(--ink); font: 500 15px var(--text-font); }
.ws-drawer summary::-webkit-details-marker { display: none; }
.ws-drawer summary::after { content: " ▾"; color: var(--teal); }
.ws-drawer[open] summary { background: var(--teal); color: #fff; }
.ws-drawer[open] summary::after { content: " ▴"; color: #fff; }
.ws-drawer nav { position: absolute; left: 16px; right: 16px; top: calc(100% + 1px); z-index: 20; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 30px rgba(29, 43, 45, .1); }
.ws-drawer__list a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
.ws-drawer__list a:hover, .ws-drawer__list .current-menu-item > a { background: var(--foam); }

/* ---------- Главная ---------- */
.ws-hero { margin-top: 16px; }
.ws-hero__panel {
	position: relative; overflow: hidden; display: grid; gap: 22px; padding: 26px 18px; border-radius: 26px;
	background:
		radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .95) 0 34px, rgba(255, 255, 255, 0) 35px),
		radial-gradient(circle at 84% 30%, rgba(255, 255, 255, .8) 0 14px, rgba(255, 255, 255, 0) 15px),
		radial-gradient(circle at 6% 96%, rgba(255, 255, 255, .7) 0 48px, rgba(255, 255, 255, 0) 49px),
		linear-gradient(135deg, var(--foam-2) 0%, #eef6f5 55%, var(--sky) 100%);
}
.ws-hero__h1 { font-size: 30px; margin: 0 0 12px; letter-spacing: -.02em; max-width: 620px; }
.ws-hero__lead { margin: 0 0 18px; max-width: 580px; }
.ws-find { display: flex; gap: 6px; padding: 5px; background: var(--white); border-radius: 99px; box-shadow: 0 6px 20px rgba(29, 122, 112, .12); max-width: 520px; }
.ws-find input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 14px; font: 16px var(--text-font); color: var(--ink); border-radius: 99px; }
.ws-find input:focus { outline: 2px solid var(--teal); }
.ws-find button { flex: none; border: 0; border-radius: 99px; background: var(--teal); color: #fff; padding: 0 18px; font: 500 15px var(--text-font); cursor: pointer; }
.ws-find button:hover { background: var(--teal-deep); }
.ws-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.ws-shelf__item { display: flex; flex-direction: column; justify-content: space-between; min-height: 88px; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none; border: 1px solid rgba(255, 255, 255, .7); transition: transform .15s; }
.ws-shelf__item:hover { transform: translateY(-2px); color: var(--ink); }
.ws-shelf__item b { font: 600 15px/1.25 var(--display); }
.ws-shelf__item span { font-size: 13px; color: var(--tone-ink); }
.ws-shelf li:first-child { grid-column: 1 / -1; }

.ws-sec { margin-top: 36px; }
.ws-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ws-sec__head a { font-size: 15px; font-weight: 500; }
.ws-sec__title { font-size: 24px; margin: 0 0 16px; letter-spacing: -.01em; }
.ws-sec__title--page { font-size: 30px; }

/* Карточки */
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.ws-card { display: flex; flex-direction: column; min-width: 0; }
.ws-card__img { display: block; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--foam); }
.ws-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ws-card:hover .ws-card__img img { transform: scale(1.03); }
.ws-card__body { padding: 12px 4px 0; }
.ws-card__title { margin: 8px 0 6px; font-size: 19px; line-height: 1.3; }
.ws-card__title a { color: var(--ink); text-decoration: none; }
.ws-card__title a:hover { color: var(--teal); }
.ws-card__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ws-pill { display: inline-block; padding: 3px 11px; border-radius: 99px; font: 500 13px/1.5 var(--text-font); text-decoration: none; background: var(--foam); color: var(--teal); }
.ws-pill--sand { background: var(--sand); color: var(--sand-ink); }
.ws-pill--lilac { background: var(--lilac); color: var(--lilac-ink); }
.ws-pill--sky { background: var(--sky); color: var(--sky-ink); }
.ws-pill--mint { background: var(--mint); color: var(--mint-ink); }
.ws-pill--blush { background: var(--blush); color: var(--blush-ink); }
a.ws-pill:hover { filter: brightness(.97); }

/* Мыльная заглушка */
.ws-bubbles { display: block; width: 100%; height: 100%; background:
	radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .95) 0 22%, rgba(255, 255, 255, 0) 23%),
	radial-gradient(circle at 68% 62%, rgba(255, 255, 255, .7) 0 13%, rgba(255, 255, 255, 0) 14%),
	radial-gradient(circle at 80% 24%, rgba(255, 255, 255, .8) 0 7%, rgba(255, 255, 255, 0) 8%),
	var(--foam-2); }
.ws-bubbles--sand { background-color: var(--sand); }
.ws-bubbles--lilac { background-color: var(--lilac); }
.ws-bubbles--sky { background-color: var(--sky); }
.ws-bubbles--mint { background-color: var(--mint); }
.ws-bubbles--blush { background-color: var(--blush); }

/* Рецепты — полоса на всю ширину */
.ws-recipes { background: var(--lilac); padding: 30px 0 34px; }
.ws-recipes .ws-pill { background: #fff; }
.ws-recipes .ws-card__img { box-shadow: 0 8px 22px rgba(91, 74, 140, .12); }

/* Колонки разделов */
.ws-cols { display: grid; gap: 14px; }
.ws-col { border-radius: 22px; padding: 16px; }
.ws-col__head { display: block; margin-bottom: 8px; font: 700 18px var(--display); color: var(--ink); text-decoration: none; }
.ws-col__head span { color: var(--tone-ink); }
.ws-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ws-line { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; background: rgba(255, 255, 255, .75); border-radius: 14px; }
.ws-line__img { display: block; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; }
.ws-line__img img { width: 100%; height: 100%; object-fit: cover; }
.ws-line__title { font: 500 15px/1.35 var(--text-font); color: var(--ink); text-decoration: none; }
.ws-line__title:hover { color: var(--teal); }

/* Раздел */
.ws-cover { margin-top: 16px; padding: 26px 18px; border-radius: 26px; }
.ws-cover__title { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.ws-cover__desc { margin-top: 8px; max-width: 680px; }
.ws-cover__desc p { margin: 0; }
.ws-cover .ws-find { margin-top: 16px; }
.ws-empty { padding: 18px; background: var(--foam); border-radius: var(--radius); }

.pagination { margin-top: 26px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { display: inline-block; min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 99px; background: var(--foam); color: var(--ink); text-decoration: none; font-weight: 500; }
.pagination .page-numbers.current { background: var(--teal); color: #fff; }

/* ---------- Статья ---------- */
.ws-read { max-width: 780px; margin-top: 26px; }
.ws-read__head { text-align: left; }
.ws-read__h1 { font-size: 30px; margin: 12px 0 10px; letter-spacing: -.02em; }
.ws-read__meta { margin: 0; font-size: 14px; color: var(--muted); }
.ws-read__img { margin: 20px 0 0; }
.ws-read__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; }
.ws-jump { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 20px 0 0; padding: 12px; background: var(--foam); border-radius: var(--radius); }
.ws-jump__label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.ws-jump a { padding: 4px 11px; border-radius: 99px; background: var(--white); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.ws-jump a:hover { border-color: var(--teal); color: var(--teal); }

.ws-text { margin-top: 24px; min-width: 0; }
.ws-text > *:first-child { margin-top: 0; }
.ws-text p, .ws-text ul, .ws-text ol { margin: 0 0 1.05em; }
.ws-text h2 { font-size: 25px; margin: 1.8em 0 .6em; letter-spacing: -.01em; }
.ws-text h3 { font-size: 20px; margin: 1.4em 0 .5em; }
.ws-text li { margin-bottom: .35em; }
.ws-text ul li::marker { color: var(--teal); }
.ws-text blockquote { margin: 1.4em 0; padding: 16px 20px; border-radius: var(--radius); background: var(--foam); color: var(--ink); }
.ws-text blockquote p:last-child { margin: 0; }
.ws-text figure { margin: 1.4em 0; }
.ws-text img { border-radius: 16px; }
.ws-text figcaption, .ws-text .wp-element-caption { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }
.ws-tbl { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 14px; }
.ws-text table { width: 100%; min-width: 440px; border-collapse: separate; border-spacing: 0; margin: 0; font-size: 15px; line-height: 1.45; }
.ws-text th { background: var(--foam); text-align: left; padding: 10px 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.ws-text td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.ws-text .wp-block-table { margin: 1.4em 0; }
.ws-text .wp-block-table table { margin: 0; }

/* Паспорт рецепта */
.ws-passport { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ws-passport li { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--lilac); color: var(--ink); font-weight: 500; font-size: 16px; line-height: 1.35; }
.ws-passport span { display: block; font-size: 12px; font-weight: 400; color: var(--lilac-ink); }

/* Ингредиенты */
.ws-ingr { margin: 1.8em 0; padding: 18px 18px 8px; border-radius: 22px; background: var(--mint); }
.ws-ingr h2 { margin: 0 0 12px; font-size: 21px; }
.ws-ingr ul { list-style: none; padding: 0; }
.ws-ingr li { position: relative; padding: 8px 0 8px 32px; margin: 0; border-bottom: 1px dashed rgba(37, 116, 90, .25); }
.ws-ingr li:last-child { border-bottom: 0; }
.ws-ingr li::before { content: ""; position: absolute; left: 0; top: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mint-ink); background: var(--white); }

/* Шаги */
.ws-steps h2 { margin-bottom: .8em; }
.ws-steps ol { list-style: none; padding: 0; counter-reset: st; }
.ws-steps ol > li { counter-increment: st; position: relative; padding: 2px 0 16px 52px; margin: 0; }
.ws-steps ol > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; font: 700 16px/36px var(--display); text-align: center; }
.ws-steps ol > li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--foam-2); }
.ws-steps ol > li:last-child::after { display: none; }

/* Безопасность */
.ws-safe { margin: 1.8em 0; padding: 18px 18px 6px; border-radius: 22px; background: var(--warn); border: 1px solid #f6dfbd; }
.ws-safe h2 { margin: 0 0 10px; font-size: 21px; color: var(--warn-ink); }
.ws-safe h2::before { content: "!"; display: inline-block; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; background: var(--warn-ink); color: #fff; font: 700 16px/26px var(--display); text-align: center; vertical-align: 2px; }
.ws-safe li::marker { color: var(--warn-ink); }

/* FAQ */
.ws-faq h3 { font-size: 18px; margin: 1em 0 .3em; padding: 12px 16px; background: var(--foam); border-radius: 14px; }
.ws-faq h3 + p { padding: 0 16px; }

/* Карточка средства */
.ws-item { margin: 1.4em 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 4px 16px rgba(29, 43, 45, .05); }
.ws-item__name { margin: 0 0 8px; font: 700 18px/1.3 var(--display); color: var(--ink); }
.ws-item__specs { list-style: none; margin: 0 0 8px !important; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-item__specs li { margin: 0; padding: 2px 10px; border-radius: 99px; background: var(--sky); color: var(--sky-ink); font-size: 13px; }
.ws-item__text { margin: 0 !important; font-size: 16px; }
.ws-item__btn { display: inline-block; margin-top: 10px; padding: 8px 18px; border-radius: 99px; background: var(--teal); color: #fff; text-decoration: none; font-size: 15px; font-weight: 500; }
.ws-item__btn:hover { background: var(--teal-deep); color: #fff; }

/* Партнёрский блок */
.ws-promo { display: flex; flex-direction: column; gap: 12px; margin: 1.6em 0; padding: 18px; border-radius: 22px; background: linear-gradient(135deg, var(--foam) 0%, var(--sky) 100%); }
.ws-promo__note { font-size: 12px; color: var(--muted); }
.ws-promo__title { margin: 2px 0; font: 700 18px/1.3 var(--display); color: var(--ink); }
.ws-promo__text { margin: 0; font-size: 15px; }
.ws-promo__btn { align-self: flex-start; padding: 10px 20px; border-radius: 99px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; }
.ws-promo__btn:hover { background: var(--teal); color: #fff; }
.ws-slot-title { font-size: 13px; color: var(--muted); }

.ws-about { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; border-radius: var(--radius); background: var(--foam); font-size: 15px; line-height: 1.55; color: var(--muted); }
.ws-about .ws-soap { margin-top: 6px; }
.ws-about p { margin: 0; }
.ws-about strong { color: var(--ink); }
.ws-more { margin-top: 44px; padding: 32px 0 8px; border-top: 1px solid var(--line); }

/* ---------- Подвал ---------- */
.ws-footer { margin-top: 48px; background: var(--foam); padding: 28px 0 30px; text-align: center; font-size: 14px; color: var(--muted); }
.ws-footer__in { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ws-logo--foot .ws-logo__name { font-size: 17px; }
.ws-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.ws-footer__links a { color: var(--ink); }
.ws-footer__copy { margin: 0; max-width: 560px; line-height: 1.5; }

/* ---------- ≥561 ---------- */
@media (min-width: 561px) {
	.ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
	.ws-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ws-shelf li:first-child { grid-column: auto; }
	.ws-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ws-hero__panel, .ws-cover { padding: 34px 30px; }
	.ws-hero__h1 { font-size: 36px; }
	.ws-read__h1 { font-size: 36px; }
	.ws-passport { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ws-promo { flex-direction: row; align-items: center; justify-content: space-between; }
	.ws-promo__btn { align-self: center; flex: none; }
	.ws-ingr ul { columns: 2; column-gap: 28px; }
	.ws-ingr li { break-inside: avoid; }
}

/* ---------- ≥921 ---------- */
@media (min-width: 921px) {
	body { font-size: 18.5px; }
	.ws-header__row { min-height: 76px; }
	.ws-drawer { display: none; }
	.ws-nav { display: block; }
	.ws-nav__list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
	.ws-nav__list a { display: block; padding: 7px 14px; border-radius: 99px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
	.ws-nav__list a:hover { background: var(--foam); }
	.ws-nav__list .current-menu-item > a, .ws-nav__list .current-post-ancestor > a { background: var(--teal); color: #fff; }
	.ws-hero { margin-top: 24px; }
	.ws-hero__panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 52px 48px; }
	.ws-hero__h1 { font-size: 44px; }
	.ws-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ws-shelf li:first-child { grid-column: 1 / -1; }
	.ws-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 26px; }
	.ws-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ws-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ws-sec { margin-top: 52px; }
	.ws-sec__title { font-size: 28px; }
	.ws-cover { padding: 46px 48px; }
	.ws-cover__title { font-size: 40px; }
	.ws-read { margin-top: 40px; }
	.ws-read__h1 { font-size: 42px; }
	.ws-read__img { margin-left: -60px; margin-right: -60px; }
	.ws-footer__in { gap: 14px; }
}
