/* BRODIGONI: страницы «Избранное» (account/wishlist) и «Сравнение товаров» (product/compare).
   Подключается из шаблонов account/wishlist.tpl и product/compare.tpl (header.tpl не затрагивается).
   Заголовки H1/H2 оформляет bg-design.css, здесь они не стилизуются.
   Палитра: коричневый #52362A/#3B2213, оранжевый #FE8D0B, светло-оранжевый #FFC583,
   кремовый #FFF4E6/#FBF4E7, рамки #F0DFC8. */

/* ---------- Кнопки ---------- */
.bgBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    font: bold 14px/1.2 Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.bgBtn svg { flex: 0 0 auto; }
.bgBtn--primary {
    background: #FE8D0B;
    border-color: #FE8D0B;
    color: #3B2213;
}
.bgBtn--primary:hover {
    background: #FFC583;
    border-color: #FFC583;
    color: #3B2213;
    text-decoration: none;
}
.bgBtn--ghost {
    background: transparent;
    border-color: #52362A;
    color: #52362A;
}
.bgBtn--ghost:hover {
    background: #FFF4E6;
    border-color: #FE8D0B;
    color: #9B3A00;
    text-decoration: none;
}
.bgBtn:focus-visible,
.bgWishRemove:focus-visible {
    outline: 2px solid #FE8D0B;
    outline-offset: 2px;
}

/* ---------- Сообщение об удалении ---------- */
.bgWish .alert,
.bgCmpPage .alert {
    max-width: 1024px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 1px solid #F0DFC8;
    border-radius: 8px;
    background: #FFF4E6;
    color: #52362A;
    font-size: 15px;
    text-align: left;
}
.bgWish .alert .fa,
.bgCmpPage .alert .fa {
    margin-right: 8px;
    color: #FE8D0B;
}
.bgCmpPage .alert a { color: #9B3A00; text-decoration: underline; }

/* ---------- Пустой список ---------- */
.bgEmpty {
    box-sizing: border-box;
    max-width: 520px;
    margin: 10px auto 40px;
    padding: 36px 24px;
    border: 1px solid #F0DFC8;
    border-radius: 12px;
    background: #fff;
    color: #52362A;
    text-align: center;
}
.bgEmpty__ico {
    display: block;
    margin: 0 auto 12px;
    color: #FE8D0B;
}
.bgEmpty__title {
    margin: 0 0 8px;
    color: #3B2213;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.3;
}
.bgEmpty__text {
    margin: 0 0 22px;
    color: #6B5648;
    font-size: 15px;
    line-height: 1.5;
}
.bgEmpty .bgBtn { min-width: 160px; }

/* ---------- Избранное: кнопка «Удалить» в карточке ---------- */
.bgWish .productListCart { min-height: 430px; }
.bgWish .productListCart .productListCartIn a.bgWishRemove {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    margin: 12px 0 0;
    padding: 6px 12px;
    border: 2px solid #52362A;
    border-radius: 8px;
    background: transparent;
    color: #52362A;
    font: bold 14px/1.2 Arial, Helvetica, sans-serif;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}
.bgWish .productListCart .productListCartIn a.bgWishRemove:hover {
    border-color: #FE8D0B;
    background: #FFF4E6;
    color: #9B3A00;
    text-decoration: none;
}
.bgWish .bgWishRemove__ico { flex: 0 0 auto; }

/* ---------- Сравнение: таблица ---------- */
.bgCmpScroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0 0 30px;
    border: 1px solid #F0DFC8;
    border-radius: 10px;
    background: #fff;
}
.bgCmpPage table.bgCmp {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
    color: #3B2213;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
}
.bgCmp--n1 { min-width: 375px; }
.bgCmp--n2 { min-width: 590px; }
.bgCmp--n3 { min-width: 805px; }
.bgCmp--n4 { min-width: 1020px; }
.bgCmp__colLabel { width: 160px; }

.bgCmpPage .bgCmp th,
.bgCmpPage .bgCmp td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #F0DFC8;
    border-right: 1px solid #F0DFC8;
    background: #fff;
    vertical-align: top;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.bgCmpPage .bgCmp td:last-child { border-right: 0; }
