/* Бургер-меню */
.d-flex{
    display: flex;
}
.wrapper-menu.d-flex{
    align-items: center;
}
.burger-menu {
    display: block;
    background: transparent;
    border: none;
    padding: 10px;
    margin: 0;
    cursor: pointer;
    outline: none;
    transition: opacity 0.2s;
}

.burger-menu:hover {
    opacity: 0.7;
}

/* Иконка бургера */
.burger-icon {
    display: inline-block;
    width: 25px;
    height: 20px;
    position: relative;
}

.burger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.burger-line:nth-child(1) {
    top: 0;
}

.burger-line:nth-child(2) {
    top: 8px;
}

.burger-line:nth-child(3) {
    top: 16px;
}

/* Анимация: бургер → крестик */
.burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    top:1px;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    top:15px;
}
.wrapper-text-near-the-logo a{
    text-decoration: none;
}
#logo{
    z-index: 2;
}
.wrapper-text-near-the-logo{
    margin-left: 20px;
}
#navbar-wrap.collapse{
    display: block;
}
.container_cart_plus_phone{
    align-items: center;
    justify-content: flex-end;
}
.container_cart_plus_phone .glyphicon.glyphicon-earphone.hidden-md.hidden-lg.hidden-xl:before{
    font-size: 35px;
    margin-right: 20px;
    margin-top: 5px;
}
.container_cart_plus_phone .phoneLink{
    margin-top: 10px;
}
#contacts-mobile{
    font-size: 22px;
    line-height: 1;
}
@media (max-width: 1199px) {
    #header .container{
        width: 100%;
    }
}
@media (max-width: 992px) {
    #navbar-wrap{
        position: absolute;
        width: 100%;
        z-index: 100;
    }
    #navbar-wrap.collapse{
        display: none;
    }
    #navbar-wrap.collapse.in{
        display: block;
    }
    #logo .wrapper-menu img{
        margin-left: 20px;
        width: 60px;
        height: 60px;
    }
    #logo p{
        top:0px;
    }
    #cart-box{
        margin-top: 22px;
    }
    .wrapper-text-near-the-logo{
        font-size: 18px;
    }
    #header.container-fluid > .container {
        width: 100%;
    }
    #header.container-fluid{
        padding: 0px;
    }
    .navbar-toggle{
        display: block;
    }
    #header .wrapper-text-near-the-logo p{
        margin-left:0px;
    }
    #navbar-wrap .container{
        width: 100%;
        padding: 0px;
    }
}
@media (max-width: 768px) {
    .caret {
        width: 40px!important;
        height: 40px!important;
        position: relative;
        margin-left: 0!important;
        margin-top: -15px!important;
        border: none!important;;
        cursor: pointer;
        display: inline-block;
        vertical-align: middle;
    }

    .caret::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-top: 6px dashed;
        border-right: 6px solid transparent;
        border-left: 6px solid transparent;
        margin-top: 8px;
    }
    .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover{
        color: black;
    }
    .navbar-nav{
        margin-top:0px;
    }
    .navbar-nav .open .dropdown-menu{
        padding: 0px;
    }
    .navbar-nav .open .dropdown-menu>li>a{
        padding: 10px;
    }
    .navbar-nav .dropdown.open > a{
        background: #0c469b!important;
    }
    .navbar-inverse-blue .navbar-nav > .active > a, .navbar-inverse-blue .navbar-nav > .active > a:focus, .navbar-inverse-blue .navbar-nav > .active > a:hover{
        background: none;
    }
    .navbar-nav .open .dropdown-menu{
        background: white;
    }
    .wrapper-text-near-the-logo{
        max-width: 180px;
        line-height: 1;
    }
    .wrapper-text-near-the-logo a{
        font-size: 14px;
        font-weight: normal;
        text-transform: none;
        text-align: left;
    }
    .navbar.navbar-inverse.navbar-inverse-blue a{
        display: flex;
        width: 100%;
        justify-content: space-between;
    }
    .caret {
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: 2px;
        margin-top: 8px;
        vertical-align: middle;
        border-top: 6px dashed;
        border-right: 6px solid transparent;
        border-left: 6px solid transparent;
    }
}
@media (max-width: 650px) {
    #header #logo{
        width: 50%;
    }
    #header .container_cart_plus_phone{
        width: 50%;
    }
    .wrapper-text-near-the-logo{
        display: none;
    }
}
@media (max-width: 430px) {
    .cart-box-caption{
        font-size: 12px;
    }
}
@media (max-width: 388px) {
    .cart-box-icon.glyphicon.glyphicon-shopping-cart{
        display: none;
    }
}

