:root {
    --bg: #0f1114;
    --card: #161b22;
    --text: #f3f5f7;
    --muted: #c8ced8;
    --accent: #2f8bff;
    --accent-hover: #1f70d6;
    --font-family-base: Arial, sans-serif;
    --font-size-base: 16px;
    --fs-body-sm: 14px;
    --fs-nav: 16px;
    --fs-button: 16px;
    --fs-h1: 48px;
    --fs-h2: 34px;
    --fs-h3: 28px;
    --fs-h4: 22px;
    --line-height-base: 1.5;
    --line-height-heading: 1.2;
    --font-weight-body: 400;
    --font-weight-heading: 700;
    --surface-alt: #121821;
    --border: #2b3442;
    --border-strong: #222933;
    --input-border: #324158;
    --control-border: #344055;
    --control-border-soft: #42526a;
    --control-bg: #0f141b;
    --dot-inactive: #506279;
    --hero-text: #f2f2f2;
    --inverse-text: #ffffff;
}

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

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

body {
    font-family: var(--font-family-base);
    background: var(--bg);
    color: var(--text);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-body);
}

body.menu-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
    font-weight: var(--font-weight-heading);
    line-height: var(--line-height-heading);
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: var(--fs-h4);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 100% - 32px);
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 17, 20, 0.92);
    border-bottom: 1px solid var(--border-strong);
}

.nav {
    min-height: 74px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: var(--fs-nav);
}

.nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: var(--muted);
    font-size: var(--fs-nav);
    transition: color 0.2s ease;
}

.nav__link.is-active,
.nav__link:hover {
    color: var(--text);
}

.nav__burger {
    display: none;
    width: 42px;
    height: 36px;
    border: 1px solid var(--control-border);
    background: transparent;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: relative;
}

.nav__burger-line {
    width: 18px;
    height: 2px;
    background: var(--text);
}

.nav__burger.is-open .nav__burger-line:first-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.nav__burger.is-open .nav__burger-line:nth-child(2) {
    display: none;
}

.nav__burger.is-open .nav__burger-line:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.hero-slider {
    position: relative;
    min-height: calc(100vh - 150px);
    overflow: hidden;
}

.hero-slider__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.hero-slider__slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.75));
}

.hero-slider__content {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 70px;
}

.hero-slider h1, h2 {
    max-width: 700px;
    
}

.hero-slider p {
    margin: 0;
    max-width: 600px;
    color: var(--hero-text);
    font-size: var(--font-size-base);
}

.hero-slider__list {
    margin: 0;
    padding-left: 22px;
    max-width: 760px;
    color: var(--hero-text);
    font-size: var(--font-size-base);
}

.hero-slider__list li {
    margin-bottom: 8px;
}

.hero-slider__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: var(--inverse-text);
    cursor: pointer;
}

.hero-slider__control--prev {
    left: 20px;
}

.hero-slider__control--next {
    right: 20px;
}

.hero-slider__dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-slider__dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.hero-slider__dot.is-active {
    background: var(--inverse-text);
}

.page {
    min-height: calc(100vh - 74px);
}

.section {
    padding: 42px 0 60px;
}

.section__title {
    margin-bottom: 20px;
}

.section p,
.section li {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--muted);
}

.about {
    position: relative;
}

.about__image {
    border-radius: 16px;
    min-height: 340px;
    object-fit: cover;
    width: 100%;
}

.download_link {
    color: var(--accent);
    transition: color .3s ease-in-out;
}

.download_link:hover {
    color: var(--accent-hover);
}

.tabs {
    margin-top: -36px;
    position: relative;
    z-index: 2;
}

.tabs__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tabs__button {
    border: 1px solid var(--control-border);
    background: var(--card);
    color: var(--text);
    padding: 12px 18px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-heading);
    border-radius: 10px 10px 0 0;
    cursor: pointer;
}

.tabs__button.is-active {
    border-color: var(--accent);
}

.tabs__content {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 0 12px 12px 12px;
}

.tabs__content.is-active {
    display: block;
}

