/* Царството на солта – стилове на темата (по дизайна от плана, app.css и компонентите). */

:root {
	--ts-graphite: #2b2d31;
	--ts-graphite-2: #3a3d44;
	--ts-mist: #d5d9de;
	--ts-salt: #ffffff;
	--ts-salt-2: #f3f6f8;
	--ts-shade: #dce3e9;
	--ts-grain-2: #a3b0bb;
	--ts-ice: #9dbfd3;
	--ts-ice-deep: #3f6f8c;
	--ts-muted: #59626d;
	--ts-r: 12px;
	--ts-f-display: Montserrat, 'Segoe UI', system-ui, sans-serif;
}

body {
	overflow-wrap: break-word;
	text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4 {
	text-wrap: balance;
}
p {
	text-wrap: pretty;
}
a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
a:hover {
	text-decoration-thickness: 2px;
}
/* Двуцветна рамка на фокуса: видима и на светъл, и на тъмен фон (WCAG 2.2). */
:focus-visible {
	outline: 2px solid var(--ts-ice-deep);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--ts-ice);
	border-radius: 4px;
}
::selection {
	background: var(--ts-ice);
	color: var(--ts-graphite);
}
.ts-muted {
	color: var(--ts-muted);
}
.ts-lead {
	font-size: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
}

/* ===================== Бутони ===================== */
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.wp-element-button:active {
	transform: scale(0.98);
}
.wp-block-button.is-style-ts-light .wp-block-button__link {
	background: var(--ts-salt);
	color: var(--ts-graphite);
	border-color: var(--ts-salt);
}
.wp-block-button.is-style-ts-light .wp-block-button__link:hover {
	background: var(--ts-salt-2);
	color: var(--ts-graphite);
}
.wp-block-button.is-style-ts-ghost .wp-block-button__link {
	background: transparent;
	color: var(--ts-graphite);
	border-color: var(--ts-mist);
}
.wp-block-button.is-style-ts-ghost .wp-block-button__link:hover {
	background: var(--ts-salt);
	border-color: var(--ts-grain-2);
	color: var(--ts-graphite);
}

/* Подвалът винаги е най-долу, дори при кратки страници */
.wp-site-blocks {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Без празна ивица между заглавката и съдържанието */
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0 !important;
}

/* ===================== Заглавка ===================== */
.ts-header {
	position: relative;
	z-index: 20;
}
.ts-header__bar {
	min-height: 48px;
}
.ts-brand__logo {
	width: 44px;
	height: 44px;
	flex: none;
}
.ts-brand__name,
.ts-brand__name a {
	color: var(--ts-salt) !important;
	text-decoration: none !important;
	margin: 0;
}
.ts-nav a,
.ts-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px !important;
	border-radius: 999px;
	color: var(--ts-mist);
	text-decoration: none;
}
.ts-nav a:hover {
	color: var(--ts-salt);
	background: var(--ts-graphite-2);
	text-decoration: none;
}
.ts-header .wp-block-navigation__responsive-container-open {
	color: var(--ts-salt);
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	align-items: center;
}
.ts-header .wc-block-mini-cart__button,
.ts-header .wc-block-customer-account a {
	color: var(--ts-salt);
	min-width: 44px;
	min-height: 44px;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
}
.ts-header .wc-block-mini-cart__button:hover,
.ts-header .wc-block-customer-account a:hover {
	background: var(--ts-graphite-2);
}
.ts-header .wc-block-mini-cart__badge {
	background: var(--ts-ice);
	color: var(--ts-graphite);
	font-weight: 700;
}
/* Мобилно меню на цял екран: в цветовете на сайта */
.ts-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--ts-graphite) !important;
	color: var(--ts-salt) !important;
	padding: 24px 16px;
}
.ts-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
	color: var(--ts-salt);
}
@media (max-width: 599px) {
	.ts-header__bar {
		flex-wrap: nowrap !important;
	}
	.ts-brand {
		min-width: 0;
	}
	.ts-brand__name {
		line-height: 1.15 !important;
	}
	.ts-header__right {
		gap: 0 !important;
	}
}
@media (max-width: 420px) {
	.ts-brand__name {
		font-size: 0.875rem !important;
	}
}

