/* Общие стили */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #6c7a89; /* спокойный серо-синий */
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #b4bcc2;
    --white-color: #ffffff;
    --black-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--black-color);
    background-color: #f5f5f5;
    padding-top: 40px; /* Для фиксированной верхней панели */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Верхняя контактная панель */
.top-bar {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 10px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    font-size: 14px;
    margin: 5px 0;
}

.contact-info img {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* Шапка */
header {
    background-color: var(--white-color);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 10px;
}

.logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: color 0.3s;
    position: relative;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--secondary-color);
}

nav ul li a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

.slogan {
    font-size: 1.15em;
    color: #234;
    font-weight: 500;
    margin-left: 0;
    white-space: normal;
}

/* Основное содержимое */
main {
    padding: 20px 0 40px;
    min-height: calc(100vh - 200px);
}

/* Каталог */
#catalog {
    width: 100%;
}

.category-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-item {
    background-color: var(--white-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-align: center;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-item h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

#header-logo {
    height: 100px;
    width: auto;
}

/* Стили для иконок контактов */
.contact-card img {
    width: 24px; /* Размер иконок */
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

/* Красивая большая кнопка */
.main-button, .back-button, .contact-button {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: 500;
    margin: 20px 0 0 0;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}
.main-button:hover, .main-button:focus,
.back-button:hover, .back-button:focus,
.contact-button:hover, .contact-button:focus {
    background: #4b5a6a;
}

.breadcrumbs {
    margin: 18px 0 18px 0;
    font-size: 1.08em;
    color: #234;
    display: flex;
    align-items: center;
    gap: 0.3em;
    flex-wrap: wrap;
}
.breadcrumb-link {
    color: #234;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}
.breadcrumb-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* Список товаров */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    list-style: none;
    padding: 0;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(44,62,80,0.08);
    padding: 24px 18px 18px 18px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.product-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 24px rgba(44,62,80,0.13);
}
.product-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1em;
}
.product-card .description {
    color: var(--gray-color);
    font-size: 0.98em;
    margin-bottom: 8px;
}

/* Детали товара */
.product-details {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(44,62,80,0.08);
    padding: 32px 24px;
    margin-top: 20px;
    max-width: 500px;
}
.product-details-card {
    border: 2px solid #e3eaf1;
    border-radius: 14px;
    background: #fff;
    padding: 32px 28px 22px 28px;
    max-width: 480px;
    margin: 32px auto 0 auto;
    box-shadow: 0 2px 12px #0001;
}
.product-details h2 {
    margin-bottom: 18px;
    color: var(--primary-color);
}
.product-details-name {
    font-size: 1.35em;
    font-weight: 600;
    margin-bottom: 18px;
    color: #234;
}
.product-characteristics {
    margin-bottom: 18px;
}
.product-characteristics ul {
    margin: 8px 0 0 0;
    padding-left: 18px;
}
.product-characteristics li {
    margin-bottom: 4px;
    font-size: 1em;
}
.product-template-info > div {
    margin-bottom: 6px;
    font-size: 1.04em;
}
.product-actions {
    margin-top: 18px;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    justify-content: flex-end;
}

.product-actions input[type="number"] {
    margin: 0;
}

/* Категории — крупный вертикальный список */
.main-category-list {
    list-style: none;
    padding: 0;
    margin: 40px auto 0 auto;
    max-width: 600px;
}
.main-category-item {
    font-size: 2em;
    font-weight: 600;
    padding: 24px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.main-category-item:hover {
    background: #f5f6fa;
}

/* Подкатегории — аккуратный список по центру */
.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 40px auto 0 auto;
    max-width: 500px;
    text-align: center;
}
.subcategory-item {
    font-size: 1.3em;
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.15s;
}
.subcategory-item:hover {
    background: #f5f6fa;
}

/* Список товаров — простой вертикальный список */
.product-list {
    list-style: none;
    padding: 0;
    margin: 40px auto 0 auto;
    max-width: 600px;
}

.product-card {
    font-size: 1.15em;
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    background: none;
    box-shadow: none;
    border-radius: 0;
    transition: background 0.15s;
    text-align: left;
    display: block;
}

.product-card:hover {
    background: #f5f6fa;
}

/* Карточка товара — просто текст */
.product-details-plain {
    margin: 40px auto 0 auto;
    max-width: 600px;
    font-size: 1.1em;
    background: none;
    box-shadow: none;
    padding: 0;
}
.product-details-name {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 18px;
}
.product-details-plain .product-actions {
    margin-top: 30px;
    text-align: left;
}

/* Кнопка "Назад" внизу */
.bottom-back {
    display: block;
    margin: 40px auto 0 auto;
    width: fit-content;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 18px 0 18px 0;
    font-size: 1.08em;
    color: #234;
    display: flex;
    align-items: center;
    gap: 0.3em;
    flex-wrap: wrap;
}
.breadcrumb-link {
    color: #234;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}
.breadcrumb-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* Сетки для категорий и товаров */
.category-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin: 30px 0;
}
.category-tile, .product-tile {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #0001;
    padding: 32px 18px;
    text-align: center;
    font-size: 1.15em;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.category-tile:hover, .product-tile:hover {
    box-shadow: 0 4px 16px #0002;
    transform: translateY(-4px) scale(1.03);
    background: #f5f8fa;
}

.catalog-home-btn {
    display: inline-block;
    margin: 18px 0 8px 0;
    padding: 8px 22px;
    font-size: 1em;
    background: #f5f8fa;
    border: 1px solid #c7d0db;
    border-radius: 8px;
    cursor: pointer;
    color: #234;
    font-weight: 500;
    transition: background 0.15s, box-shadow 0.15s;
}
.catalog-home-btn:hover {
    background: #e3eaf1;
    box-shadow: 0 2px 8px #0001;
}

.char-list {
    margin: 4px 0 4px 18px;
    padding: 0;
}
.char-list li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 2px;
    font-size: 1em;
}

/* Дополнительные стили для иконок преимуществ */
.advantage-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 12px;
    margin-bottom: 4px;
}

