:root {
    /* Основные цвета */
    --color-primary: #0066CC;
    --color-accent: #FF6600;

    /* Нейтральные */
    --color-bg: #F5F5F5;
    --color-block-bg: #FFFFFF;
    --color-banner-bg: #1788f9b3;
    --color-text: #111111;
    --color-text-secondary: #666666;
    --color-border: #DDDDDD;
    --color-error: #CC3333;
    --color-disabled: #CCCCCC;
}

:root {
    /* Базовая шкала отступов */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;
}


:root {
    --radius-container: 16px;
    --radius-card: 12px;
    --radius-modal: 12px;
    --radius-btn: 8px;
    --radius-btn-small: 4px;
    --radius-input: 4px;
}

:root {
    --shadow-container: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.15);
    --shadow-modal: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-btn-hover: 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-tooltip: 0 3px 8px rgba(0, 0, 0, 0.2);
}

:root {
    --transition-fast: 0.15s ease-in-out;
    --transition-medium: 0.25s ease-in-out;
    --transition-slow: 0.3s ease-in-out;
}


/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) {
    :root {
        --radius-container: 12px;
        /* уменьшили на 25% */
        --radius-card: 10px;
        /* уменьшили на ~20% */
        --radius-modal: 10px;
        --radius-btn: 6px;
        --radius-btn-small: 3px;
        --radius-input: 3px;
    }

    :root {
        --space-md: 12px;
        --space-lg: 16px;
        --space-xl: 24px;
        --space-xxl: 32px;
        --space-xxxl: 48px;
    }

    :root {
        --shadow-container: 0 1px 2px rgba(0, 0, 0, 0.08);
        --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.1);
        --shadow-modal: 0 2px 8px rgba(0, 0, 0, 0.2);
        --shadow-btn-hover: 0 1px 3px rgba(0, 0, 0, 0.1);
        --shadow-tooltip: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

}

html {
    background-color: var(--color-bg);
    font-size: 16px;
    /* 1rem = 16px */
    line-height: 1.5;
    font-family: 'Inter', 'Arial', sans-serif;
    color: var(--color-text);
}

body {
    max-width: 1144px;
    margin: auto;
}

main {
    padding: var(--space-md);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ======================
   ЗАГОЛОВКИ
   ====================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.3;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.3;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.4;
}

h6 {
    font-size: 1rem;
    line-height: 1.4;
}

