/* ==========================================================================
   TSVETOMANIA — страница /favorite/
   Путь: /local/templates/main/css/favorite.css
   Подключается через $APPLICATION->SetAdditionalCSS() в /favorite/index.php
   ========================================================================== */

/* CSS-переменные берём в локальный скоуп,
   чтобы не конфликтовать с общими стилями сайта */
.fav-page {
    --fav-primary: #A11826;
    --fav-accent: #F13A5F;
    --fav-accent-soft: #FEE8ED;
    --fav-text: #1A1A1A;
    --fav-text-secondary: #6B6B6B;
    --fav-text-muted: #B9B9B9;
    --fav-surface-soft: #FAF7F4;
    --fav-border: #EFEAE6;

    padding: 24px 0 80px;
    font-family: 'Tilda Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--fav-text);
}

.fav-page *,
.fav-page *::before,
.fav-page *::after {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .fav-page { padding: 16px 0 60px; }
}

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.fav-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fav-text-muted);
    margin-bottom: 28px;
}
.fav-breadcrumbs a {
    color: var(--fav-text-muted);
    text-decoration: none;
    transition: color .2s ease;
}
.fav-breadcrumbs a:hover { color: var(--fav-accent); }
.fav-breadcrumbs__sep { opacity: .6; }
.fav-breadcrumbs__current { color: var(--fav-text); }

/* ==========================================================================
   Заголовок
   ========================================================================== */
.fav-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--fav-border);
    margin-bottom: 40px;
}

.fav-head__title {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.fav-head__title h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--fav-text);
}

.fav-head__accent {
    font-family: 'Helvetia Verbundene', 'Tilda Sans', serif;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 38px);
    color: var(--fav-accent);
    font-style: italic;
    line-height: 1;
    transform: translateY(2px);
}

.fav-head__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: var(--fav-accent-soft);
    color: var(--fav-primary);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transform: translateY(-6px);
}

.fav-head__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fav-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--fav-border);
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--fav-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}
.fav-btn-ghost:hover {
    border-color: var(--fav-accent);
    color: var(--fav-accent);
}

/* ==========================================================================
   Обёртка для сетки товаров (визуально разгружает)
   ========================================================================== */
.fav-grid-wrap {
    margin-top: 8px;
}

/* Прячем в шаблоне catalog.section вывод тегов,
   это правило уже было в старом index.php */
.fav-grid-wrap .catalog__tags {
    display: none;
}

/* ==========================================================================
   Пустое состояние
   ========================================================================== */
.fav-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px 20px;
    max-width: 520px;
    margin: 0 auto;
}

.fav-empty__illustration {
    width: 200px;
    height: 200px;
    margin-bottom: 32px;
    position: relative;
}

.fav-empty__illustration svg {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* мягкое пульсирующее свечение */
.fav-empty__illustration::before {
    content: '';
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--fav-accent-soft) 0%, transparent 70%);
    z-index: 0;
    animation: fav-pulse 3s ease-in-out infinite;
}

@keyframes fav-pulse {
    0%, 100% { transform: scale(1);    opacity: .6; }
    50%      { transform: scale(1.15); opacity: 1;  }
}

@media (prefers-reduced-motion: reduce) {
    .fav-empty__illustration::before { animation: none; }
}

.fav-empty__title {
    font-size: 28px;
    font-weight: 600;
    color: var(--fav-text);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.fav-empty__italic {
    font-family: 'Helvetia Verbundene', 'Tilda Sans', serif;
    font-weight: 400;
    font-style: italic;
    color: var(--fav-accent);
}

.fav-empty__text {
    font-size: 16px;
    color: var(--fav-text-secondary);
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 420px;
}

.fav-empty__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 56px;
}

.fav-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--fav-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 4px 14px rgba(161, 24, 38, 0.2);
}
.fav-btn-primary:hover {
    background: var(--fav-accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(241, 58, 95, 0.3);
}

.fav-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: var(--fav-text);
    border: 1px solid var(--fav-border);
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}
.fav-btn-secondary:hover {
    border-color: var(--fav-accent);
    color: var(--fav-accent);
}

/* Подсказка */
.fav-empty__hint {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--fav-surface-soft);
    border-radius: 14px;
    text-align: left;
    max-width: 480px;
    width: 100%;
}

.fav-empty__hint-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(161, 24, 38, 0.04);
}

.fav-empty__hint-text {
    font-size: 14px;
    color: var(--fav-text-secondary);
    line-height: 1.5;
}
.fav-empty__hint-text b {
    color: var(--fav-text);
    font-weight: 600;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 600px) {
    .fav-head { flex-direction: column; align-items: flex-start; }
    .fav-empty__title { font-size: 24px; }
    .fav-empty__illustration { width: 160px; height: 160px; margin-bottom: 24px; }
    .fav-empty__actions { flex-direction: column; width: 100%; }
    .fav-btn-primary, .fav-btn-secondary { width: 100%; justify-content: center; }
}