/* ============================================
   SIMILAR PRODUCTS SECTION (SLIDER)
   ============================================ */
.sim-section {
    padding: 40px 0;
    margin-top: 30px;
    border-top: 1px solid #e5e5e5;
}

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

.sim-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 30px;
    padding: 0;
}

/* Слайдер */
.sim-slider {
    padding: 10px 0 30px;
    position: relative;
}

.sim-slider .owl-item {
    padding: 0 10px;
}

/* Карточка */
.sim-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sim-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* Изображение */
.sim-card__image-wrapper {
    display: block;
    padding: 0;
    background: #f8f9fa;
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 220px;
}

.sim-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sim-card:hover .sim-card__image {
    transform: scale(1.05);
}

/* Контент */
.sim-card__content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sim-card__title {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 10px;
    font-weight: 600;
    min-height: 40px;
}

.sim-card__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.sim-card__title a:hover {
    color: #007bff;
}

.sim-card__desc {
    font-size: 12px;
    line-height: 1.5;
    color: #6c757d;
    margin: 0 0 12px;
}

.sim-card__price {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
    margin: 0 0 15px;
}

.sim-card__price--ask {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Кнопка */
.sim-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
    width: 100%;
}

.sim-btn--primary {
    background: #007bff;
    color: #fff;
}

.sim-btn--primary:hover {
    background: #0056b3;
    color: #fff;
}

.sim-btn__icon {
    margin-right: 5px;
}

.sim-btn--success {
    background: #28a745;
    color: #fff;
}

/* ============================================
   СТРЕЛКИ СЛАЙДЕРА (ПО БОКАМ)
   ============================================ */
.sim-slider .owl-nav {
    position: absolute;
    top: calc(50% - 60px);
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none; /* Чтобы контейнер не перекрывал клики */
}

.sim-slider .owl-nav button {
    position: relative;
    pointer-events: auto; /* Возвращаем клики кнопкам */
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 20px !important;
    color: #333 !important;
    margin: 0 !important;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.sim-slider .owl-nav button:hover {
    background: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Левая стрелка */
.sim-slider .owl-nav .owl-prev {
    position: absolute;
    left: -50px;
}

/* Правая стрелка */
.sim-slider .owl-nav .owl-next {
    position: absolute;
    right: -50px;
}

/* Точки (пагинация) */
.sim-slider .owl-dots {
    margin-top: 15px !important;
    text-align: center;
}

.sim-slider .owl-dot {
    display: inline-block;
}

.sim-slider .owl-dot span {
    background: #ddd !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 5px !important;
    border-radius: 50% !important;
    transition: all 0.2s;
}

.sim-slider .owl-dot.active span {
    background: #007bff !important;
    width: 12px !important;
    height: 12px !important;
}

/* Обрезка заголовка до 2 строк */
.sim-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em; /* 2 строки * line-height */
    margin-bottom: 0.5rem;
}

.sim-card__title a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Обрезка описания до 2 строк */
.sim-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    max-height: 2.8em;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшеты - стрелки ближе */
@media (max-width: 991px) {
    .sim-slider .owl-nav .owl-prev {
        left: -35px;
        display: none!important;
    }
    .sim-slider .owl-nav .owl-next {
        right: -35px;
        display: none!important;
    }
    .sim-slider .owl-nav button {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
        line-height: 35px !important;
    }
}

/* Мобильные - стрелки внутри слайдера */
@media (max-width: 767px) {
    .sim-slider .owl-nav .owl-prev {
        left: 10px;
    }
    .sim-slider .owl-nav .owl-next {
        right: 10px;
    }
    .sim-slider .owl-nav {
        top: 45%;
    }
    .sim-slider .owl-nav button {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
        line-height: 32px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }
    .sim-card__image-wrapper {
        height: 180px;
    }
    .sim-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Маленькие мобильные - скрываем стрелки, оставляем точки */
@media (max-width: 480px) {
    .sim-slider .owl-nav {
        display: none;
    }
    .sim-card__image-wrapper {
        height: 200px;
    }
    .sim-section {
        padding: 30px 0;
        margin-top: 20px;
    }
}