/* Заголовки карточек */
.card h3, .card h4 {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card h3 {
    font-size: 1.5rem;
}

.card h4 {
    font-size: 1.25rem;
}

/* ======================
   ПАРАГРАФЫ
   ====================== */
p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Мелкий текст / подписи */
small, .small-text {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ======================
   ССЫЛКИ
   ====================== */
a {
    font-size: 1rem;
    text-decoration: none;
    color: var(--color-primary);
}

a:hover {
    color: var(--color-accent);
}

/* ======================
   СПИСКИ
   ====================== */
ul, ol {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ======================
   ЦИТАТЫ
   ====================== */
blockquote {
    font-size: 1.125rem;
    line-height: 1.6;
    font-style: italic;
    margin: 1rem 0;
    border-left: 3px solid #ccc;
}

/* ======================
   ФОРМЫ
   ====================== */
input, textarea, select, label {
    font-size: 1rem;
    line-height: 1.5;
}

label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

/* ======================
   МЕНЮ / НАВИГАЦИЯ
   ====================== */
nav a, .nav-link {
    font-size: 1rem;
    font-weight: 500;
    margin-right: 1rem;
}

/* ======================
   ФУТЕР
   ====================== */
footer, .footer {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ======================
   АДАПТИВНОСТЬ (MOBILE)
   ====================== */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1.125rem;
    }

    h6 {
        font-size: 1rem;
    }

    .card h3 {
        font-size: 1.25rem;
    }

    .card h4 {
        font-size: 1rem;
    }

    p, ul, ol, a, button, input, textarea, select, label {
        font-size: 0.9375rem;
    }

    small, .small-text, footer, .footer {
        font-size: 0.8125rem;
    }
}

/* Контейнеры / секции */
section, .container {
    border-radius: var(--radius-container);
    background-color: var(--color-block-bg);
}

/* Карточки */
.card {
    border-radius: var(--radius-card);
    overflow: hidden;
    /* чтобы вложенные элементы не выходили за радиус */
}

/* Модальные окна */
.modal {
    border-radius: var(--radius-modal);
}

/* Кнопки */
button, .btn {
    display: flex;
    width: max-content;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-color: var(--color-border);
    border-radius: var(--radius-btn);
    color: var(--color-block-bg);
    background-color: var(--color-primary);
    width: 100%;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

button.disabled, .btn.disabled {
    cursor: unset;
    background-color: var(--color-disabled);
}

button.disabled:hover, .btn.disabled:hover {
    cursor: unset;
    background-color: var(--color-disabled);
    box-shadow: none;
}

button.error, .btn.error {
    background-color: var(--color-error);
}

button.small, .btn-small {
    border-radius: var(--radius-btn-small);
}

/* Input, textarea */
input, textarea, select {
    border-radius: var(--radius-input);
    border: 1px solid var(--color-border);
}


/* header*/
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-md);
    background-color: var(--color-block-bg);
    margin: 0 var(--space-md);
    border-radius: 0 0 var(--radius-container) var(--radius-container);
    box-shadow: var(--shadow-container);
}

/* footer*/
.site-footer {
    background-color: var(--color-block-bg);
    margin: 0 var(--space-md);
    border-radius: var(--radius-container) var(--radius-container) 0 0;
    box-shadow: var(--shadow-container);
    padding-top: var(--space-md);

    h5 {
        border-bottom: solid var(--color-border) 1px;
    }

    .grid-container {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    @media (max-width: 750px) {
        .grid-container {
            grid-template-columns: 1fr;
        }
    }

    div {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    ul {
        padding: var(--space-xs);
    }

    .copyright {
        padding-top: var(--space-lg);
        padding-bottom: var(--space-md);
        border-radius: var(--radius-container) var(--radius-container) 0 0;
        background-color: var(--color-primary);
        color: var(--color-block-bg);
        font-size: 0.9rem;
        display: flex;
        justify-content: space-between;

        a {
            color: var(--color-block-bg);
        }

        a:hover {
            color: var(--color-accent);
        }
    }
}

/* Секции и контейнеры */
section, .container {
    padding: var(--space-xl) var(--space-md);
}

/* Карточки */
.card {
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Заголовки и параграфы */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-md);
}

/* Формы */
input, textarea, select {
    width: 100%;
    margin: 0;
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
}

label {
    margin: 0;
}

/* Списки */
ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}


/* Контейнеры / секции */
section, .container {
    box-shadow: var(--shadow-container);
    border-radius: var(--radius-container);
}

/* Карточки */
.card {
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}

/* Модальные окна */
.modal {
    box-shadow: var(--shadow-modal);
    border-radius: var(--radius-modal);
}

/* Кнопки */
button:hover, .btn:hover {
    box-shadow: var(--shadow-btn-hover);
    background-color: var(--color-accent);
    color: var(--color-block-bg);
}

/* Выпадающие элементы и тултипы */
.dropdown, .tooltip {
    box-shadow: var(--shadow-tooltip);
    border-radius: var(--radius-btn-small);
}

/* Кнопки */
button, .btn {
    transition: background-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

/* Ссылки */
a {
    transition: color var(--transition-fast);
}

/* Карточки */
.card {
    transition: box-shadow var(--transition-medium), transform var(--transition-medium);
}

.card:hover {
    transform: translateY(-4px);
}

/* Модальные окна */
.modal {
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

/* Input и textarea */
input, textarea, select {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Тултипы и dropdown */
.tooltip, .dropdown {
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

/* Простая fade-in анимация */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}


@media (max-width: 1024px) {
    .card:hover {
        transform: translateY(-2px);
    }

    .fade-in {
        animation: fadeIn 0.25s ease-out forwards;
    }
}


.logo {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-weight: 600;
    /* Жирный */
    font-size: 1.2rem;
    /* Desktop размер */
    color: var(--color-primary);
    /* Основной цвет сайта */
    letter-spacing: -1.1px;
    text-transform: uppercase;
    text-decoration: none;
    /* Если ссылка */
    transition: color 0.2s ease-in-out;
    /* Плавный hover */
}

.banner {
    background-color: var(--color-primary);
    border-radius: var(--radius-card);
    color: var(--color-block-bg);
    padding-top: var(--space-xxxl);
    padding-bottom: var(--space-xxxl);
    display: flex;
    align-items: center;
    justify-content: center;

    h1 {
        color: var(--color-block-bg);
        text-align: center;
    }
}

.grid-container {
    display: grid;
    gap: var(--space-md) var(--space-sm);
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 800px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}


.cart-notice {
    background: var(--color-primary);
    height: 8px;
    width: 8px;
    display: inline-block;
    border-radius: 100%;
    position: absolute;
}

#alert-block {
    position: fixed;
    top: 8px;
    left: 8px;
}

.alert {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-m);

	padding: var(--space-l) var(--space-xl);
	border-radius: var(--radius-modal);

	background: color-mix(in srgb, var(--color-block-bg) 90%, black 10%);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

	opacity: 1;
	transform: translateX(0);
	transition:
		opacity 0.35s ease,
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);

	p {
		margin: 0;
		line-height: 1.4;
	}
}

.alert.success {
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.alert.error {
    background-color: var(--color-error);
    color: var(--color-bg);
}

.alert.warning {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.htmx-swapping {
    opacity: 0;
}

.team img {
    border-radius: var(--radius-modal);
    max-height: 300px;
    object-fit: cover;
    width: 100%;
    object-position: bottom;
}

@media (max-width: 767px) {
    .mobile {
        display: none;
    }
}

@media (min-width: 768px) {
    .desktop {
        display: none !important;
    }

    .price-section-grid {
        grid-template-rows: auto auto auto 1fr;
    }

    .grid-price-child {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: 1/-1;
    }

}

.floating-text {
    position: fixed;
    transform: translate(-50%, 0);
    font-weight: 600;
    pointer-events: none;
    z-index: 9999;
    animation: float-up 1.2s ease-out forwards;
    /* text-shadow: var(--color-block-bg) 1px 0 10px; */

}

@keyframes float-up {
    0% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }

    5% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -100px) scale(1.05);
        opacity: 0;
    }
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	font-size: 0.95rem;
}

thead {
	background-color: var(--color-block-bg, #f9fafb);
}

th,
td {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid var(--color-border, #e5e7eb);
	text-align: left;
	vertical-align: middle;
}

th {
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-text-muted, #6b7280);
	white-space: nowrap;
}

tbody tr:hover {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Числовые колонки */
td:nth-child(2),
td:nth-child(3),
td:nth-child(4) {
	text-align: right;
	white-space: nowrap;
}

/* Последняя строка без разделителя */
tbody tr:last-child td {
	border-bottom: none;
}

/* Адаптивность */
@media (max-width: 640px) {
	table {
		font-size: 0.85rem;
	}

	th {
		font-size: 0.75rem;
	}
}