/* ===================== Начало: банер ===================== */
.ts-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(36px, 7vw, 80px) !important;
	margin-block: 0 !important;
}
/* Солената решетка зад банера (D-62): статичен SVG, който избледнява наляво. */
.ts-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/salt-lattice.svg') repeat center / 56px 97px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
	pointer-events: none;
}
.ts-hero > *:not(.ts-grains-wrap) {
	position: relative;
	z-index: 1;
}
.ts-hero__inner {
	margin-block: 0 !important;
}
.ts-hero__logo {
	max-width: 260px;
}
.ts-hero__copy {
	display: grid;
	gap: 14px;
}
.ts-hero__copy > * {
	margin: 0 !important;
}
.ts-hero .ts-eyebrow {
	color: var(--ts-ice);
}
.ts-hero .ts-lead {
	color: var(--ts-mist);
	max-width: 56ch;
}
.ts-hero__actions {
	margin-top: 6px !important;
}
.ts-hero__search {
	flex: 1;
	min-width: min(100%, 280px);
	max-width: 420px;
	margin: 0 !important;
}
.ts-hero__search .wp-block-search__inside-wrapper {
	gap: 6px;
	border: 0;
	padding: 0;
}
.ts-hero__search .wp-block-search__input {
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid #8e9ca8;
	border-radius: 999px;
	background: var(--ts-salt);
	color: var(--ts-graphite);
}
.ts-hero__search .wp-block-search__button {
	margin: 0;
	background: transparent;
	color: var(--ts-salt);
	border-color: rgb(213 217 222 / 0.45);
}
.ts-hero__search .wp-block-search__button:hover {
	background: var(--ts-salt);
	color: var(--ts-graphite);
}
@media (max-width: 781px) {
	.ts-hero__inner {
		text-align: center;
	}
	/* колоната с логото – на цялата ширина, за да е логото точно в средата */
	.ts-hero__logo {
		max-width: none;
		flex-basis: 100% !important;
	}
	.ts-hero__logo .ts-logo {
		width: min(200px, 56vw);
		margin-inline: auto;
	}
	/* бутонът и търсачката – един под друг, с еднаква ширина */
	.ts-hero__actions {
		flex-direction: column;
		align-items: stretch !important;
		width: 100%;
		max-width: 420px;
		margin-inline: auto !important;
	}
	.ts-hero__actions .wp-block-buttons,
	.ts-hero__actions .wp-block-button,
	.ts-hero__actions .wp-block-button__link {
		width: 100%;
	}
	.ts-hero__search {
		max-width: none;
		width: 100%;
	}
	.ts-hero .ts-lead {
		margin-inline: auto !important;
	}
}

/* ===================== Начало: секции ===================== */
.ts-sections {
	display: grid;
	gap: clamp(32px, 5vw, 56px);
	padding-block: clamp(36px, 6vw, 64px) clamp(48px, 8vw, 96px);
	margin-block: 0 !important;
}
.ts-sections > * {
	margin-block: 0 !important;
}
.ts-empty {
	display: grid;
	justify-items: center;
	gap: 12px;
}
.ts-empty > * {
	margin: 0 !important;
}
.ts-groups {
	gap: 16px !important;
}
.ts-card {
	background: var(--ts-salt);
	border: 1px solid var(--ts-mist);
	border-radius: var(--ts-r);
	padding: clamp(16px, 2.5vw, 24px);
}
.ts-card > * {
	margin-block: 0 0.5em !important;
}
.ts-card h3 {
	font-size: 1.125rem;
	font-weight: 700;
}
.ts-card p {
	color: var(--ts-muted);
	font-size: 0.9375rem;
}