.bgCmpPage .bgCmp tr:last-child th,
.bgCmpPage .bgCmp tr:last-child td { border-bottom: 0; }

/* закреплённая колонка названий характеристик */
.bgCmpPage .bgCmp th.bgCmp__label {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #FFF4E6;
    border-right: 2px solid #F0DFC8;
    box-shadow: 3px 0 5px -3px rgba(59, 34, 19, .18);
    color: #52362A;
    font-size: 14px;
    font-weight: bold;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* чередование строк */
.bgCmpPage .bgCmp tr.bgCmp__row--alt td { background: #FBF4E7; }
.bgCmpPage .bgCmp tr.bgCmp__row--alt th.bgCmp__label { background: #F6E8D1; }

/* заголовки групп */
.bgCmpPage .bgCmp tr.bgCmp__group th {
    padding: 0;
    border-right: 0;
    border-bottom: 0;
    background: #52362A;
    color: #FFF4E6;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.bgCmp__group th span {
    position: sticky;
    left: 0;
    display: inline-block;
    padding: 10px 14px;
}

/* шапка товаров: фото, название, цена, кнопки */
.bgCmpPage .bgCmp tr.bgCmp__top td,
.bgCmpPage .bgCmp tr.bgCmp__top th { border-bottom: 0; }
.bgCmpPage .bgCmp tr.bgCmp__top.bgCmp__actions td,
.bgCmpPage .bgCmp tr.bgCmp__top.bgCmp__actions th { border-bottom: 1px solid #F0DFC8; }
.bgCmpPage .bgCmp td.bgCmp__photo { text-align: center; }
.bgCmp__photo a { display: block; }
.bgCmpPage .bgCmp .bgCmp__photo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: none;
}
.bgCmpPage .bgCmp .bgCmp__name a {
    color: #52362A;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
}
.bgCmpPage .bgCmp .bgCmp__name a strong { font-weight: bold; }
.bgCmpPage .bgCmp .bgCmp__name a:hover { color: #FE8D0B; text-decoration: underline; }
.bgCmpPage .bgCmp td.bgCmp__price {
    color: #9B3A00;
    font-size: 18px;
    font-weight: bold;
}
.bgCmp__old {
    display: block;
    color: #8A7466;
    font-size: 14px;
    font-weight: normal;
}
/* перебиваем .tablecompare a {color:#FE8D0B} из main.css */
.bgCmpPage .bgCmp a.bgBtn--primary,
.bgCmpPage .bgCmp a.bgBtn--primary:hover { color: #3B2213; text-decoration: none; }
.bgCmpPage .bgCmp a.bgBtn--ghost { color: #52362A; text-decoration: none; }
.bgCmpPage .bgCmp a.bgBtn--ghost:hover { color: #9B3A00; text-decoration: none; }
.bgCmp__actions .bgBtn {
    display: flex;
    width: 100%;
    margin: 0 0 8px;
}
.bgCmp__actions .bgBtn:last-child { margin-bottom: 0; }
.bgCmp .rating .fa { color: #FE8D0B; }

/* ---------- Телефон (320-767) ---------- */
@media (max-width: 767px) {
    .bgCmp--n1 { min-width: 308px; }
    .bgCmp--n2 { min-width: 498px; }
    .bgCmp--n3 { min-width: 688px; }
    .bgCmp--n4 { min-width: 878px; }
    .bgCmp__colLabel { width: 118px; }
    .bgCmpPage .bgCmp th,
    .bgCmpPage .bgCmp td { padding: 10px; }
    .bgCmpPage table.bgCmp { font-size: 14px; }
    .bgCmpPage .bgCmp th.bgCmp__label {
        padding: 10px 8px;
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
    .bgCmp__group th span { padding: 10px; }
    .bgCmpPage .bgCmp td.bgCmp__price { font-size: 16px; }
    .bgBtn { min-height: 44px; }
    .bgWish .productListCart .productListCartIn a.bgWishRemove { min-height: 44px; }
    .bgEmpty { margin: 6px 12px 30px; padding: 28px 16px; }
}

/* ---------- Планшет (768-991) ---------- */
@media (min-width: 768px) and (max-width: 991px) {
    .bgCmpPage .bgCmp th,
    .bgCmpPage .bgCmp td { padding: 10px 12px; }
}