.tabs__content :is(h1, h2, h3, h4) {
    margin-bottom: 20px;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.department-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.department-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.department-card h4 {
    margin: 14px 14px 8px;
}

.department-card p {
    margin: 0 14px 16px;
    color: var(--muted);
    text-align: justify;
}

.clients-layout {
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 18px;
    align-items: start;
}

.clients-layout img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.contacts {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.contacts__map,
.contacts__info,
.contact-form,
.product-card,
.product-detail,
.requisites {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.contacts__map {
    overflow: hidden;
}

.contacts__info {
    padding: 20px;
}

.contact-form {
    padding: 20px;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    font-size: var(--fs-body-sm);
}

input,
textarea {
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    background: var(--surface-alt);
}

.button {
    display: inline-block;
    border: none;
    background: var(--accent);
    color: var(--inverse-text);
    font-size: var(--fs-button);
    font-weight: var(--font-weight-heading);
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.button:hover {
    background: var(--accent-hover);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow: hidden;
}

.product-card__img-wrapper {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card img {
    max-height: 280px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px 0 0 14px;
    flex-shrink: 0;
}

.product-card__body {
    flex: 1;
    min-height: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card__body p {
    color: var(--muted);
}

.product-card__body .button {
    margin-top: auto;
    align-self: flex-start;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    padding: 20px;
}

.product-detail img {
    width: 100%;
    border-radius: 10px;
    min-height: 260px;
    object-fit: cover;
}

.product-detail--single {
    grid-template-columns: 1fr;
}

.product-detail__body p,
.product-detail__body li {
    color: var(--muted);
}

.product-detail__body ul {
    margin-top: 0;
    margin-bottom: 16px;
}

.product-detail__single-image {
    margin-top: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.product-detail__single-image img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.product-detail__actions {
    margin-top: 18px;
}

.product-carousel {
    position: relative;
    margin-top: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 48px 38px;
}

.product-carousel__track img {
    display: none;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 10px;
}

.product-carousel__track img.is-active {
    display: block;
}

.product-carousel__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--control-border-soft);
    background: var(--control-bg);
    color: var(--inverse-text);
    cursor: pointer;
}

.product-carousel__control--prev {
    left: 8px;
}

.product-carousel__control--next {
    right: 8px;
}

.product-carousel__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.product-carousel__dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: var(--dot-inactive);
    cursor: pointer;
}

.product-carousel__dot.is-active {
    background: var(--inverse-text);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.requisites {
    padding: 24px;
}

.requisites strong {
    margin-right: 10px;
    color: var(--text);
}

.requisites p {
    border-bottom: 1px solid var(--border-strong);
    font-size: var(--font-size-base);
}

.footer {
    border-top: 1px solid var(--border-strong);
    margin-top: 20px;
}

.footer p {
    margin-top: 0px;
    margin-bottom: 10px;
    font-size: var(--fs-body-sm);
}

.footer__content {
    padding: 20px 0;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

@media (max-width: 1200px) {
    .nav__list {
        gap: 14px;
    }

    .hero-slider__content {
        padding-bottom: 56px;
    }

    .contacts {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    body {
        padding-top: 68px;
    }

    .container {
        width: min(1200px, 100% - 24px);
    }

    .nav {
        min-height: 68px;
    }

    .nav__burger {
        display: inline-flex;
    }

    .nav__list {
        position: fixed;
        top: 68px;
        right: 0;
        width: min(320px, 100%);
        height: auto;
        max-height: calc(100dvh - 68px);
        overflow-y: auto;
        background: var(--card);
        border: 1px solid var(--border);
        border-right: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        transform: translateX(calc(100% + 20px));
        transition: transform 0.2s ease;
        visibility: hidden;
        pointer-events: none;
        z-index: 99;
    }

    .nav__list.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .contacts,
    .contact-form__grid,
    .product-detail {
        grid-template-columns: 1fr;
    }

    .hero-slider,
    .hero-slider__content,
    .page {
        min-height: calc(100vh - 68px);
    }

    .hero-slider h1,
    .hero-slider h2 {
        max-width: 560px;
    }

    .tabs {
        margin-top: -24px;
    }

    .footer__content {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 28px 0 38px;
    }

    .nav__logo img {
        width: 38px;
        height: auto;
    }

    .nav__logo span {
        font-size: var(--fs-body-sm);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        flex-direction: column;
    }

    .product-card__img-wrapper {
        flex: none;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .product-card img {
        max-height: 280px;
        max-width: 100%;
        width: auto;
        height: auto;
        min-height: auto;
        border-radius: 14px 14px 0 0;
    }

    .product-card__body {
        min-height: 0;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-slider__content {
        justify-content: center;
        padding-top: 40px;
        padding-bottom: 70px;
    }

    .hero-slider p {
        max-width: 100%;
    }

    .hero-slider__list {
        max-width: 100%;
        font-size: var(--font-size-base);
    }

    .hero-slider__control {
        width: 36px;
        height: 36px;
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-slider__control--prev {
        left: calc(50% - 82px);
    }

    .hero-slider__control--next {
        right: calc(50% - 82px);
    }

    .hero-slider__dots {
        bottom: 30px;
    }

    .tabs__button {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
        border-radius: 10px;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .clients-layout {
        grid-template-columns: 1fr;
    }

    .tabs__content {
        border-radius: 12px;
    }

    .contact-form,
    .contacts__info,
    .product-card__body,
    .requisites {
        padding: 16px;
    }

}

@media (max-width: 520px) {
    body {
        padding-top: 62px;
    }

    .container {
        width: min(1200px, 100% - 16px);
    }

    .nav {
        min-height: 62px;
    }

    .nav__list {
        top: 62px;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 62px);
        border-right: 1px solid var(--border);
        transform: translateX(calc(100% + 16px));
    }

    .hero-slider,
    .hero-slider__content,
    .page {
        min-height: calc(100vh - 62px);
    }

    .hero-slider p {
        font-size: var(--font-size-base);
    }

    .hero-slider__list {
        font-size: var(--font-size-base);
        padding-left: 18px;
    }

    .hero-slider__control {
        display: none;
    }

    .hero-slider__dots {
        bottom: 16px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .product-double-images {
        grid-template-columns: 1fr;
    }

    .product-carousel {
        padding: 10px 10px 34px;
    }

    .tabs {
        margin-top: -12px;
    }

    .tabs__controls {
        gap: 8px;
    }

    .tabs__button {
        flex-basis: 100%;
        border-radius: 8px;
        padding: 10px 12px;
    }

    .requisites p {
        margin-bottom: 8px;
        font-size: var(--font-size-base);
    }
}

.product-carousel__track img {
    cursor: pointer;
}

.product-carousel__control.is-hidden {
    display: none;
}

.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 74px - 200px);
    text-align: center;
    gap: 16px;
}

.not-found h1 {
    font-size: clamp(72px, 15vw, 160px);
    color: var(--muted);
    opacity: 0.3;
    line-height: 1;
}

.not-found p {
    color: var(--muted);
    font-size: var(--fs-h3);
    margin: 0;
}

.not-found .button {
    margin-top: 10px;
}

.product-carousel__lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.product-carousel__lightbox.is-open {
    display: flex;
}

.product-carousel__lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.product-carousel__lightbox-image {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
}

.product-carousel__lightbox-close {
    position: absolute;
    top: 16px;
    right: 50px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: var(--inverse-text);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-carousel__control.product-carousel__control--lightbox {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--control-border-soft);
    background: var(--control-bg);
    color: var(--inverse-text);
    cursor: pointer;
    z-index: 2;
}

.product-carousel__control.product-carousel__control--lightbox.is-hidden {
    display: none;
}

.product-carousel__control--lightbox.product-carousel__control--prev {
    left: 50px;
}

.product-carousel__control--lightbox.product-carousel__control--next {
    right: 50px;
}

@media (max-width: 520px) {
    .product-carousel__lightbox-image {
        max-width: 96vw;
        max-height: 70vh;
    }

    .product-carousel__control--lightbox.product-carousel__control--prev {
        left: 15px;
    }

    .product-carousel__control--lightbox.product-carousel__control--next {
        right: 15px;
    }

    .product-carousel__lightbox-close {
        right: 5px;
    }
}