/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #ff6b00;
    --primary-dark: #e55a00;
    --primary-light: #ff8533;
    --secondary: #0a192f;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --success: #10b981;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-dark: linear-gradient(135deg, var(--secondary) 0%, #0a0f1a 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    background: var(--light);
    font-size: 16px;
    line-height: 1.6;
}

/* ===== ПРЕЛОАДЕР ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'Montserrat', sans-serif;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 107, 0, 0.3);
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: white !important;
    font-family: 'Montserrat', sans-serif;
}

.navbar-brand span {
    color: var(--primary);
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
    margin: 0 0.5rem;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* БУРГЕР-МЕНЮ (ТРИ ПОЛОСЫ) — БЕЛЫМ ЦВЕТОМ */
.navbar-toggler {
    border: none;
    background: transparent;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-dark);
    overflow: hidden;
    padding-top: 90px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white !important;
    font-family: 'Montserrat', sans-serif;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item i {
    color: var(--primary);
}

.hero-image-wrapper {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 107, 0, 0.3);
}

/* ===== КНОПКИ ===== */
.btn-primary-custom {
    background: var(--gradient);
    color: white !important;
    border: none;
    padding: 1rem 2rem;
    font-weight: 700;
    border-radius: 12px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.4);
    color: white !important;
}

/* ===== СЕКЦИИ ===== */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark) !important;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray) !important;
    font-size: 1rem;
    max-width: 700px;
    margin: 1.5rem auto 3rem;
}

/* ===== КАРТОЧКИ ТОВАРОВ ===== */
.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 3rem 0 2rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
    color: var(--dark) !important;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f5f5f5;
    transition: transform 0.5s ease;
    padding: 1rem;
}

.product-card:hover .product-img {
    transform: scale(1.02);
}

.product-content {
    padding: 1.2rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark) !important;
}

.product-spec {
    font-size: 0.85rem;
    color: var(--gray) !important;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.product-detail {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.product-detail span:first-child {
    color: var(--gray) !important;
    font-size: 0.8rem;
}

.product-detail span:last-child {
    font-weight: 600;
    color: var(--dark) !important;
    font-size: 0.8rem;
}

.product-price-info {
    background: linear-gradient(135deg, #fff5eb 0%, #fff 100%);
    padding: 0.7rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.product-price-info p {
    margin: 0;
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 0.85rem;
}

.btn-order {
    background: var(--gradient);
    color: white !important;
    border: none;
    padding: 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.4);
    color: white !important;
}

/* ===== ФИТИНГИ ===== */
.fitting-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.fitting-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.fitting-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.fitting-card .product-img {
    height: 120px;
    object-fit: contain;
    background: #f5f5f5;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
}

.fitting-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--dark) !important;
}

.fitting-card p {
    font-size: 0.8rem;
    color: var(--gray) !important;
    margin-bottom: 0.5rem;
}

.fitting-price-info {
    margin-top: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: var(--primary) !important;
    font-weight: 600;
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background: #f5f5f5;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    margin: 0;
    font-weight: 600;
    color: white !important;
    font-size: 0.9rem;
}

/* ===== ФОРМА ===== */
.order-form-wrapper {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--dark) !important;
    margin-bottom: 0.5rem;
}

/* ===== КОНТАКТЫ ===== */
.contact-section {
    background: var(--gradient-dark);
    position: relative;
}

.contact-section .section-title {
    color: var(--primary) !important;
}

.contact-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white !important;
}

.contact-card p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.3rem;
}

.contact-card a {
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-card a:hover {
    color: var(--primary) !important;
}

/* ===== ФУТЕР ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 1.5rem 0;
}

.footer p {
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0;
    font-size: 0.85rem;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.modal-header {
    background: var(--gradient);
    color: white;
    border: none;
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.modal-body p {
    color: var(--gray) !important;
}

/* ===== КНОПКА НАВЕРХ ===== */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.scroll-top i {
    color: white;
    font-size: 1.2rem;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНА ===== */
@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }

    .hero {
        padding-top: 80px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        text-align: center;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        max-width: 80%;
        margin-top: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .category-title {
        font-size: 1.3rem;
        margin: 1.5rem 0 1rem;
    }

    /* ТРУБЫ — 2 КОЛОНКИ */
    #pipes .row.g-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ФИТИНГИ — 2 КОЛОНКИ */
    #fittings .row.g-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ГАЛЕРЕЯ — 1 КОЛОНКА */
    #gallery .row.g-4 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .product-img {
        height: 150px;
        padding: 0.8rem;
    }

    .product-content {
        padding: 0.8rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-spec {
        font-size: 0.7rem;
    }

    .product-detail span {
        font-size: 0.65rem;
    }

    .product-price-info p {
        font-size: 0.7rem;
    }

    .btn-order {
        padding: 0.5rem;
        font-size: 0.7rem;
    }

    .fitting-card {
        padding: 0.8rem;
    }

    .fitting-card .product-img {
        height: 80px;
    }

    .fitting-card h5 {
        font-size: 0.75rem;
    }

    .fitting-card p {
        font-size: 0.65rem;
    }

    .fitting-price-info {
        font-size: 0.6rem;
    }

    .gallery-item img {
        height: 180px;
    }

    .order-form-wrapper {
        padding: 1.2rem;
    }

    .form-control, .form-select {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn-primary-custom {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .contact-card {
        padding: 1rem;
    }

    .contact-card i {
        font-size: 1.5rem;
    }

    .contact-card h4 {
        font-size: 1rem;
    }

    .contact-card a {
        font-size: 0.85rem;
    }

    .footer p {
        font-size: 0.7rem;
    }

    .container {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .product-img {
        height: 120px;
    }

    .fitting-card .product-img {
        height: 70px;
    }

    .gallery-item img {
        height: 150px;
    }
}