/* reset and base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f5f5f5;
}

a {
    color: #0d6efd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* header */
.header {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: #e0e0e0;
}

.nav a:hover {
    color: #fff;
    text-decoration: none;
}

/* Бургер: скрыт на десктопе */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #fff;
}

.header__burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.header--nav-open .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header--nav-open .header__burger-line:nth-child(2) {
    opacity: 0;
}

.header--nav-open .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header__inner {
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1rem;
        max-width: calc(100% - 52px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header__burger {
        display: flex;
        order: 2;
    }

    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0;
        padding: 1rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .header--nav-open .nav {
        display: flex;
    }

    .nav a {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
}

/* hero */
.hero {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.hero--with-bg {
    background-image: linear-gradient(rgba(22, 33, 62, 0.85) 0%, rgba(26, 26, 46, 0.85) 100%), url("../images/hero.jpg");
}

.hero__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

.hero__subtitle {
    margin: 0;
    font-size: 1.25rem;
    opacity: 0.9;
}

/* intro */
.intro {
    padding: 3rem 0;
    background: #fff;
}

.intro__lead {
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
    font-weight: 500;
}

.intro__heading {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #333;
}

.intro__content p {
    margin: 0 0 1rem;
}

.intro__content p:last-child {
    margin-bottom: 0;
}

/* products */
.products {
    padding: 3rem 0;
}

.section-title {
    margin: 0 0 2rem;
    font-size: 1.75rem;
    text-align: center;
    color: #1a1a2e;
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card__image-wrap {
    aspect-ratio: 3/2;
    background: #e8e8e8;
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__title {
    margin: 0;
    padding: 1rem 1.25rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.product-card__text {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    font-size: 0.95rem;
    color: #555;
}

/* contacts */
.contacts {
    padding: 3rem 0;
    background: #fff;
}

.contacts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.contacts__block {
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.contacts__label {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contacts__value {
    margin: 0;
    font-size: 1rem;
}

.contacts__value a {
    color: #1a1a2e;
}

.contacts__value a:hover {
    color: #0d6efd;
}

/* footer */
.footer {
    padding: 1.5rem 0;
    background: #1a1a2e;
    color: #999;
    font-size: 0.9rem;
    text-align: center;
}

.footer__copy {
    margin: 0;
}

.footer__manufacturer {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer a {
    color: #bbb;
}

/* back to top */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    padding: 0.6rem 1rem;
    background: #fff;
    color: #1a1a2e;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s, box-shadow 0.2s;
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    color: #1a1a2e;
    text-decoration: none;
}
