/* ==========================================================================
   Избранное и сравнение
   ========================================================================== */

/* ---------- кнопки ---------- */
.fc-buttons {
    display: flex;
    gap: 6px;
}

.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    border: 1px solid #E1E6F0;
    background: #fff;
    color: #94A4B4;
    cursor: pointer;
    transition: color .15s, border-color .15s, background-color .15s, transform .15s;
    font: inherit;
}

.fc-btn:hover {
    color: #0C7EE4;
    border-color: #0C7EE4;
}

.fc-btn__icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fc-btn--favorites.is-active {
    color: #E40000;
    border-color: #FFD2D2;
}

.fc-btn--favorites.is-active .fc-btn__icon {
    fill: currentColor;
}

.fc-btn--compare.is-active {
    color: #fff;
    background: #0C7EE4;
    border-color: #0C7EE4;
}

.fc-btn.fc-pulse {
    transform: scale(1.15);
}

/* в карточке каталога — в правом верхнем углу */
.product-box > .fc-buttons--card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    flex-direction: column;
}

.fc-buttons--card .fc-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(18, 38, 63, .08);
}

/* на детальной странице — кнопки с подписями */
.fc-buttons--detail {
    margin-top: 12px;
    flex-wrap: wrap;
}

.fc-buttons--detail .fc-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4A5A6A;
}

.fc-buttons--detail .fc-btn:hover {
    color: #0C7EE4;
}

.fc-buttons--detail .fc-btn--favorites.is-active {
    color: #E40000;
}

.fc-buttons--detail .fc-btn--compare.is-active {
    color: #fff;
}

/* ---------- шапка ---------- */
/* блок иконок + корзина занимают тот же слот справа от меню, что раньше занимала одна корзина */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    margin-left: auto;
    padding-top: 15px;
}

/* «липкая» шапка при прокрутке: меню скрыто, иконки и корзина встают в верхний ряд.
   Запрещаем перенос строки, чтобы блок всегда оставался справа, а место отдаёт поле поиска. */
.sticky .header__top {
    flex-wrap: nowrap;
}

.sticky .header__top .search {
    min-width: 150px;
}

.sticky .header-actions {
    flex-shrink: 0;
    gap: 18px;
    margin-left: 20px;
    padding-top: 0;
    padding-left: 20px;
    border-left: 1px solid #E5EAF2;
    align-self: center;
}

@media (max-width: 1250px) {
    .sticky .header__schedule {
        display: none;
    }
}

.header-actions #top-basket {
    width: auto;
    margin-left: 0;
    padding-top: 0;
}

.header-fc {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-fc__item {
    position: relative;
    display: flex;
    align-items: center;
    color: #12263F;
    text-decoration: none;
}

.header-fc__icon {
    position: relative;
    display: block;
    width: 21px;
    height: 21px;
}

.header-fc__icon svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #0C7EE4;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .15s;
}

.header-fc__item:hover .header-fc__icon svg {
    stroke: #0660B0;
}

.header-fc__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.header-fc__count {
    position: absolute;
    top: -8px;
    left: 11px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 30px;
    background: #E40000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
    box-sizing: border-box;
}

.header-fc__count[hidden] {
    display: none;
}

.header-fc--mobile {
    display: none;
}

@media (max-width: 1024px) {
    .header-actions {
        display: none;
    }

    .header-fc--mobile {
        display: flex;
        gap: 4px;
    }

    .header-fc--mobile .header-fc__item {
        justify-content: center;
        width: 40px;
        height: 49px;
    }

    .header-fc--mobile .header-fc__count {
        top: -7px;
    }
}

/* ---------- уведомления ---------- */
.fc-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.fc-toast {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    max-width: 360px;
    padding: 14px 40px 14px 18px;
    border-left: 4px solid #10C44D;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(18, 38, 63, .18);
    color: #12263F;
    font-size: 14px;
    line-height: 18px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s, transform .2s;
    pointer-events: auto;
}

.fc-toast.is-visible {
    opacity: 1;
    transform: none;
}

.fc-toast--error {
    border-left-color: #E40000;
}

.fc-toast__link {
    color: #0C7EE4;
    font-weight: 500;
    text-decoration: underline;
}

.fc-toast__close {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: #94A4B4;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 576px) {
    .fc-toasts {
        left: 12px;
        right: 12px;
        bottom: 12px;
        align-items: stretch;
    }

    .fc-toast {
        max-width: none;
    }
}

/* ---------- общие элементы страниц ---------- */
.fc-page__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.fc-page__clear {
    padding: 0;
    border: 0;
    background: none;
    color: #94A4B4;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.fc-page__clear:hover {
    color: #E40000;
}

.fc-empty {
    max-width: 460px;
    margin: 30px auto 60px;
    text-align: center;
}

.fc-empty[hidden] {
    display: none;
}

