
/* =========================================================
   СТРАНИЦА ИЗБРАННОГО
   ========================================================= */


.favorites-page {
    padding: 8px 16px 16px;
    padding-top: 8px !important;

    padding-bottom: calc(
        90px +
        var(
            --tg-content-safe-area-inset-bottom,
            env(safe-area-inset-bottom, 0px)
        )
    );
}


/* =========================================================
   СПИСОК
   ========================================================= */

.favorites-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}


/* =========================================================
   КАРТОЧКА
   ========================================================= */

.favorite-card {
    min-width: 0;
}


/* =========================================================
   ФОТО
   ========================================================= */

.favorite-card-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 3 / 4;

    overflow: hidden;

    border-radius: 10px;

    background: #f3f3f3;
}


.favorite-card-link {
    display: block;

    width: 100%;
    height: 100%;

    text-decoration: none;
}


.favorite-card-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.favorite-card-no-photo {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 13px;

    color: #777;
}


/* =========================================================
   СЕРДЦЕ
   ========================================================= */

.favorite-card-button {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.92);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 21px;

    color: #000;

    cursor: pointer;

    z-index: 2;

    box-shadow:
        0 1px 5px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   ИНФОРМАЦИЯ
   ========================================================= */

.favorite-card-info {
    padding-top: 8px;
}


.favorite-card-name {
    font-size: 15px;

    font-weight: 600;

    line-height: 1.25;

    margin-bottom: 4px;
}


.favorite-card-color {
    font-size: 13px;

    color: #666;

    margin-bottom: 2px;
}


.favorite-card-size {
    font-size: 13px;

    color: #666;

    margin-bottom: 4px;
}


.favorite-card-price {
    font-size: 16px;

    font-weight: 700;

    margin-top: 4px;
}



/* =========================================================
   КОРЗИНА
   ========================================================= */

.favorite-card-cart-row {
    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 8px;

    margin-top: 8px;
}


/* =========================================================
   КНОПКА КОРЗИНЫ
   ========================================================= */

.favorite-card-cart-button {
    flex: 1;
    min-width: 0;

    padding: 10px 8px;

    border: none;

    border-radius: 8px;

    background: #000;

    color: #fff;

    font-size: 14px;

    cursor: pointer;
}


.favorite-card-cart-button:disabled {
    background: #d5d5d5;

    color: #888;

    cursor: default;
}


/* =========================================================
   КОЛИЧЕСТВО
   ========================================================= */

.favorite-card-quantity-controls {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}


.favorite-card-quantity-button {
    width: 32px;
    height: 32px;

    padding: 0;

    border: none;

    border-radius: 8px;

    background: #f1f1f1;

    color: #000;

    font-size: 20px;

    line-height: 1;

    cursor: pointer;
}


.favorite-card-quantity {
    min-width: 18px;

    text-align: center;

    font-size: 14px;

    font-weight: 600;
}


.favorite-card-cart-button:disabled {
    background: #d5d5d5;

    color: #888;

    cursor: default;
}


/* =========================================================
   НЕДОСТУПНЫЙ ТОВАР
   ========================================================= */

.favorite-card-unavailable
.favorite-card-image {
    opacity: 0.55;
}


/* =========================================================
   ПУСТО
   ========================================================= */

.empty-favorites {
    text-align: center;

    padding: 60px 20px;

    font-size: 18px;

    color: #777;
}


/* =========================================================
   ЗАГОЛОВОК НЕДОСТУПНЫХ
   ========================================================= */

.favorites-section h2 {
    margin-top: 28px;
    margin-bottom: 14px;

    font-size: 18px;
}


/* =========================================================
   ИЗБРАННОЕ — ЕДИНЫЙ СТИЛЬ МАГАЗИНА
   ========================================================= */

:root {
    --favorites-accent: #72383D;
    --favorites-text: #322D29;
}

/* Заголовок страницы */
.favorites-header h1 {
    color: var(--favorites-accent) !important;
    font-size: 22px !important;
    transform: translate(-8px, 8px);
}


/* Название товара */
.favorite-card-name {
    color: var(--favorites-accent) !important;
}

/* Цвет и размер */
.favorite-card-color,
.favorite-card-size {
    color: var(--favorites-accent) !important;
}

/* Цена */
.favorite-card-price {
    color: var(--favorites-accent) !important;
}

/* Сердце на фотографии */
.favorite-card-button {
    color: var(--favorites-accent) !important;
    background: rgba(255, 255, 255, 0.94) !important;
}

/* Кнопка добавления в корзину */
.favorite-card-cart-button {
    background: var(--favorites-accent) !important;
    color: #FFFFFF !important;
    border: 1px solid var(--favorites-accent) !important;
    border-radius: 10px !important;
    font-weight: 600;
    transition: background-color 0.18s ease;
}

.favorite-card-cart-button:not(:disabled):hover {
    background: #5D2C31 !important;
}

/* Недоступная кнопка */
.favorite-card-cart-button:disabled {
    background: #D5D5D5 !important;
    color: #888888 !important;
    border-color: #D5D5D5 !important;
}

/* Кнопки изменения количества */
.favorite-card-quantity-button {
    color: var(--favorites-accent) !important;
    background: #F0E5E5 !important;
}

/* Заголовки разделов */
.favorites-section h2 {
    color: var(--favorites-accent) !important;
}

/* Сообщение, если избранное пустое */
.empty-favorites {
    color: var(--favorites-accent) !important;
}


/* Карточки избранного — основной тёмный цвет текста */
.favorite-card-name,
.favorite-card-color,
.favorite-card-size,
.favorite-card-price {
    color: #322D29 !important;
}