/* Стили для секции "О нас" */
.about-section ul {
    padding-left: 0;
    list-style: none;
}
.about-section li {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
}
.about-section li b {
    margin-right: 4px;
}

.advantages-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.advantages-list li {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 28px;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px #0001;
    padding: 28px 32px 22px 32px;
    margin-bottom: 28px;
}
.advantage-icon {
    width: 44px;
    height: 44px;
    margin-top: 4px;
    flex-shrink: 0;
}
.advantage-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.advantage-title {
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #234;
}
.advantage-desc {
    font-size: 1.04em;
    color: #222;
    line-height: 1.5;
}
@media (max-width: 700px) {
    .advantages-list li {
        grid-template-columns: 36px 1fr;
        padding: 16px 10px 14px 10px;
        gap: 12px;
    }
    .advantage-icon {
        width: 28px;
        height: 28px;
    }
}

.search-path {
    font-size: 0.85em;
    color: #888;
    margin-top: 6px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
}
.main-nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#search-input {
    flex: 1 1 300px;
    max-width: 350px;
    padding: 10px 16px;
    font-size: 1.1em;
    margin: 0;
}

/* Категории: плитки крупные, занимают всю ширину */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
    margin: 50px 0;
    width: 110%;
}

/* Плитка категории: крупная, с большой картинкой */
.category-tile {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    font-size: 1.5em;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    padding: 32px 16px;
    position: relative;
}

.category-tile:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    transform: translateY(-6px) scale(1.04);
}