/* ===================== Подвал ===================== */
.ts-footer {
	margin-top: 0 !important;
}
.ts-footer__logo {
	width: 72px;
	height: 72px;
	flex: none;
}
.ts-footer__name {
	font-size: 1.0625rem !important;
	color: var(--ts-salt);
	margin: 0;
}
.ts-footer__tagline {
	font-size: 0.9375rem;
	margin: 0;
}
.ts-footer__links li {
	margin: 0;
}
.ts-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2px;
}
.ts-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--ts-salt);
	text-decoration: none;
}
.ts-footer__links a:hover {
	text-decoration: underline;
}
.ts-footer__company {
	font-size: 0.9375rem;
	color: var(--ts-grain-2);
}
.ts-footer__bottom {
	margin-top: 32px !important;
	padding-top: 16px;
	border-top: 1px solid var(--ts-graphite-2);
	font-size: 0.8125rem;
	color: var(--ts-grain-2);
}
.ts-footer__bottom p {
	margin: 0;
}

/* ===================== WooCommerce ===================== */
.woocommerce-store-notice,
p.demo_store {
	background: var(--ts-ice-deep) !important;
	color: var(--ts-salt) !important;
	font-family: var(--ts-f-display);
}
.wc-block-components-product-price,
.woocommerce .price {
	color: var(--ts-graphite);
	font-weight: 700;
}
.wc-block-components-product-badge,
.woocommerce span.onsale {
	background: var(--ts-ice-deep);
	color: var(--ts-salt);
	border-radius: 999px;
	font-family: var(--ts-f-display);
	font-weight: 700;
	border: 0;
}
.woocommerce ul.products li.product,
.wc-block-product {
	background: var(--ts-salt);
	border: 1px solid var(--ts-mist);
	border-radius: var(--ts-r);
	padding: 12px;
}
.wc-block-components-text-input input,
.wc-block-components-combobox input,
.wc-blocks-components-select select,
.woocommerce form .input-text {
	border-radius: 8px !important;
	border-color: #8e9ca8 !important;
}

/* ===================== Намалено движение ===================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Иконата за профил в същия цвят като количката */
.ts-header .ts-account,
.ts-header .ts-account a,
.ts-header .ts-account svg {
	color: var(--ts-salt) !important;
	fill: currentColor;
}

/* Търсачката в банера – същата височина като бутона „Разгледай каталога“ */
.ts-hero__search .wp-block-search__input,
.ts-hero__search .wp-block-search__button {
	box-sizing: border-box;
	height: 44px;
	min-height: 44px;
	padding-block: 0;
}

/* ===================== Карта-препратка „Приказка за солта“ (§10.10) ===================== */
.ts-teaser {
	position: relative;
	overflow: hidden;
	display: grid;
	gap: 8px;
	padding: clamp(24px, 4vw, 40px);
	border-radius: 18px;
	background: var(--ts-graphite);
	color: var(--ts-mist);
	box-shadow: 0 12px 40px rgb(43 45 49 / 0.14);
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ts-teaser::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../img/salt-lattice.svg') repeat center / 56px 97px;
	-webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
	mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
	pointer-events: none;
}
.ts-teaser::before {
	z-index: 0;
}
.ts-teaser > * {
	position: relative;
	z-index: 1;
	margin: 0 !important;
}
.ts-teaser > h2 {
	position: static;
}
.ts-teaser .ts-eyebrow {
	color: var(--ts-ice);
}
.ts-teaser h2 a {
	color: var(--ts-salt);
	text-decoration: none;
}
/* цялата карта е кликаема */
.ts-teaser h2 a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
}
.ts-teaser:hover {
	transform: translateY(-4px);
}
.ts-teaser:focus-within {
	outline: 2px solid var(--ts-ice-deep);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--ts-ice);
}
.ts-teaser h2 a:focus-visible {
	outline: none;
	box-shadow: none;
}
.ts-teaser__sub {
	font: italic 400 clamp(1.0625rem, 1rem + 0.3vw, 1.25rem)/1.5 'PT Serif', Georgia, serif;
	max-width: 52ch;
}
.ts-teaser__more {
	margin-top: 8px !important;
	font: 600 0.875rem/1 var(--ts-f-display);
	color: var(--ts-ice);
	letter-spacing: 0.02em;
}
