/* patriot-fix.css — правки вёрстки (2026-11). Подключён после responsive.css.
   Откат: убрать строку подключения в header.tpl или очистить этот файл. */

/* ===== Этап 1. Шапка ===== */
header .header {
    column-gap: 24px;
    align-items: center;
}
header .logo {
    align-self: center;
}
header .logo img {
    width: 100%;
    max-width: 260px;
    height: auto;
}
header .other_choice,
header .address {
    align-self: end;
}
header .phones .header-info a {
    white-space: nowrap;
}
header .search-block input {
    min-width: 0;
}

/* Иконки избранного/сравнения/корзины: счётчик всегда в углу иконки */
header .cart {
    align-items: center;
}
header .cart > div:first-child {
    gap: 18px;
}
header #wishlist-total,
header #compare-total {
    margin-right: 0;
}
header #cart {
    width: auto;
}
header .cart-btn {
    width: auto;
    max-width: none;
    margin-left: 18px;
    height: auto;
}
header #cart-total {
    top: -10px;
    right: -10px;
}

/* Компьютер (≥1200px): шапка в одну ровную линию по центру */
@media screen and (min-width: 1200px) {
    header {
        margin-top: 0;
        padding: 18px 0;
    }
    header .header {
        grid-template-columns: 240px 265px minmax(0, 1fr) auto auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "logo city search phones cart"
            "logo address search phones cart";
        column-gap: 28px;
        row-gap: 6px;
        align-items: center;
    }
    header .other_choice,
    header .address,
    header .phones {
        margin-bottom: 0;
    }
    header .other_choice {
        align-self: end;
    }
    header .address {
        align-self: start;
        font-size: 14px;
        line-height: 1.35;
    }
    header .address a span:first-child {
        display: none;
    }
    header .search,
    header .phones,
    header .cart,
    header .logo {
        align-self: center;
    }
    header .phones {
        gap: 2px;
    }
    header .phones .header-info a {
        font-size: 18px;
        line-height: 1.3;
    }
    header .phones .header-info:last-child a {
        font-size: 14px;
    }
}

/* Меню: пункты не переносятся на две строки */
#topnav .mob_menu a {
    white-space: nowrap;
}
#topnav .main-menu {
    align-items: stretch;
}
#topnav .dropdown-category {
    white-space: nowrap;
}

@media screen and (max-width: 1199px) {
    #topnav .dropdown-category {
        min-width: 170px;
        margin-right: 8px;
        font-size: 15px;
    }
    #topnav .mob_menu a {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 15px;
    }
}

@media screen and (max-width: 1100px) {
    #topnav .dropdown-category {
        min-width: 150px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }
    #topnav .mob_menu a {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 14px;
    }
    #topnav a.price img {
        display: none;
    }
}

@media screen and (max-width: 1024px) {
    header {
        margin-top: 15px;
    }
    header .header {
        grid-template-columns: 220px 1fr 1.6fr auto;
        grid-template-rows: auto auto;
        column-gap: 16px;
    }
    header .phones .header-info a {
        font-size: 17px;
    }
    header .phones .header-info:last-child a {
        font-size: 14px;
    }
}

/* Бургер-меню (≤965px): выпадающий список на всю ширину, пункты читаемые */
@media screen and (max-width: 965px) {
    #topnav .mob_menu {
        left: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    }
    #topnav .mob_menu a {
        font-size: 16px;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }
}

/* Планшет: логотип целиком, без подмены на значок */
@media screen and (max-width: 805px) {
    header .header {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "logo phones"
            "city address"
            "search cart";
        row-gap: 10px;
    }
    header .logo img {
        display: block;
        max-width: 220px;
    }
    header .logo a:after {
        content: none;
        display: none;
    }
    header .address {
        justify-content: flex-end;
        text-align: right;
    }
    header .other_choice,
    header .address,
    header .phones {
        margin-bottom: 0;
    }
}

