/* ========== ПОДКЛЮЧЕНИЕ ШРИФТОВ ========== */

@font-face {
    font-family: 'Norbert Breit';
    src: url('./shrift/NorbertBreit-Fett.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #181819;
    --text-primary: #FFFFFF;
    --marquee-bg: rgba(182, 175, 181, 0.48);
    --logo-height: clamp(20px, 5vw, 28px);
    --marquee-height: calc(var(--logo-height) * 0.85);
    --text-height: calc(var(--marquee-height) * 0.65);
    --banner-height: calc(var(--marquee-height) * 13.9 * 2);
    /* x2 */
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overscroll-behavior-x: none;
    width: 100vw;
    max-width: 100vw;
}

#app {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ========== СТРАНИЦЫ ========== */

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transform: translateX(100%);
    overflow-x: hidden;
    max-width: 100vw;
}

.page.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateX(0);
}

/* ========== ХЕДЕР ========== */

.header {
    padding: clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px) 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 100;
    gap: clamp(12px, 3vw, 16px);
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-link:active {
    transform: scale(0.95);
}

.logo {
    height: var(--logo-height);
    width: auto;
    display: block;
}

/* ========== БЕГУЩАЯ СТРОКА ========== */

.marquee-container {
    width: 100vw;
    height: var(--marquee-height);
    background: var(--marquee-bg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    margin-left: calc(-1 * clamp(16px, 4vw, 24px));
    margin-right: calc(-1 * clamp(16px, 4vw, 24px));
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    will-change: transform;
    align-items: center;
}

.marquee-text {
    font-family: 'Norbert Breit', 'Impact', 'Arial Black', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: var(--text-height);
    line-height: var(--marquee-height);
    letter-spacing: 0%;
    color: var(--text-primary);
    padding: 0 15px;
    display: inline-block;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ========== КАРУСЕЛЬ БАННЕРОВ ========== */

.banner-carousel {
    width: 100vw;
    height: var(--banner-height);
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
    margin-left: calc(-1 * env(safe-area-inset-left));
    margin-right: calc(-1 * env(safe-area-inset-right));
}

.carousel-track-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: none;
}

.carousel-track.smooth {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Плавное пролистывание */
}

.carousel-slide {
    min-width: 100vw;
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Контейнер для текста, полосы и логотипа */
.banner-overlay-container {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    z-index: 2;
}

/* Текст на баннере */
.banner-text {
    color: #FFFFFF;
    font-family: 'Norbert Breit', sans-serif;
    font-size: clamp(27px, 2.7vh, 54px);
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-style: normal;
    transform: none;
    line-height: 1.2;
    margin-bottom: 5px;
}

/* Полоса под текстом */
.banner-line {
    width: 0;
    height: 1.5px;
    background-color: rgba(255, 255, 255, 0.2);
    margin-bottom: 11.5px;
    align-self: center;
}

/* Логотип под полоской */
.banner-logo {
    width: auto;
    height: 15px;
    filter: brightness(0) saturate(100%) invert(92%) sepia(8%) saturate(1234%) hue-rotate(270deg) brightness(97%) contrast(92%);
}

/* Кликабельная область баннера */
.banner-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* Кнопки навигации */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.carousel-btn:hover {
    opacity: 0.8;
}

.carousel-btn:active {
    opacity: 0.6;
}

.carousel-btn-left {
    left: 0;
}

.carousel-btn-right {
    right: 0;
}

.carousel-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========== РАЗДЕЛИТЕЛЬНАЯ ЛИНИЯ ========== */

.separator-line {
    width: 100%;
    height: 1px;
    background-color: rgba(233, 207, 231, 0.5);
    margin: 0;
}

/* ========== КАРУСЕЛЬ ТОВАРОВ ========== */

.products-carousel {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background-color: var(--bg-color);
}

.products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    padding: 0;
    clip-path: inset(0);
    overscroll-behavior-x: contain;
}

.products-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.product-card {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-card:active {
    transform: scale(0.95);
}

.product-card-first {
    margin-left: 20px;
}

.product-image {
    width: auto;
    height: auto;
    max-height: 120px;
    /* 150px - 20% = 120px */
    display: block;
    object-fit: contain;
    align-self: flex-end;
}

.product-image-second {
    max-height: 109.171px;
    /* 120px - 9.024% = 109.171px */
}

/* ========== АДАПТИВНОСТЬ ========== */

@media (max-width: 374px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 375px) and (max-width: 480px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    html {
        font-size: 18px;
    }
}

/* Анимации для плавности */
@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}