/* Шрифты — локальные копии Google Fonts (SIL OFL 1.1), вариативные: Montserrat 100–900, Open Sans 300–800.
   Раньше грузились с fonts.googleapis.com — лишнее соединение и запрет на кеш между сайтами. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(fonts/open-sans-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(fonts/open-sans-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(fonts/open-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; src: url(fonts/open-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Токены темы. Фирменный оранжевый АВТ не меняется; --avt-orange-ink — тот же тон темнее,
   для оранжевого текста на белом и на сером фоне страницы (контраст 5,4:1 и 5:1 вместо 3,1:1). */
:root {
	--avt-orange: #EE6B16;
	--avt-orange-hover: #DE5900;
	--avt-orange-ink: #B34A09;
	--avt-orange-soft: #FDF0E7;
	--avt-ink: #333333;
	--avt-muted: #6B6B6B;
	--avt-line: #EDEDED;
	--avt-bg: #F5F6F8;
	--avt-surface: #FFFFFF;
	--avt-danger: #E20932;
	--avt-success: #228B22;

	--avt-font-head: 'Montserrat', 'Open Sans', Arial, sans-serif;
	--avt-font-body: 'Open Sans', Arial, sans-serif;
	--avt-fs-body: 14px;
	--avt-fs-small: 12px;

	--avt-radius: 4px;
	--avt-radius-lg: 8px;
	--avt-shadow: 0 3px 7px rgba(0, 0, 0, 0.05);
	--avt-shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.08);

	--avt-gutter: 24px;
	--avt-tap: 44px;
}

@media screen and (max-width: 767px) {
	:root {
		--avt-fs-body: 15px;
		--avt-gutter: 16px;
	}
}

/* <nobr> из текстов в админке: «информационно-телекоммуникационной» в «Пользовательском соглашении»
   (≈307px при 15px) не влезает в колонку текста до ширины экрана 370px. На узком телефоне слово
   переносится по дефису, а не уходит за край; 413px — с запасом на разницу шрифтов. Без inline-block:
   у него перенос и перед следующей «)», «,», «.» — знак уходил на новую строку */
@media screen and (max-width: 413px) {
	nobr {
		white-space: normal;
		overflow-wrap: break-word;
	}
}

* {
	box-sizing: border-box;
}

*::before, *::after {
	box-sizing: inherit;
}

/* Фокус виден с клавиатуры, мышью — нет (было *{outline:none} для всех). */
:focus:not(:focus-visible) {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--avt-orange);
	outline-offset: 2px;
}

/* У полей свой фокус — оранжевая рамка; кольцо поверх неё давало двойную обводку при клике мышью. */
.custom-input__field:focus-visible,
.custom-textarea__field:focus-visible {
	outline: none;
}

::selection {
	background: var(--avt-orange-soft);
	color: var(--avt-ink);
}

h1, h2, h3, h4, h5, h6, p {
	margin: 0;
	padding: 0;
}

ul, ol {
	margin: 0;
	padding: 0;
}

button {
	border: none;
}

img {
	border: none;
}

a {
	text-decoration: none;
	color: inherit;
	display: inline-block;
}

select {
	appearance: none;
}

input[type='number'] {
	-moz-appearance: textfield;
}

input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

html {
	touch-action: manipulation;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-tap-highlight-color: rgba(238, 107, 22, 0.15);
}

body {
	position: relative;
	padding: 0;
	margin: 0;
	font-size: var(--avt-fs-body);
	line-height: 1.5;
	font-family: var(--avt-font-body);
	color: var(--avt-ink);
	background-color: var(--avt-bg);
	overflow-x: hidden;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
}

main {
	flex: 1;
}

button {
	cursor: pointer;
	font-family: inherit;
}

input[type="button"], input[type="reset"], input[type="submit"] {
	-webkit-appearance: button;
	cursor: pointer;
	font-family: var(--avt-font-body);
	font-size: 14px;
}

/* Телефон: поля 16px, иначе iOS увеличивает страницу при фокусе. */
@media screen and (max-width: 767px) {
	input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
	select,
	textarea {
		font-size: 16px;
	}
}

.has-error input {
	border-color: var(--avt-danger);
}

.has-success input {
	border-color: var(--avt-success);
}

/* Длинные слова (артикулы, имена файлов) переносятся, а не вылезают за карточку. */
.title, p, li, td, dd {
	overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Модальные окна (arcticmodal): на телефоне поля вокруг окна 16px, окно по центру. */
@media screen and (max-width: 767px) {
	.arcticmodal-container_i2 {
		padding: 16px;
	}
}

/* Текстовые страницы из админки (pages/page.php: «Пользовательское соглашение» и другие):
   старая разметка .content/.main без своих стилей — белая карточка в контейнере, как у страницы обработки данных. */
.content__container {
	max-width: calc(1145px + 2 * var(--avt-gutter));
	margin: 0 auto;
	padding: 40px var(--avt-gutter) 60px;
}

.main__header {
	margin-bottom: 20px;
}

.main__content--common-text {
	background: var(--avt-surface);
	border-radius: var(--avt-radius);
	box-shadow: var(--avt-shadow);
	padding: 30px 40px;
	line-height: 1.6;
	overflow-wrap: break-word;
}

.main__content--common-text p,
.main__content--common-text ul,
.main__content--common-text ol {
	margin-bottom: 1em;
}

.main__content--common-text ul,
.main__content--common-text ol {
	padding-left: 1.4em;
}

.main__content--common-text a {
	color: var(--avt-orange-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.main__content--common-text h2,
.main__content--common-text h3 {
	font-family: var(--avt-font-head);
	font-weight: 600;
	margin: 1.4em 0 0.6em;
	line-height: 1.3;
}

@media screen and (max-width: 767px) {
	.content__container {
		padding: 24px var(--avt-gutter) 40px;
	}
	.main__content--common-text {
		padding: 20px 16px;
	}
}