/* Телефон: компактная шапка */
@media screen and (max-width: 600px) {
    header {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    header .header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo phones"
            "city phones"
            "search cart";
        column-gap: 12px;
        row-gap: 8px;
    }
    header .address {
        display: none;
    }
    header .logo img {
        max-width: 160px;
    }
    header .city,
    header .city span {
        font-size: 13px;
    }
    header .phones {
        gap: 1px;
        align-self: start;
    }
    header .phones .header-info a {
        font-size: 15px;
        line-height: 1.35;
    }
    header .phones .header-info:last-child a {
        font-size: 13px;
    }
    header .search {
        padding-right: 0;
    }
    header .search-block input {
        padding: 9px 12px;
        font-size: 14px;
        height: auto;
    }
    header .search-block button {
        padding: 8px 10px;
    }
    header .cart {
        padding-right: 10px;
    }
    header .cart > div:first-child {
        gap: 14px;
    }
    header .cart-btn {
        margin-left: 14px;
    }
    header .header-icon {
        padding: 0;
    }
    #topnav .dropdown-category {
        padding: 14px 15px;
        font-size: 15px;
    }
    #topnav .container .main-menu .icon {
        padding: 14px 18px;
    }
}

@media screen and (max-width: 360px) {
    header .logo img {
        max-width: 130px;
    }
    header .phones .header-info a {
        font-size: 14px;
    }
}

/* ===== Этап 2. Карточка товара ===== */
/* Компьютер: колонка с ценой и таблицей размеров шире, фото уже */
@media screen and (min-width: 992px) {
    .row.product-page > .col-sm-7 {
        width: 45%;
    }
    .row.product-page > .col-sm-5 {
        width: 55%;
    }
    #product .owq-option table tbody td:first-child {
        white-space: nowrap;
    }
}
/* Блок отзывов и похожих товаров всегда под фото и описанием */
.row.product-page > .review-product,
.row.product-page > .clearfix {
    clear: both;
}
.product-heading {
    line-height: 1.25;
    margin-bottom: 12px;
}
/* «Минимальное кол-во» — обычная плашка в карточке, а не всплывающее окно поверх сайта */
#product .alert {
    position: static !important;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    max-width: none;
    width: auto;
    z-index: auto !important;
    margin: 10px 0;
    padding: 10px 14px;
    background: #eef9fc;
    border: 0;
    border-left: 3px solid var(--main-color);
    border-radius: 4px;
    box-shadow: none;
    font-size: 14px;
    line-height: 1.4;
    color: #1d3c46;
}
p.attention {
    line-height: 1.4;
}
/* Описание: читаемый текст без «дыр» между словами */
.product-description,
.product-description p {
    font-size: 15px;
    line-height: 1.6;
    color: #2b2b2b;
    text-align: left !important;
}
.product-description p {
    margin: 0 0 10px;
}
.product-description.specifications p,
.product-description.specifications div {
    color: #2b2b2b;
    font-size: 15px;
    line-height: 1.6;
}
/* Кнопка «наверх» на телефоне меньше, чтобы не закрывать кнопки «+» в таблице */
@media screen and (max-width: 767px) {
    .backtotop {
        width: 40px;
        height: 40px;
        right: 8px;
        bottom: 12px;
        font-size: 22px;
        padding: 6px;
        opacity: .85;
    }
}
/* Таблица размеров */
#product .owq-option table td {
    padding: 7px 8px;
    vertical-align: middle;
}
#product .owq-option table thead td {
    font-size: 13px;
    line-height: 1.3;
    padding-bottom: 8px;
}
#product .owq-option table tbody td:first-child {
    line-height: 1.3;
}
#product .form-group {
    margin-bottom: 0;
}
#button-cart {
    font-size: 15px;
    padding: 12px 34px;
}

