/* ============================================
   Основные стили для сайта Империал-ДВ
   ============================================ */

:root {
    --primary-blue: #0066cc;
    --primary-orange: #ff6600;
    --primary-red: #cc0000;
    --dark-grey: #333333;
    --light-grey: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
}

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

body {
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

/* Шрифт везде — Century Gothic */
h1, h2, h3, h4, h5, h6,
.site-title,
.promo-title,
.nav-menu-list a,
.category-name,
p, span, div, a,
.card-title, .card-text,
.product-detail-title, .product-plywood-heading, .product-plywood-char, .product-plywood-sales,
.breadcrumb, .product-properties, .product-description {
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

/* ============================================
   Шапка сайта
   ============================================ */

.site-header {
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.header-background-wrapper {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.header-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Новый баннер header_new.png — ссылка на главную по всей области */
@media (min-width: 769px) {
    .header-bg-new .header-content {
        position: relative;
    }
    .header-bg-new .header-content .logo-link {
        visibility: visible;
        pointer-events: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        text-align: center;
    }
}

.header-content {
    position: relative;
    z-index: 2;
}

/* Логотип и телефон по центру шапки */
/* Цвет заголовка и телефона в шапке */
.header-content .header-tagline,
.header-content .contact-phone {
    color: #000066;
}

.header-row-center .header-right-content {
    text-align: center;
}
.header-row-center .contact-info {
    text-align: center;
}
.header-row-center .contact-phone {
    margin-right: 0;
    justify-content: center;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s;
    cursor: pointer;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.logo-img {
    max-width: 250px;
    height: auto;
    max-height: 100px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-blue) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo-i {
    font-size: 36px;
    font-weight: bold;
    color: var(--white);
}

.header-right-content {
    text-align: right;
}

.header-tagline {
    font-size: 21px;
    color: var(--white);
    margin: 0;
    font-weight: 500;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

.contact-info {
    text-align: right;
}

.contact-phone {
    color: var(--white);
    text-decoration: none;
    font-size: 20px;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
    margin-right: 31px;
}

.contact-phone:last-child {
    margin-bottom: 0;
}

.contact-phone:hover {
    opacity: 0.8;
    text-decoration: none;
    color: var(--primary-orange);
}

.phone-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 8px;
}

/* Навигационное меню */
.main-nav-bar {
    background-color: var(--primary-orange);
    padding: 0;
}

.nav-menu-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav-menu-list li {
    flex: 1;
    width: 100%;
}
.form-row-inline .form-field-group .form-label{
    width: auto;
}
.menu-item-link {
    position: relative;
    display: block;
    width: 100%;
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 20px;
    transition: opacity 0.3s;
    font-weight: 500;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    text-align: center;
    background-image: url('../images/menu.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item-text {
    position: relative;
    z-index: 1;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

.menu-item-link:hover {
    opacity: 1;
    text-decoration: none;
    color: var(--white);
    background-color: #EF7F1A !important;
    background-image: none !important;
}

.btn-menu-mobile {
    background-color: var(--dark-grey);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    border-radius: 4px;
}

.btn-menu-mobile:hover {
    background-color: #444;
    color: var(--white);
}

.mobile-nav a {
    text-decoration: none;
    display: block;
    transition: color 0.3s;
    text-transform: uppercase;
}

.mobile-nav a:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

/* ============================================
   Промо-баннер с слайдером
   ============================================ */

.promo-banner {
    background-color: var(--white);
    position: relative;
}

.promo-banner .container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 768px) {
    .promo-banner .container {
        padding-left: 0;
        padding-right: 0;
    }
}

.promo-banner-slider {
    position: relative;
    overflow: hidden;
}

.promo-slider-container {
    position: relative;
    width: 100%;
}

.promo-slide {
    display: none;
    width: 100%;
}

.promo-slide.active {
    display: block;
}

/* Скрываем неактивные слайды явно */
.promo-slide:not(.active) {
    display: none !important;
}

.promo-banner-content {
    position: relative;
    width: 100%;
}

.promo-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.promo-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s;
    padding: 0;
}

.promo-slider-btn:hover {
    opacity: 0.8;
}

.promo-slider-btn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.promo-slider-prev {
    left: 20px;
}

.promo-slider-next {
    right: 20px;
}

.promo-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.promo-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-image-placeholder {
    width: 100%;
    min-height: 300px;
    background-color: var(--light-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Блок НОВИНКА */
.novelty-block {
    border: 2px solid #000;
    background-color: #fff;
    border-radius: 8px;
    padding: 5px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.novelty-header {
    margin-bottom: 5px;
}


    .novelty-label {
        margin: 0 auto;
        text-align: center;
        display: block;
        color: var(--primary-orange);
        padding: 8px 15px;
        border-radius: 4px;
        font-weight: bold;
        font-size: 18px;
        font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    }


.novelty-content {
    flex: 1;
}

.novelty-text {
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 0px;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

.novelty-list {
    list-style: none;
    padding: 0;
    margin: 0x 0;
}

.novelty-list li {
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 0px;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

/* ============================================
   Сетка категорий
   ============================================ */

.categories-section {
    padding: 10px 0;
}

.categories-section .container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 768px) {
    .categories-section .container {
        padding-left: 0;
        padding-right: 0;
    }
}

.category-card {
    display: block;
    text-decoration: none;
    height: 100%;
    transition: transform 0.3s;
}

.category-card:hover {
    text-decoration: none;
    transform: translateY(-5px);
}

.category-card-inner {
    background-color: transparent;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image-only {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================
   Футер
   ============================================ */

.site-footer {
    background-color: var(--light-grey);
    border-top: 1px solid #e0e0e0;
    color: var(--text-light);
}

/* ============================================
   Адаптивность
   ============================================ */

@media (max-width: 768px) {
    /* Убираем фон header.png на мобильной */
    .header-bg-image {
        display: none;
    }
    
    .header-background-wrapper {
        min-height: auto;
        background-color: var(--white);
    }
    
    /* Убираем отступы py-4 у promo-slide на мобильной */
    .promo-slide .row {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Логотип, название, телефоны по центру */
    .header-content .row {
        text-align: center;
    }
    
    /* Логотип в 2 раза меньше */
    .logo-img {
        max-height: 50px;
        width: auto;
    }
    .product-actions {
        text-align: center;
    }

    .header-right-content {
        text-align: center;
        margin-top: 0;
    }
    
    .header-tagline {
        font-size: 16px;
        margin-bottom: 10px;
        color: var(--text-dark);
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-phone {
        font-size: 16px;
        justify-content: center;
        margin-bottom: 8px;
        color: var(--text-dark);
    }
    
    .contact-phone:hover {
        color: var(--primary-orange);
    }
    
    /* Скрываем меню на мобильной */
    .main-nav-bar {
        display: none;
    }
    
    /* Бургер меню - тире синие */
    .btn-menu-mobile {
        background-color: transparent;
        color: #393185;
        border: none;
        padding: 10px 15px;
        font-size: 28px;
    }
    
    .btn-menu-mobile:hover {
        background-color: transparent;
        color: #393185;
    }
    
    .btn-menu-mobile i {
        color: #393185;
    }
    
    /* Мобильное меню в offcanvas */
    .offcanvas {
        background-color: #CCCCCC !important;
        width: 100% !important;
        height: fit-content;
    }
    
    .offcanvas-backdrop {
        background-color: transparent !important;
    }
    
    .offcanvas-header {
        background-color: #CCCCCC;
        padding: 15px;
        border-bottom: none;
        width: 100%;
    }
    
    .offcanvas-body {
        background-color: #CCCCCC;
        padding: 0;
        width: 100%;
        height: fit-content;
    }
    
    .mobile-nav {
        background-color: #CCCCCC;
        padding: 0;
        width: 100%;
    }
    
    .mobile-menu-list {
        margin: 0;
        padding: 0;
        list-style: none;
        width: 100%;
    }
    .col-12.d-md-none.text-end.mt-3 {
        position: absolute;
        width: max-content;
        right: 10px;
    }
    
    .mobile-menu-list li {
        margin-bottom: 10px;
        width: 100%; 
        
    }
    
    .mobile-menu-item {
        position: relative;
        display: block;
        width: 100%;
        color: var(--white);
        text-decoration: none;
        font-size: 15px;
        padding: 12px 20px;
        transition: opacity 0.3s;
        font-weight: 500;
        font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
        text-align: center;
        background-image: url('../images/menu.png');
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-item span {
        position: relative;
        z-index: 1;
        font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    }
    
    .mobile-menu-item:hover {
        opacity: 1;
        text-decoration: none;
        color: var(--white);
        background-color: #EF7F1A !important;
        background-image: none !important;
    }
    
    /* Кнопка закрытия в сером блоке */
    .offcanvas-header .btn-close {
        background-color: transparent;
        opacity: 1;
        filter: invert(1);
    }
    
    /* Убираем отступы у container для баннера и категорий */
    .promo-banner .container,
    .categories-section .container {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Скрываем блок новинка на мобильной */
    .novelty-block {
        display: none;
    }
    
    /* Категории без отступов на мобильной */
    .categories-section .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .categories-section .row > [class*='col-'] {
        padding-left: 0;
        padding-right: 0;
    }
    
    .category-card-inner {
        min-height: auto;
    }
    
    .category-image-only {
        width: 100%;
        height: auto;
        display: block;
    }
    
    .promo-title {
        font-size: 20px;
    }
    
    .promo-subtitle {
        font-size: 14px;
    }
    
    .promo-slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .promo-slider-btn img {
        width: 20px;
        height: 20px;
    }
    
    .promo-slider-prev {
        left: 10px;
    }
    
    .promo-slider-next {
        right: 10px;
    }
}

@media (max-width: 576px) {
    .promo-title {
        font-size: 20px;
    }
    
    .promo-subtitle {
        font-size: 14px;
    }
    
    .promo-product-item {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-price {
        margin-left: 0;
        margin-top: 5px;
    }

    
    .category-image {
        font-size: 40px;
        margin-bottom: 10px;
    }
    
    .category-name {
        font-size: 16px;
    }
}

/* ============================================
   Карточки товаров
   ============================================ */

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.product-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .card-title {
    color: #000;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

.product-card .card-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.product-price {
    font-size: 24px;
}

/* ============================================
   Каталог «Сетка» — белый фон, сетка 3x3
   ============================================ */

.category-mesh {
    padding: 0.5rem 0 2rem;
}

.mesh-grid {
    max-width: 100%;
}

.mesh-card-link {
    display: block;
    color: inherit;
}

.mesh-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.mesh-product-card {
    background: var(--white);
    border: 1px solid #000;
    text-align: center;
}

.mesh-card-title {
    color: #000;
    font-size: 11px;
    font-weight: normal;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    margin-bottom: 0;
    margin-top: 0.5rem;
    line-height: 1.3;
    text-align: left;
}

.mesh-image-wrapper {
    padding: 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    height: 220px;
}

.mesh-image-wrapper img {
    object-fit: contain;
    max-height: 200px;
    width: auto;
    margin: 0 auto;
}

.mesh-card-footer {
    padding-top: 0.75rem;
    padding-bottom: 0;
}

.mesh-brand {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.mesh-price {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.mesh-product-detail-photo {
    max-width: 320px;
}

.mesh-product-detail-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Страница товара
   ============================================ */

.product-detail-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

.product-image-placeholder {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-detail-info {
    padding: 20px;
}

.product-detail-title {
    font-size: 11px;
    font-weight: bold;
    color: #000;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}

/* Кнопка Прайс */
.btn-price-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: var(--white);
    min-width: 300px;
    min-height: 60px;
    transition: opacity 0.3s;
}

.btn-price-link:hover {
    text-decoration: none;
    color: var(--white);
    opacity: 0.9;
}

.btn-price-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 74px;
    object-fit: cover;
    z-index: 0;
}

.btn-price-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 74px
}

.btn-price-icon {
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    position: absolute;
    left: 3px;
    bottom: 3px;
}

.btn-price-text {
    font-size: 17px;
    font-weight: 600;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    white-space: nowrap;
    line-height: 1;
    margin-left: 60px;
}

.product-description h3,
.product-properties h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    color: var(--primary-blue);
}

.product-properties table {
    margin-top: 15px;
}

.product-properties table td {
    padding: 10px;
    vertical-align: top;
}

/* Макет страницы товара — Фанера (по макету) */
.product-plywood-layout .product-plywood-main-image {
    min-height: 320px;
    border: 1px solid #ddd;
}
.product-plywood-layout .product-plywood-main-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}
.product-plywood-info .product-plywood-heading {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
}
.product-plywood-info .product-plywood-char {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.35rem;
}
.product-plywood-info .product-plywood-secondary-image {
    max-width: 320px;
}
.product-plywood-info .product-plywood-secondary-image img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.product-plywood-info .product-plywood-sales {
    font-size: 1rem;
    color: #333;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* ============================================
   Дополнительные утилиты
   ============================================ */

.text-primary-blue {
    color: var(--primary-blue);
}

.text-primary-orange {
    color: var(--primary-orange);
}

.bg-primary-blue {
    background-color: var(--primary-blue);
}

.bg-primary-orange {
    background-color: var(--primary-orange);
}

/* ============================================
   Страница Контакты и Доставка — блок с картинками слева/справа
   ============================================ */
/* Меньше пустоты сверху на страницах Контакты и Доставка */
main:has(.contacts-block) {
    padding-top: 1rem;
}
main:has(.contacts-block) .breadcrumb {
    margin-bottom: 0.75rem;
}
main:has(.contacts-block) h1.mb-4 {
    margin-bottom: 1rem;
}

.contacts-block,
.delivery-block {
    padding: 0.25rem 0 2rem;
}

.contacts-block .contacts-greeting,
.contacts-block .contacts-text {
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.contacts-block .contacts-phone {
    text-decoration: none;
    color: #333;
    font-family: 'Century Gothic', 'CenturyGothic', AppleGothic, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.contacts-block .contacts-phone:hover {
    color: var(--primary-blue);
}

.contacts-phone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: #fff;
    margin-right: 12px;
    flex-shrink: 0;
}

.contacts-phone-number {
    white-space: nowrap;
}

.contacts-side-image {
    max-height: 420px;
    width: auto;
    object-fit: contain;
}

.contacts-image-left,
.contacts-image-right {
    max-width: 100%;
    width: auto;
}

@media (max-width: 768px) {
    .contacts-block .row {
        flex-direction: column;
    }
    .contacts-block .col-lg-6 {
        order: 0;
    }
    .contacts-block .col-lg-3:first-child {
        order: 1;
    }
    .contacts-block .col-lg-3:last-child {
        order: 2;
    }
}