.category-tile img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    margin-bottom: 32px;
    display: block;
    background: #f5f5f5;
    border-radius: 16px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
    /* Добавьте высоту для выравнивания */
    min-height: 48px;
}
#cart-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    margin-left: 20px;
    margin-bottom: 4px; /* Чуть выше */
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    display: flex;
    align-items: center;
    height: 44px; /* Сделать чуть выше */
    margin-top: -1px; /* Поднять на 2px */
}
#cart-btn:hover {
    background: #1256a0;
}

/* Модальные окна */
.modal {
    position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-content {
    background: #fff;
    padding: 32px 24px;
    border-radius: 16px;
    min-width: 340px;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.close-modal {
    position: absolute; right: 16px; top: 12px; font-size: 2em; cursor: pointer; color: #888;
}

#callback-form label {
    display: block;
    margin-bottom: 12px;
    width: 100%;
    font-size: 1em;
}
#callback-form input, #callback-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
    box-sizing: border-box;
}
#callback-form button {
    margin-top: 18px;
    width: 100%;
}
#callback-success {
    margin-top: 18px;
    color: #1976d2;
    font-size: 1.1em;
    text-align: center;
}

/* --- Стили для корзины --- */
.cart-section {
    max-width: 1200px;      /* Было 480px, стало шире */
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(44,62,80,0.10);
    padding: 40px 48px 36px 48px; /* Увеличен внутренний отступ */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-section h2 {
    font-size: 2.1em;
    font-weight: 700;
    margin-bottom: 28px;
    color: #234;
    text-align: center;
}

.cart-list {
    width: 100%;
    list-style: none;
    margin-bottom: 32px;
    padding: 0;
}

.cart-list li {
    font-size: 1.25em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    background: #f5f8fa;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px #0001;
}

.cart-item-name {
    flex: 1;
    font-weight: 500;
}

.cart-qty-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.3em;
    margin: 0 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.cart-qty-btn:hover {
    background: #1256a0;
}
.cart-qty {
    font-size: 1.2em;
    min-width: 32px;
    display: inline-block;
    text-align: center;
}

.cart-del-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 1em;
    margin-left: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.cart-del-btn:hover {
    background: #c0392b;
}

/* Форма заказа в корзине */
#order-form {
    width: 100%;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#order-form label {
    width: 100%;
    font-size: 1.08em;
    margin-bottom: 14px;
    text-align: left;
}
#order-form input, #order-form textarea {
    width: 100%;
    padding: 12px 12px;
    border-radius: 8px;
    border: 1px solid #b4bcc2;
    font-size: 1.08em;
    margin-top: 6px;
    margin-bottom: 2px;
    box-sizing: border-box;
    background: #f8fafc;
}
#order-form textarea {
    min-height: 60px;
    resize: vertical;
}
#order-submit-btn {
    width: 100%;
    margin-top: 18px;
    font-size: 1.15em;
    padding: 16px 0;
    border-radius: 10px;
}
#order-success {
    margin-top: 18px;
    color: #1976d2;
    font-size: 1.15em;
    text-align: center;
}

/* --- Стили для поля количества --- */
input[type="number"].cart-qty-input,
#product-qty-input {
    width: 120px;
    min-width: 100px;
    max-width: 160px;
    padding: 10px 8px;
    font-size: 1.18em;
    letter-spacing: 0.04em;
    border: 1.5px solid #b4bcc2;
    border-radius: 8px;
    background: #f8fafc;
    margin: 0 14px 0 18px;
    text-align: center;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    box-shadow: 0 1px 4px #0001;
}

input[type="number"].cart-qty-input:focus,
#product-qty-input:focus {
    border-color: #1976d2;
    box-shadow: 0 2px 8px #1976d222;
}

.cart-list li input[type="number"].cart-qty-input {
    margin-left: 18px;
    margin-right: 14px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    justify-content: flex-end;
}

.product-actions input[type="number"] {
    margin: 0;
}

@media (max-width: 700px) {
    input[type="number"].cart-qty-input,
    #product-qty-input {
        width: 50px;
        font-size: 1em;
        padding: 6px 6px;
    }
    .product-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}