@media screen and (max-width: 767px) {
    .product-heading {
        font-size: 21px;
    }
    #product .owq-option table td {
        padding: 6px 4px;
        font-size: 14px;
    }
    #product .owq-option table thead td {
        font-size: 12px;
    }
    .col-quantity .owq-input {
        margin: 0 4px;
        max-width: 38px;
        padding: 4px 2px;
    }
    .col-quantity .owq-sub,
    .col-quantity .owq-add {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
    #product .form-group[style] {
        text-align: center !important;
    }
    #button-cart {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Телефон: убираем тройные боковые поля (контейнер + колонка + вложенная колонка) */
@media screen and (max-width: 425px) {
    #content .row > [class*="col-"],
    .container > .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ===== Этап 3. Текст в разделах (Доставка, Оплата, Условия…) и статьях ===== */
#content.information,
#content .text.html {
    font-size: 16px;
    line-height: 1.6;
    color: #2b2b2b;
}
#content.information p,
#content.information li,
#content .text.html p,
#content .text.html li {
    font-size: 16px;
    line-height: 1.6;
}
#content.information p,
#content .text.html p {
    margin: 0 0 12px;
}
#content .text.html p:empty {
    display: none;
}
#content.information h1,
#content .category-name {
    line-height: 1.25;
    margin-bottom: 20px;
}
#content.information h2,
#content.information h3,
#content.information .h2,
#content.information .h3,
#content .text.html h2,
#content .text.html h3,
#content .text.html h4 {
    line-height: 1.3;
    margin: 30px 0 12px;
}
#content.information h1 + .h2,
#content.information h1 + h2 {
    margin-top: 0;
}
#content.information ul,
#content.information ol,
#content .text.html ul,
#content .text.html ol {
    margin: 0 0 16px;
    padding-left: 24px;
}
#content.information li,
#content .text.html li {
    margin-bottom: 6px;
    padding-left: 2px;
}
#content.information [style*="justify"],
#content .text.html [style*="justify"] {
    text-align: left !important;
}
#content.information table,
#content .text.html table {
    max-width: 100%;
}
#content.information img,
#content .text.html img {
    max-width: 100%;
    height: auto;
}
@media screen and (max-width: 767px) {
    #content.information,
    #content.information p,
    #content.information li,
    #content .text.html,
    #content .text.html p,
    #content .text.html li {
        font-size: 15px;
    }
    #content.information table,
    #content .text.html table {
        display: block;
        overflow-x: auto;
    }
}
/* ===== Этап 4. Хлебные крошки, главная, мобильный каталог ===== */
.breadcrumb {
    padding-left: 0;
    padding-right: 0;
    line-height: 1.5;
}
.bottom-h1,
.common-home h1 {
    white-space: normal;
    overflow-wrap: break-word;
    width: auto !important;
    max-width: 100%;
}
.bottom-h1 {
    font-size: clamp(22px, 3.4vw, 33px);
    line-height: 1.25;
}
/* Каталог на телефоне: 2 товара в ряд, карточки одной высоты */
@media screen and (max-width: 767px) {
    #content .row:has(> .product-layout) {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-left: 0;
        margin-right: 0;
    }
    #content .row:has(> .product-layout)::before,
    #content .row:has(> .product-layout)::after {
        display: none;
    }
    #content .row > .product-layout {
        width: calc(50% - 5px);
        float: none;
        padding: 0;
        margin-bottom: 0;
        display: flex;
    }
    #content .row > .product-layout > .product-thumb {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    #content .row > .product-layout .name-product {
        flex-grow: 1;
    }
    #content .row > .product-layout .name-product a {
        font-size: 14px;
        line-height: 1.3;
    }
    #content .product-layout .product-thumb .btns {
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 6px 8px;
    }
    #content .product-layout .product-thumb .btns .product_more {
        width: 100%;
        padding: 11px 6px;
        font-size: 12px;
        text-align: center;
        white-space: nowrap;
    }
    #content .product-layout .product-thumb .btns > div {
        width: 100%;
        gap: 6px;
    }
    #content .product-layout .product-thumb .btns > div button {
        flex: 1;
        height: 34px;
    }
}
