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

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

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

/* ========== ТЕСТОВАЯ ПОЛОСКА ========== */
.test-banner {
    background: #ffc107;
    color: #000;
    text-align: center;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ========== ШАПКА ========== */
.main-header {
    background: #1a1a2e;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: #ddd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #ffc107;
}

.header-phone a {
    color: #ffc107;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* ========== HERO (ГЛАВНАЯ) ========== */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/images/background.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #ffc107;
    color: #1a1a2e;
}

.btn-primary:hover {
    background: #e0a800;
}

.btn-outline {
    border-color: #1a1a2e;
    color: #1a1a2e;
    background: transparent;
}

.btn-outline:hover {
    background: #1a1a2e;
    color: white;
}

.text-center {
    text-align: center;
}

/* ========== ПРЕИМУЩЕСТВА (ГЛАВНАЯ) ========== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ========== СЕТКА ТОВАРОВ ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-card h3 {
    padding: 15px 15px 5px;
    font-size: 1.2rem;
}

.product-card .price {
    padding: 0 15px 15px;
    font-weight: bold;
    color: #e63946;
    font-size: 1.3rem;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-page {
    padding: 30px 0;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: #666;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.product-info h1 {
    margin-bottom: 15px;
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    color: #e63946;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 20px;
}

.product-description p {
    text-indent: 2em;
    margin-bottom: 0.8rem;
}

.product-features {
    list-style: none;
    margin-bottom: 25px;
}

.product-features li {
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
}

.btn-order {
    width: 100%;
    font-size: 1.2rem;
    padding: 15px;
}

.small-note {
    margin-top: 10px;
    color: #777;
    font-size: 0.9rem;
}

/* ---------- ГАЛЕРЕЯ ТОВАРА ---------- */
.main-image-container {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.main-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 400px;
    margin: 0 auto;
    cursor: pointer;
}

.thumbnail-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail-item {
    width: 70px;
    height: 70px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail-item:hover {
    opacity: 1;
    border-color: #3a6ea5;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border: 2px solid #3a6ea5;
    opacity: 1;
}

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

/* ---------- ЛАЙТБОКС ---------- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s;
    user-select: none;
    border-radius: 0 3px 3px 0;
    background-color: rgba(0,0,0,0.3);
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

#lightboxCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
}

/* ========== ТЕКСТОВЫЕ СТРАНИЦЫ (с красной строкой) ========== */
.text-page {
    background: white;
    padding: 40px;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.text-page h1 {
    margin-bottom: 25px;
    color: #1a1a2e;
    text-indent: 0;
}

.text-page h2 {
    margin: 25px 0 15px;
    color: #333;
    text-indent: 0;
}

.text-page h3 {
    margin: 20px 0 10px;
    color: #444;
    text-indent: 0;
}

.text-page p {
    text-indent: 2em;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.text-page .manifest-subtitle,
.text-page .manifest-legal-note,
.text-page blockquote,
.text-page blockquote p,
.text-page .btn,
.text-page .no-indent,
.text-page a[href] {
    text-indent: 0;
}

.text-page blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #f8f9fa;
    border-left: 5px solid #3a6ea5;
    font-style: italic;
    color: #444;
    border-radius: 0 8px 8px 0;
    text-indent: 0;
}

.text-page blockquote p {
    margin-bottom: 0.5rem;
    text-indent: 0;
}

.text-page hr {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.manifest-subtitle {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 25px;
    color: #555;
    text-indent: 0;
}

.manifest-legal-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 20px;
    line-height: 1.5;
    text-indent: 0;
}

/* ========== КОНТАКТЫ ========== */
.contacts-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.map-placeholder {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
}

/* ========== ФУТЕР ========== */
.main-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #aaa;
    text-decoration: none;
    line-height: 1.8;
}

.footer-col a:hover {
    color: #ffc107;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #888;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #222;
        padding: 20px;
        margin-top: 15px;
        border-radius: 5px;
    }

    .main-nav.active ul {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-phone {
        margin-left: auto;
        margin-right: 20px;
    }

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

    .hero h1 {
        font-size: 2rem;
    }

    .text-page {
        padding: 20px;
    }
    
        /* Изображения внутри текстовых страниц */
    .text-page .about-image {
        margin: 30px 0;
        text-align: center;
    }
    
    .text-page .about-image img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }
    
    .text-page .about-image figcaption {
        margin-top: 10px;
        font-size: 0.9rem;
        color: #666;
        font-style: italic;
        text-indent: 0;
    }

    .thumbnail-item {
        width: 60px;
        height: 60px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }

    .header-phone a {
        font-size: 1rem;
    }

    .product-card img {
        height: 160px;
    }

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

/* Изображения внутри текстовых страниц (уменьшенные) */
.text-page .about-image {
    margin: 30px auto;
    text-align: center;
    max-width: 60%;               /* ограничиваем ширину блока */
}

.text-page .about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    cursor: pointer;              /* показываем, что кликабельно */
    transition: transform 0.2s;
}

.text-page .about-image img:hover {
    transform: scale(1.02);
}

.text-page .about-image figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-indent: 0;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .text-page .about-image {
        max-width: 90%;
    }
}