/**
 * Основные стили сайта
 * Sticky footer, breadcrumbs, общие элементы
 */

/* ============================================
   Sticky footer
   ============================================ */

html {
    position: relative;
    min-height: 100%;
}

body {
    padding-top: 70px;
    margin-bottom: 220px;
}

.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 230px;
    padding-top: 20px;
}

.footer a[href^='tel'] {
    font-size: 15px;
    font-weight: bold;
}

.footer .social {
    padding-left: 0;
    margin-bottom: 15px;
}

.footer .social li {
    list-style: none;
    display: inline-block;
    font-size: 25px;
    margin-right: 25px;
}

footer .payment-methods__payment_logo {
    width: 40px;
    height: auto;
    margin-left: 1em;
    margin-right: 1em;
}

footer .payment-methods__payment_logo:first-child {
    margin-left: 0;
}

footer .payment-methods__payment-text {
    padding-top: 10px;
}

/* ============================================
   Контейнер (переопределение Bootstrap)
   Используем !important только здесь для контейнера
   ============================================ */

@media (max-width: 1199px) {
    .container {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
    }
}

/* ============================================
   SEO блок
   ============================================ */

.seo-block {
    margin-top: 30px;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.breadcrumb > .active a {
    pointer-events: none;
    cursor: default;
    text-decoration: none;
    color: var(--color-text-muted);
}

/* ============================================
   Navbar collapse border
   ============================================ */

.navbar-collapse {
    border-color: var(--color-primary);
}

/* ============================================
   Таблицы
   ============================================ */

.table tbody > tr > td.vert-align {
    vertical-align: middle;
}

/* ============================================
   Изображения категорий
   ============================================ */

.category-image {
    vertical-align: middle;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    -o-object-fit: contain;
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.category-cell-image-wrapper {
    height: 200px;
    position: relative;
    overflow: hidden;
}

/* ============================================
   Типографика
   ============================================ */

.very-small {
    font-size: 70%;
}

/* Зачеркнутый текст с красной линией */
s,
strike {
    text-decoration: none;
    position: relative;
}

s::before,
strike::before {
    top: 50%;
    background: red;
    opacity: 0.7;
    content: '';
    width: 110%;
    position: absolute;
    height: 0.1em;
    border-radius: 0.1em;
    left: -5%;
    white-space: nowrap;
    display: block;
    -webkit-transform: rotate(-12deg);
    transform: rotate(-12deg);
}

s.straight::before,
strike.straight::before {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
    left: -1%;
    width: 102%;
}

/* ============================================
   Формы
   ============================================ */

.form-group {
    margin-bottom: 15px;
}

/* ============================================
   Popover для неизвестных цен
   ============================================ */

.popover-content {
    color: var(--color-text);
}

.popover {
    z-index: var(--z-popover);
    position: absolute;
}

/* Дополнительная защита для popover в карточках товаров */
.mosaic-product-card .popover,
.mosaic-product-price .popover,
.unknown-price-link + .popover,
[data-toggle="popover"].unknown-price-link ~ .popover {
    z-index: calc(var(--z-popover) + 1);
    position: absolute;
}

body .popover {
    z-index: calc(var(--z-popover) + 2);
}

/* Стили для неизвестной цены */
.unknown-price-link {
    color: #337ab7;
    text-decoration: none;
    border-bottom: 1px dashed #337ab7;
    cursor: help;
    display: inline-block;
    vertical-align: baseline;
    outline: none;
    white-space: nowrap;
}

.unknown-price-link:hover {
    color: #23527c;
    border-bottom-color: #23527c;
    text-decoration: none;
}

/* ============================================
   Cookie consent
   ============================================ */

#cookie-consent {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--color-border);
    padding: 15px 0;
}

@media (min-width: 768px) {
    #cookie-consent .consent-row {
        display: flex;
        align-items: center;
    }
}

#cookie-consent .consent-row .text-sm-right {
    margin-top: 10px;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    #cookie-consent .consent-row .text-sm-right {
        margin-top: 0;
    }
}

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

@media (max-width: 991px) {
    body {
        margin-bottom: 350px;
    }
}

@media (max-width: 767px) {
    .footer {
        position: relative;
        margin-bottom: 40px;
    }

    body {
        margin-bottom: 0;
    }
    
    .contacts a[href^=tel] {
        margin-top: 10px;
    }
}
