/* Базовые настройки страницы */
body {
    margin: 0;
    padding: 0;
    background-color: #0d0d0d;
    color: #e0e0e0;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

/* Фоновая картинка шапки с плавным переходом в черный цвет снизу */
.hero-header {
    width: 100%;
    min-height: 420px;
    background-image: linear-gradient(to bottom, rgba(13, 13, 13, 0.2) 0%, rgba(13, 13, 13, 0.7) 70%, #0d0d0d 100%), url('bglamelibl.webp');
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Главный контейнер сайта */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Стили заголовков */
h1 {
    color: #f39c12;
    font-size: 32px;
    margin-bottom: 15px;
}

h2, h3 {
    color: #f39c12;
    margin-top: 35px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

/* Ссылки */
a {
    color: #f39c12;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Карточка формы заявки */
.form-card {
    background: #171717;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Список товаров */
.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #282828;
}

.product-info strong {
    display: block;
    font-size: 18px;
    color: #ffffff;
}

.product-info span {
    font-size: 14px;
    color: #aaa;
}

/* Поля ввода */
.qty-input {
    width: 65px;
    padding: 8px;
    font-size: 16px;
    text-align: center;
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: #ddd;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input:focus, 
.form-group textarea:focus,
.qty-input:focus {
    border-color: #f39c12;
    outline: none;
}

/* Золотая кнопка */
.submit-btn {
    width: 100%;
    background-color: #d4ac0d;
    color: #000;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #f1c40f;
}

/* ==========================================
   1. ВЕРХНЯЯ ШАПКА-МЕНЮ (ТАБЛИЦА NAV-TABLE)
   ========================================== */
.top-navbar {
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid #222222;
    padding: 8px 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Таблица шапки */
.nav-table {
    width: 90% !important;
    margin: 0 auto !important;
    border-collapse: collapse;
}

.nav-table td {
    vertical-align: middle !important;
}

.nav-td-left {
    text-align: left;
    white-space: nowrap;
}

.nav-td-right {
    text-align: right;
    white-space: nowrap;
}

/* Принудительный цвет ссылок в шапке */
.top-navbar a,
.top-navbar a:visited {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.top-navbar a:hover {
    color: #f1c40f !important;
}

.top-navbar .nav-divider, 
.top-navbar .phone-divider {
    color: #555555 !important;
    font-size: 12px !important;
    margin: 0 4px !important;
}

/* ==========================================
   2. ТАБЛИЦА КАТЕГОРИЙ С КАРТИНКАМИ
   ========================================== */
.categories-table {
    width: 90% !important;
    max-width: 90% !important;
    margin: 20px auto !important;
    table-layout: fixed !important; /* Строго зажимает картинки в рамки 90% */
    border-collapse: separate !important;
    border-spacing: 15px !important; /* Отступы между карточками */
}

.categories-table td {
    width: 33.33% !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

.categories-table a {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.categories-table a:hover {
    transform: scale(1.03);
}

.categories-table img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 12px;
}

/* Адаптируемость категорий под мобильные экраны */
@media (max-width: 768px) {
    .categories-table, 
    .categories-table tbody, 
    .categories-table tr, 
    .categories-table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .categories-table td {
        margin-bottom: 15px;
    }
}

/* --- ПРИНУДИТЕЛЬНЫЙ ФИКС РАЗМЕРА ЛОГОТИПА --- */
.site-logo {
    /* Фиксируем высоту, ширина подстроится автоматически. 30px - 35px - оптимально для этой шапки */
    height: 35px !important; 
    width: auto !important;
    max-width: none !important; /* Убираем конфликты, если картинке запрещено быть больше контейнера */
    display: block;
    margin: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

/* Ячейка таблицы, где лежит логотип */
.nav-td-logo {
    width: 1% !important; /* Сжимаем ячейку вокруг картинки */
    padding-right: 20px !important; /* Отступ от логотипа до текста меню */
    vertical-align: middle !important;
}
/* --- СТИЛИ ПОДВАЛА (FOOTER TABLE) --- */
.footer-section {
    width: 100%;
    background-color: #111111;
    border-top: 1px solid #222222;
    padding: 20px 0;
    margin-top: 40px;
}

/* Таблица подвала */
.footer-table {
    width: 90% !important;
    margin: 0 auto !important;
    border-collapse: collapse;
}

.footer-td {
    vertical-align: middle;
    white-space: nowrap;
}

.footer-td-right {
    text-align: right;
}

/* Ссылки в подвале */
.footer-section a,
.footer-section a:visited {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #f1c40f !important;
}

.footer-divider {
    color: #444444;
    margin: 0 8px;
    font-size: 12px;
}

/* Мобильная адаптивность */
@media (max-width: 600px) {
    .footer-table,
    .footer-table tr,
    .footer-table td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .footer-td {
        margin-bottom: 10px;
    }
}
/* --- ОТСТУПЫ ТОЛЬКО ДЛЯ ВНУТРЕННИХ СТРАНИЦ --- */
.inner-page {
    padding-top: 10px !important; /* Подтягивает блок с текстом выше к картинке */
}

.inner-page .content-section > p:first-child {
    margin-top: 5px !important; /* Убирает верхний отступ первого абзаца */
}
/* Уменьшаем нижний отступ шапки только для внутренних страниц */
.hero-header.inner-header {
    padding-bottom: 20px !important; /* Убирает лишнее пространство снизу под заголовком */
}

/* Подтягиваем блок с текстом выше */
main.inner-page {
    padding-top: 10px !important;
    margin-top: 0 !important;
}

/* Убираем верхний отступ у первого параграфа */
main.inner-page .content-section > p:first-child {
    margin-top: 0 !important;
}
/* --- ПРИНУДИТЕЛЬНОЕ УМЕНЬШЕНИЕ ОТСТУПОВ НА ВНУТРЕННЕЙ СТРАНИЦЕ --- */
.hero-header.inner-header {
    padding-top: 40px !important;
    padding-bottom: 20px !important;
    min-height: auto !important;
}

.hero-header.inner-header h1 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

main.inner-page {
    padding-top: 15px !important;
    margin-top: 0 !important;
}

main.inner-page .content-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

main.inner-page .content-section > p:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- СТИЛИ ГАЛЕРЕИ КАРТИНОК 3х2 --- */
.gallery-table {
    width: 90% !important;
    margin: 30px auto !important;
    border-collapse: separate;
    border-spacing: 15px; /* Отступы между картинками */
}

.gallery-table td {
    width: 33.33%;
    text-align: center;
    vertical-align: middle;
}

.gallery-table img {
    width: 100%;
    height: 220px; /* Одинаковая высота для всех картинок */
    object-fit: cover; /* Картинка аккуратно заполняет блок без искажений */
    border-radius: 6px;
    border: 1px solid #333;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-table img:hover {
    transform: scale(1.03);
    border-color: #f39c12;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .gallery-table {
        width: 100% !important;
        border-spacing: 10px;
    }
    
    .gallery-table tr, 
    .gallery-table td {
        display: block !important;
        width: 100% !important;
    }
    
    .gallery-table td {
        margin-bottom: 10px;
    }
    
    .gallery-table img {
        height: auto;
        max-height: 250px;
    }
}

/* --- СТИЛИ ФОРМЫ ЗАКАЗА --- */
.order-form-section {
    background-color: #141414;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0 20px 0;
}

.order-form-section h2 {
    margin-top: 0;
    color: #f39c12;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 12px;
    color: #fff;
}

/* Сетка стандартных размеров */
.standard-sizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.size-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1f1f1f;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #2a2a2a;
}

.size-item input[type="number"] {
    width: 70px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #000;
    color: #fff;
    text-align: center;
}

/* Блок нестандартных размеров */
.custom-size-fieldset {
    border: 1px dashed #f39c12;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.custom-size-fieldset legend {
    color: #f39c12;
    font-weight: bold;
    padding: 0 10px;
}

.custom-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 14px;
    margin-bottom: 6px;
    color: #ccc;
}

.form-field input,
.form-field select,
.order-form textarea {
    padding: 10px;
    background-color: #000;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.readonly-input {
    background-color: #1a1a1a !important;
    color: #888 !important;
    cursor: not-allowed;
}

.contacts-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Кнопка отправки */
.submit-btn {
    width: 100%;
    background-color: #d4ac0d;
    color: #000;
    font-weight: bold;
    font-size: 16px;
    padding: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background-color: #f1c40f;
    transform: translateY(-1px);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .standard-sizes-grid,
    .custom-fields,
    .contacts-group {
        grid-template-columns: 1fr;
    }
}

/* --- СТИЛИ ДЛЯ ПОЛЕЙ ВВОДА ФОРМЫ (БЕЖЕВЫЙ ЦВЕТ И УВЕЛИЧЕННЫЙ РАЗМЕР) --- */
.order-form input[type="number"],
.order-form input[type="text"],
.order-form input[type="email"],
.order-form select,
.order-form textarea {
    background-color: #f5f0e6 !important; /* Мягкий бежевый фон */
    color: #222 !important;              /* Тёмный текст для высокой контрастности */
    border: 1px solid #d4c5b2 !important; /* Аккуратная рамка */
    border-radius: 6px !important;
    padding: 10px 14px !important;       /* Увеличенная область клика для пальцев */
    font-size: 16px !important;          /* Крупный шрифт (предотвращает автозум в iOS) */
    outline: none;
}

/* Отдельно увеличиваем ширину числовых полей ввода (количества и длины) */
.order-form input[type="number"] {
    width: 90px !important;
    text-align: center;
}

/* Цвет полей при фокусе/клике */
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
    border-color: #f39c12 !important;
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.5);
}

/* Стиль для заблокированного поля ширины */
.order-form input.readonly-input,
.order-form input[readonly] {
    background-color: #e2dacd !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* --- ФИРМЕННАЯ ОРАНЖЕВАЯ КНОПКА ФОРМЫ --- */
.order-form button[type="submit"],
.order-form .submit-btn {
    background-color: #f39c12 !important; /* Насыщенный оранжевый цвет бренда */
    color: #fff !important;               /* Белый чёткий текст */
    border: none !important;
    border-radius: 6px !important;
    padding: 14px 28px !important;        /* Увеличенная кнопка */
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

/* Эффект при наведении мышкой */
.order-form button[type="submit"]:hover,
.order-form .submit-btn:hover {
    background-color: #e67e22 !important; /* Чуть более тёмный оранжевый */
    transform: translateY(-2px) !important;
}
/* --- ВИДИМЫЕ ГРАНИЦЫ И СТИЛИ ДЛЯ ТАБЛИЦЫ ХАРАКТЕРИСТИК --- */
.specs-table {
    width: 100% !important;
    border-collapse: collapse !important; /* Объединяет границы ячеек в одну тонкую линию */
    margin: 25px 0 !important;
}

.specs-table th,
.specs-table td {
    border: 1px solid #444 !important;    /* Тёмно-серая граница вокруг каждой ячейки */
    padding: 12px 15px !important;        /* Внутренний отступ от текста до границ */
    text-align: left;
}

/* Оформление шапки таблицы */
.specs-table th {
    background-color: #1f1f1f !important;  /* Чуть более светлый фон для шапки */
    color: #f39c12 !important;             /* Оранжевый цвет заголовков */
    border-bottom: 2px solid #f39c12 !important; /* Выделение нижней границы шапки */
}

/* Чередование цвета строк для удобства чтения */
.specs-table tbody tr:nth-child(even) {
    background-color: #111 !important;
}

/* --- ЕДИНЫЙ СТИЛЬ ОРАНЖЕВЫХ КНОПОК ДЛЯ ВСЕХ ССЫЛОК И ФОРМ --- */
a.scroll-to-order-btn,
.scroll-to-order-btn {
    display: inline-block !important;
    background-color: #f39c12 !important; /* Яркий оранжевый фон */
    color: #ffffff !important;           /* Белый четкий текст */
    font-weight: bold !important;
    font-size: 16px !important;
    padding: 12px 28px !important;       /* Внутренние отступы (объем кнопки) */
    border-radius: 6px !important;        /* Закругление углов */
    text-decoration: none !important;     /* Убираем подчеркивание ссылки */
    text-align: center !important;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3) !important; /* Легкая светящаяся тень */
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

/* Эффект при наведении мышкой */
a.scroll-to-order-btn:hover,
.scroll-to-order-btn:hover {
    background-color: #e67e22 !important; /* Чуть темнее при наведении */
    color: #ffffff !important;
    transform: translateY(-2px) !important; /* Легкий подъем вверх */
}
/* --- ФИКС РАЗМЕРА КНОПКИ ОТПРАВКИ --- */
.order-form button.submit-btn,
.order-form button[type="submit"] {
    width: auto !important;             /* Убираем растягивание на всю ширину */
    min-width: 220px !important;        /* Фиксированная удобная ширина */
    display: inline-block !important;   /* Компактное отображение */
    padding: 12px 30px !important;
}