/* === ОБЩЕЕ === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Montserrat", Arial, sans-serif;
    background: #fff;
    color: #222;
    line-height: 1.6;
    font-weight: 500;
    padding-top: 90px;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === HEADER === */
.header-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 999;
    padding: 14px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 30px;
}

/* ЛОГО */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
}

.logo svg {
    height: 50px;
    width: auto;
}

.logo svg g {
    fill: #000;
}

.logo-sub {
    font-size: 15px;
    color: #000;
    font-weight: 500;
    line-height: 1.2;
}

/* ПОИСК */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    margin: 0 40px;
}

.header-search input {
    width: 100%;
    padding: 10px 38px;
    border-radius: 25px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 15px;
    color: #333;
    outline: none;
}

.header-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #777;
}

/* ПРАВАЯ ЧАСТЬ */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin-right: 0;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-icon i {
    color: #25d366;
    font-size: 22px;
    transition: 0.2s;
}

.whatsapp-icon i:hover {
    color: #1ebe5d;
}

.cart-btn i {
    color: #0f4c81;
    font-size: 20px;
    transition: 0.2s;
}

.cart-btn i:hover {
    color: #0074d9;
}

.phone-number a {
    color: #000;
    font-weight: 600;
    transition: 0.2s;
}

.phone-number a:hover {
    color: #0084ff;
}

/* КНОПКА ЗЕЛЁНАЯ */
.btn-consult.green-btn {
    background: #25d366;
    color: #fff;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.25s;
}

.btn-consult.green-btn:hover {
    background: #1ebe5d;
    transform: translateY(-1px);
}

/* === КАТЕГОРИИ === */
.categories {
    padding: 70px 0;
    background: #fff;
    /* убрал синюю подложку */
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 50px;
    justify-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.category-card {
    background: #fff;
    border-radius: 20px;
    width: 300px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.category-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-top: 5px;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-card:hover img {
    transform: scale(1.05);
}

/* адаптив */
@media (max-width: 1000px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        width: 90%;
    }
}

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



/* === ПАРТНЁРЫ === */
.partners {
    background: #f8fbff;
    padding: 60px 0;
    text-align: center;
}

.partners h2 {
    font-size: 26px;
    color: #0f4c81;
    margin-bottom: 40px;
    font-weight: 600;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.partners-logos img {
    height: 45px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.partners-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* === FOOTER === */
.footer {
    background: #fff;
    color: #0f4c81;
    margin-top: 0;
    border-top: 3px solid #2b3f73;
    position: relative;
    overflow: hidden;
    padding-top: 40px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.footer-map {
    flex: 2;
}

.footer-map iframe {
    width: 100%;
    height: 320px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    border: none;
}

.footer-contacts {
    flex: 1;
    text-align: left;
    margin-left: 60px;
}

.footer-contacts h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f4c81;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f4c81;
    font-size: 15px;
    margin-bottom: 12px;
}

.footer-contacts a {
    color: #0f4c81;
    transition: 0.3s;
}

.footer-contacts a:hover {
    color: #0084ff;
}

.footer-bottom {
    background: #fff;
    color: #0f4c81;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 14px;
    border-top: 1px solid #d0d0d0;
}

.footer-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    overflow: hidden;
    line-height: 0;
}

.footer-waves svg {
    width: 100%;
    height: 80px;
    display: block;
}

/* === ПРЕЛОАДЕР === */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.cube {
    position: relative;
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    animation: rotateCube 2s infinite linear;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #0f4c81;
    opacity: 0.9;
    border: 2px solid #fff;
}

.front {
    transform: translateZ(30px);
}

.back {
    transform: rotateY(180deg) translateZ(30px);
}

.right {
    transform: rotateY(90deg) translateZ(30px);
}

.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.top {
    transform: rotateX(90deg) translateZ(30px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0) rotateY(0);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* === КНОПКА НАВЕРХ === */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f4c81;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background: #0084ff;
    transform: translateY(-3px);
}

/* === АДАПТИВ === */
@media (max-width: 960px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        margin: 10px 0;
    }

    .header-right {
        order: 2;
    }

    .categories {
        padding: 40px 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-contacts {
        margin-left: 0;
        text-align: center;
    }
}

/* === Убираем разделитель между контентом и футером === */
footer {
    border-top: none !important;
}

main,
.product-detail {
    border-bottom: none !important;
}

.water-analysis {
    padding: 40px 0;
    background: #f8f8f8;
    border-top: 1px solid #e3e3e3;
    border-bottom: 1px solid #e3e3e3;
}

.wa-box {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wa-icon i {
    font-size: 40px;
    color: #18a34a;
}

.wa-text h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.wa-text p {
    margin: 5px 0 0;
    color: #666;
    max-width: 600px;
}

.wa-button {
    margin-left: auto;
    background: #18a34a;
    border: none;
    padding: 12px 25px;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.wa-button:hover {
    background: #138c3e;
}

/* ===== МОДАЛКА ===== */
.water-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

.water-modal-content {
    width: 500px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    padding: 30px 35px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Кнопка закрытия */
.water-close {
    position: absolute;
    right: 15px;
    top: 12px;
    font-size: 28px;
    cursor: pointer;
    color: #444;
}

/* Поля */
#waterForm label {
    margin-top: 15px;
    display: block;
    font-weight: 600;
    color: #333;
}

#waterForm input,
#waterForm select,
#waterForm textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    font-size: 15px;
    transition: .2s;
}

#waterForm input:focus,
#waterForm select:focus,
#waterForm textarea:focus {
    border-color: #18a34a;
    box-shadow: 0 0 0 3px rgba(24, 163, 74, 0.18);
}

/* Кнопка отправки */
.wa-submit {
    margin-top: 25px;
    width: 100%;
    background: #18a34a;
    color: #fff;
    padding: 14px;
    font-size: 17px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: .2s;
}

.wa-submit:hover {
    background: #15953f;
}

/* Красная звезда */
.req {
    color: #e63946;
    margin-left: 4px;
}

/* Тоггл Да/Нет */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #bbb;
    border-radius: 30px;
    cursor: pointer;
    transition: .3s;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}

.toggle-wrap input {
    display: none;
}

.toggle-wrap input:checked+.toggle-switch {
    background: #18a34a;
}

.toggle-wrap input:checked+.toggle-switch::after {
    transform: translateX(22px);
}

.toggle-text {
    font-weight: 600;
    color: #333;
}

/* SELECT стрелка */
.water-modal-content select {
    -webkit-appearance: none;
    appearance: none;
    background: #fff url("data:image/svg+xml;utf8,<svg width='14' height='10' xmlns='http://www.w3.org/2000/svg'><polyline points='1,3 7,9 13,3' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat right 14px center;
    padding-right: 40px;
}

/* Ошибки */
input.error,
select.error,
textarea.error {
    border-color: #e63946 !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25) !important;
}

.form-error {
    animation: shake .3s ease;
}

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

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

.error-text {
    font-size: 13px;
    color: #e63946;
    margin-top: 6px;
}

/* ===== УСПЕХ ===== */
.success-popup {
    display: none;
    padding: 25px 10px;
    text-align: center;
    animation: fadeIn .35s ease;
}

/* ИДЕАЛЬНАЯ SVG ГАЛОЧКА */
.success-icon svg {
    width: 120px;
    height: 120px;
    stroke: #18a34a;
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-message {
    font-size: 20px;
    color: #333;
    margin: 20px 0;
}

.success-ok {
    padding: 12px 28px;
    font-size: 17px;
    background: #18a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: .2s;
}

.success-ok:hover {
    background: #15953f;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}