.fc-empty__icon {
    width: 56px;
    height: 56px;
    fill: none;
    stroke: #C9D3E0;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fc-empty__title {
    margin: 14px 0 8px;
    font-size: 20px;
    font-weight: 500;
}

.fc-empty__text {
    margin-bottom: 22px;
    color: #6B7B8C;
}

/* ---------- избранное ---------- */
.fc-favorites-list {
    margin-bottom: 50px;
}

.fc-favorites-list .product-box {
    transition: opacity .25s, transform .25s;
}

.fc-favorites-list .product-box.fc-removing {
    opacity: 0;
    transform: scale(.96);
}

.fc-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 14px;
    margin-top: auto;
}

.fc-card-actions .btn {
    flex: 1 1 auto;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.fc-card-actions__remove {
    flex: none;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: #94A4B4;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.fc-card-actions__remove:hover {
    color: #E40000;
}

/* ---------- сравнение ---------- */
.fc-compare__toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.fc-compare__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fc-compare__tab {
    padding: 8px 14px;
    border: 1px solid #E1E6F0;
    border-radius: 8px;
    background: #fff;
    color: #12263F;
    font-size: 14px;
    cursor: pointer;
}

.fc-compare__tab:hover {
    border-color: #0C7EE4;
}

.fc-compare__tab.is-active {
    border-color: #0C7EE4;
    background: #0C7EE4;
    color: #fff;
}

.fc-compare__tab-count {
    margin-left: 4px;
    opacity: .7;
}

.fc-compare__diff {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.fc-compare__diff input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0C7EE4;
}

.fc-compare__limit {
    margin-left: auto;
    color: #94A4B4;
    font-size: 13px;
}

.fc-compare__group[hidden] {
    display: none;
}

.fc-compare__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 50px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    background: #fff;
}

.fc-compare__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    line-height: 18px;
}

.fc-compare__table th,
.fc-compare__table td {
    padding: 10px 14px;
    border-bottom: 1px solid #EEF1F6;
    text-align: left;
    vertical-align: top;
}

.fc-compare__table tbody tr:last-child th,
.fc-compare__table tbody tr:last-child td {
    border-bottom: 0;
}

.fc-compare__table tbody tr:nth-child(even) td,
.fc-compare__table tbody tr:nth-child(even) th {
    background: #F8F9FC;
}

.fc-compare__table td {
    min-width: 190px;
    width: 220px;
}

/* первая колонка с названиями характеристик закреплена при горизонтальной прокрутке */
.fc-compare__table tbody th,
.fc-compare__corner {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 200px;
    min-width: 160px;
    background: #fff;
    color: #6B7B8C;
    font-weight: 400;
    box-shadow: 1px 0 0 #EEF1F6;
}

.fc-compare__corner {
    vertical-align: bottom !important;
}

.fc-compare__corner-title {
    color: #12263F;
    font-size: 16px;
    font-weight: 500;
}

.fc-compare__corner-sub {
    margin-top: 4px;
    font-size: 13px;
}

.fc-compare__product {
    position: relative;
    min-width: 190px;
    padding-top: 16px !important;
    font-weight: 400;
}

.fc-compare__table .fc-compare__product-inner {
    display: block;
    padding: 0;
}

.fc-buttons-row {
    margin: 0 0 16px;
}

.fc-compare__remove {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F1F3FA;
    color: #6B7B8C;
    font-size: 18px;
    line-height: 26px;
    cursor: pointer;
}

.fc-compare__remove:hover {
    background: #FFE5E5;
    color: #E40000;
}

.fc-compare__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    margin-bottom: 10px;
}

.fc-compare__image img {
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
}

.fc-compare__name {
    display: block;
    margin-bottom: 6px;
    color: #12263F;
    font-weight: 500;
}

.fc-compare__name:hover {
    color: #0C7EE4;
}

.fc-compare__articul {
    margin-bottom: 8px;
    color: #94A4B4;
    font-size: 13px;
}

.fc-compare__price {
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 600;
}

.fc-compare__price-na {
    color: #6B7B8C;
    font-size: 14px;
    font-weight: 400;
}

.fc-compare__buy {
    width: 100%;
    min-height: 36px;
    font-size: 13px;
}

.fc-compare__stock {
    color: #10A042;
}

.fc-compare__note {
    margin: -34px 0 50px;
    color: #94A4B4;
    font-size: 13px;
}

.fc-only-diff .fc-compare__row.is-same {
    display: none;
}

@media (max-width: 767px) {
    .fc-compare__table tbody th,
    .fc-compare__corner {
        width: 110px;
        min-width: 110px;
        font-size: 12px;
    }

    .fc-compare__table td,
    .fc-compare__product {
        min-width: 150px;
        width: 150px;
    }

    .fc-compare__limit {
        margin-left: 0;
    }
}
