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

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    background-image: url('../../images/1.jpg');
    background-size: 107%;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #666666;
    background-blend-mode: multiply;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .loader-letter {
        font-size: 28px;
    }

    .loader-space {
        width: 10px;
    }
}

@media (max-width: 480px) {
    .loader-letter {
        font-size: 20px;
    }

    .loader-space {
        width: 6px;
    }
}

.top-bar {
    position: relative;
    top: 140px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 0;
    display: flex;
    justify-content: center;
    gap: 115px;
    white-space: nowrap;
    z-index: 1000;
}

.contacts {
    position: relative;
    top: -16px;
    right: 20.3%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.email {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contacts a {
    color: #ffffff;
    text-decoration: none;
    transition: 0.3s;
}

.category-container {
    position: relative;
    top: 90px;
    padding: 0 25px 150px 85px;
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    min-height: calc(100vh - 300px);
}

.category-container h1 {
    font-size: 72px;
    font-weight: 400;
    letter-spacing: 4px;
    margin: 0 0 20px 0;
}

.category-intro {
    font-size: 17px;
    line-height: 1.3;
    max-width: 700px;
    margin-bottom: 40px;
    font-weight: 700;
}

.category-intro p {
    margin: 0;
    text-indent: 0px;          /* ← убираем красную строку у всех */
}

.category-intro p:first-child {
    margin-bottom: 0;
}

.category-intro p:nth-child(2) {
    margin-bottom: 0;
}

.category-intro .advantages-title {
    margin-top: 20px;          /* ← отступ сверху */
    margin-bottom: 8px;        /* ← отступ снизу */
}

.category-intro strong {
    font-weight: 700;
}

.category-intro p:nth-child(n+4) {
    padding-left: -10px;          /* маленький отступ */
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 60px;
}

.category-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.categories {
    margin-top: 60px;
    margin-left: 20px;
    font-size: 24px;
    font-weight: 750;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cat-row a {
    color: #ffffff;
    text-decoration: underline;
    transition: 0.3s;
}

.line {
    width: 94.4%;
    margin-left: 20px;
    height: 2px;
    background-color: #ffffff;
    margin-top: 50px;
    border: none;
    opacity: 1;
}

.copyright {
    margin-top: 20px;
    margin-left: -23px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    opacity: 0.8;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        top: 100px;
        gap: 15px;
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    .top-bar a {
        font-size: 11px;
    }

    .contacts {
        top: 15px;
        right: 5%;
        font-size: 12px;
        gap: 6px;
    }

    .category-container {
        top: 180px;
        padding: 0 15px 100px 15px;
        width: 95%;
    }

    .category-container h1 {
        font-size: 32px;
    }

    .category-intro {
        font-size: 15px;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .categories {
        font-size: 18px;
    }

    .cat-row {
        gap: 12px;
    }

    .cat-row:nth-child(1),
    .cat-row:nth-child(2),
    .cat-row:nth-child(3) {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    body {
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        background-size: cover;
        background-attachment: scroll;
        background-position: center top;
    }

    .contacts {
        position: relative;
        top: -90px;
        right: auto;
        left: auto;
        width: 100%;
        padding: 0 15px;
        align-items: flex-end;
        gap: 4px;
        font-size: 12px;
    }

    .phones, .email {
        gap: 2px;
    }

    .top-bar {
        position: relative;
        top: -55px;
        width: 100%;
        padding: 9px 10px;
        gap: 8px 14px;
        flex-wrap: wrap;
        white-space: normal;
    }

    .top-bar a {
        font-size: clamp(10px, 2.8vw, 13px);
        letter-spacing: .5px;
    }

    .about-container,
    .materials-container,
    .contacts-container,
    .gallery-container,
    .order-container,
    .category-container {
        position: relative;
        top: -15px;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 15px 90px;
        min-height: 0;
    }

    .about-container h1,
    .materials-container h1,
    .contacts-container h1,
    .gallery-container h1,
    .order-container h1,
    .category-container h1 {
        font-size: clamp(32px, 9vw, 48px);
        line-height: 1.05;
        letter-spacing: 1px;
        margin-bottom: 18px;
    }

    .materials-intro,
    .materials-list-intro,
    .category-intro,
    .gallery-subtitle,
    .order-subtitle,
    .contacts-info,
    .contact-text {
        font-size: 14px;
        line-height: 1.45;
    }

    .materials-grid,
    .category-grid,
    .gallery-grid,
    .steps-grid,
    .order-info {
        width: 100%;
    }

    .categories {
        margin: 50px 0 0;
        font-size: 18px;
        gap: 14px;
    }

    .cat-row,
    .cat-row:nth-child(1),
    .cat-row:nth-child(2),
    .cat-row:nth-child(3) {
        padding-left: 0;
        gap: 10px 18px;
    }

    .cat-row a {
        line-height: 1.25;
    }

    .line {
        width: 100%; margin-left: 0; margin-top: 40px;
    }

    .copyright {
        margin-left: 0; font-size: 12px; line-height: 1.4;
    }

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

    .category-grid {
        grid-template-columns: 1fr 1fr; gap: 10px;
    }

    .material-card, .info-card, .step-item, .contact-block {
        width: 100%;
    }

    img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .top-bar {
        gap: 7px 10px;
    }

    .top-bar a {
        font-size: 10px;
    }

    .category-grid, .materials-grid, .steps-grid {
        grid-template-columns: 1fr;
    }

    .about-container,
    .materials-container,
    .contacts-container,
    .gallery-container,
    .order-container,
    .category-container {
        padding-left: 12px; padding-right: 12px;
    }
}

@media (max-width: 768px) {
    html, body {
        min-height: 100%; height: auto;
    }

    .signature-img {
        max-width: 150px; margin-top: 35px;
    }
}
