/* ───── ek-wishlist.css ─────
 * Адаптировано из design-source/wishlist/wishlist.css
 * - Все классы с префиксом ek-
 * - Все правила скоупированы под .ek-page
 * - .ek-pcard / .ek-grid — переиспользуем (есть в ek-home.css и ek-catalog.css)
 * - .ek-sort* — кастомный button-dropdown (не путать с native <select> в каталоге)
 */

.ek-page .ek-wishlist-page { padding: 32px 0 64px; }

.ek-page .ek-wishlist-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.ek-page .ek-wishlist-head-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
}
.ek-page .ek-wishlist-head h1 {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}
.ek-page .ek-wishlist-count {
    color: var(--ek-text-muted);
    font-size: 16px;
}

.ek-page .ek-wishlist-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ek-page .ek-wishlist-clear {
    font-size: 13px;
    color: var(--ek-text-muted);
    padding: 8px 0;
    border: 0;
    background: transparent;
    border-bottom: 0.5px solid currentColor;
    cursor: pointer;
    transition: color .15s;
}
.ek-page .ek-wishlist-clear:hover { color: #B84A4A; }

.ek-page .ek-wishlist-grid {
    /* gap и колонки — от .ek-grid-4 (ek-catalog.css), здесь только адаптив */
}

/* ───── Custom sort dropdown (button-based, не native <select>) ───── */
.ek-page .ek-wishlist-page .ek-sort {
    position: relative;
}
.ek-page .ek-wishlist-page .ek-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0.5px solid var(--ek-border);
    border-radius: var(--ek-radius-pill);
    background: #fff;
    font-size: 14px;
    color: var(--ek-text);
    cursor: pointer;
    transition: border-color .15s;
}
.ek-page .ek-wishlist-page .ek-sort-trigger:hover { border-color: var(--ek-text); }
.ek-page .ek-wishlist-page .ek-sort-prefix {
    color: var(--ek-text-muted);
}
.ek-page .ek-wishlist-page .ek-sort-current {
    font-weight: 500;
}
.ek-page .ek-wishlist-page .ek-sort-caret {
    width: 10px;
    height: 10px;
    transition: transform .15s;
}
.ek-page .ek-wishlist-page .ek-sort.open .ek-sort-caret {
    transform: rotate(180deg);
}
.ek-page .ek-wishlist-page .ek-sort-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 240px;
    padding: 6px;
    background: #fff;
    border: 0.5px solid var(--ek-border);
    border-radius: var(--ek-radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 20;
}
.ek-page .ek-wishlist-page .ek-sort.open .ek-sort-menu {
    display: block;
}
.ek-page .ek-wishlist-page .ek-sort-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: var(--ek-text);
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
}
.ek-page .ek-wishlist-page .ek-sort-menu button:hover {
    background: var(--ek-bg-secondary);
}
.ek-page .ek-wishlist-page .ek-sort-menu button.is-active {
    font-weight: 500;
    background: var(--ek-bg-secondary);
}

/* ───── Empty state (страница автономна — копия из ek-cart.css) ───── */
.ek-page .ek-empty-state {
    max-width: 480px;
    margin: 96px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.ek-page .ek-empty-icon {
    color: var(--ek-text-muted);
    margin-bottom: 8px;
}
.ek-page .ek-empty-title {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
}
.ek-page .ek-empty-body {
    font-size: 17px;
    color: var(--ek-text-muted);
    margin: 0 0 12px;
}

/* ───── Filled heart state в карточке ───── */
.ek-page .ek-p-fav.is-active {
    color: var(--ek-text);
}

/* ───── Адаптив ───── */
@media (max-width: 1024px) {
    .ek-page .ek-wishlist-head h1 { font-size: 36px; }
}

@media (max-width: 700px) {
    .ek-page .ek-wishlist-page { padding: 16px 0 32px; }
    .ek-page .ek-wishlist-head { margin-bottom: 24px; }
    .ek-page .ek-wishlist-head h1 { font-size: 28px; }
    .ek-page .ek-wishlist-page .ek-sort-menu {
        right: auto; left: 0;
    }
}
