/* =============================================================
   favorites.css — TikTok Shop pink theme
   ============================================================= */

:root {
    --fav-pink: #fe2c55;
    --fav-pink-light: #fff1f3;
    --fav-pink-shadow: rgba(254, 44, 85, 0.18);
    --fav-radius: 16px;
    --fav-radius-sm: 10px;
}

/* ─── Hero ─────────────────────────────────────────────────── */
.fav-hero {
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    border-radius: 20px;
    padding: 32px 28px;
    margin-bottom: 24px;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.fav-hero::before,
.fav-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.fav-hero::before { width: 180px; height: 180px; top: -60px; right: -40px; }
.fav-hero::after  { width: 100px; height: 100px; bottom: -30px; right: 80px; background: rgba(255,255,255,0.05); }

.fav-hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fav-hero__eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    margin-bottom: 6px;
}

.fav-hero__title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}

.fav-hero__sub {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.fav-hero__stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 16px 24px;
    flex-shrink: 0;
}

.fav-hero__count {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.fav-hero__count-label {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

/* ─── Layout ────────────────────────────────────────────────── */
.fav-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.fav-sidebar__card {
    background: #fff;
    border-radius: var(--fav-radius);
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.fav-sidebar__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    background: #fafafa;
}

.fav-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.fav-sidebar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 13.5px;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.fav-sidebar__item:hover {
    background: var(--fav-pink-light);
    color: var(--fav-pink);
}

.fav-sidebar__item.is-active {
    background: var(--fav-pink-light);
    color: var(--fav-pink);
    font-weight: 700;
}

.fav-sidebar__item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--fav-pink);
    border-radius: 0 2px 2px 0;
}

.fav-sidebar__item-icon { font-size: 15px; flex-shrink: 0; }

.fav-sidebar__item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fav-sidebar__item-count {
    background: rgba(0,0,0,0.07);
    border-radius: 999px;
    font-size: 11px;
    padding: 1px 7px;
    font-weight: 600;
    flex-shrink: 0;
}

.fav-sidebar__item.is-active .fav-sidebar__item-count {
    background: var(--fav-pink);
    color: #fff;
}

.fav-sidebar__item-delete {
    background: none;
    border: none;
    padding: 2px 4px;
    color: #aaa;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

.fav-sidebar__item:hover .fav-sidebar__item-delete { opacity: 1; }
.fav-sidebar__item-delete:hover { color: var(--fav-pink); }

.fav-sidebar__new {
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(0,0,0,0.07);
    background: #fafafa;
}

/* ─── Search Bar ────────────────────────────────────────────── */
.fav-search-wrap {
    margin-bottom: 14px;
}

.fav-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fav-search-box {
    position: relative;
    flex: 1;
}

.fav-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.fav-search-input {
    width: 100%;
    padding: 9px 36px 9px 36px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #1f2937;
}

.fav-search-input:focus {
    border-color: var(--fav-pink);
    box-shadow: 0 0 0 3px var(--fav-pink-shadow);
}

.fav-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1;
}
.fav-search-clear:hover { color: var(--fav-pink); }

.fav-search-btn {
    background: var(--fav-pink);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, box-shadow 0.18s;
    flex-shrink: 0;
}
.fav-search-btn:hover {
    background: #d91f46;
    box-shadow: 0 4px 12px var(--fav-pink-shadow);
}

/* ─── Toolbar (tabs + view toggle) ──────────────────────────── */
.fav-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

/* ─── View Toggle ────────────────────────────────────────────── */
.fav-view-toggle {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    flex-shrink: 0;
}

.fav-view-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.fav-view-btn:hover { color: var(--fav-pink); background: #fff; }

.fav-view-btn.is-active {
    background: #fff;
    color: var(--fav-pink);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ─── Search Result Badge ────────────────────────────────────── */
.fav-search-result-badge {
    background: var(--fav-pink-light);
    color: var(--fav-pink);
    border: 1px solid rgba(254,44,85,0.15);
    border-radius: 999px;
    font-size: 12px;
    padding: 4px 12px;
    white-space: nowrap;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.fav-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fav-tab {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: #374151;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    text-decoration: none;
    transition: all 0.15s;
}

.fav-tab:hover { border-color: var(--fav-pink); color: var(--fav-pink); background: var(--fav-pink-light); }

.fav-tab.is-active {
    background: var(--fav-pink);
    border-color: var(--fav-pink);
    color: #fff;
    box-shadow: 0 4px 12px var(--fav-pink-shadow);
}

/* ─── Action Bar ─────────────────────────────────────────────── */
.fav-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: var(--fav-radius-sm);
    flex-wrap: wrap;
}

.fav-action-bar__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.fav-check-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

/* ─── Grid ───────────────────────────────────────────────────── */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transition: all 0.3s ease;
}

/* ─── List View Mode ─────────────────────────────────────────── */
.fav-grid.view-list {
    grid-template-columns: 1fr;
    gap: 10px;
}

.fav-grid.view-list .fav-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
}

.fav-grid.view-list .fav-card__img-wrap {
    aspect-ratio: unset;
    width: 130px;
    min-width: 130px;
    flex-shrink: 0;
    border-radius: 12px 0 0 12px;
}

.fav-grid.view-list .fav-card__badge {
    position: static;
    align-self: flex-start;
    margin-bottom: 4px;
}

.fav-grid.view-list .fav-card__check {
    position: static;
    display: flex;
    align-self: flex-start;
    margin-right: 0;
}

.fav-grid.view-list .fav-card__body {
    padding: 14px 12px;
    flex: 1;
    gap: 4px;
}

.fav-grid.view-list .fav-card__name {
    -webkit-line-clamp: 1;
    font-size: 14px;
}

.fav-grid.view-list .fav-card__actions {
    padding: 14px 14px 14px 0;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 120px;
}

.fav-grid.view-list .fav-card__list-extra {
    display: block !important;
}

.fav-card__list-extra { display: none; }

/* ─── Card ───────────────────────────────────────────────────── */
.fav-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--fav-radius);
    overflow: hidden;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.fav-card:hover {
    box-shadow: 0 12px 32px rgba(254, 44, 85, 0.12);
    transform: translateY(-4px);
    border-color: rgba(254, 44, 85, 0.3);
}

.fav-card.is-selected {
    border-color: var(--fav-pink);
    box-shadow: 0 0 0 2px var(--fav-pink-shadow);
}

.fav-card__check {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    cursor: pointer;
}

.fav-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.fav-card__badge--bundle {
    background: #fff1f3;
    color: #fe2c55;
    border: 1px solid rgba(254, 44, 85, 0.2);
}
.fav-card__badge--product {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid rgba(22, 101, 52, 0.2);
}

.fav-card__img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f9fa;
}

.fav-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fav-card:hover .fav-card__img { transform: scale(1.04); }

.fav-card__body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fav-card__name {
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-card__name:hover { color: var(--fav-pink); }

.fav-card__price {
    font-size: 15px;
    font-weight: 800;
    color: var(--fav-pink);
}

.fav-card__price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: 400;
}

.fav-card__price--quote { color: #6b7280; font-size: 13px; font-weight: 600; }

.fav-card__meta {
    font-size: 11.5px;
    color: #9ca3af;
    margin-top: auto;
}

.fav-card__actions {
    padding: 0 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.fav-btn-pink {
    background: var(--fav-pink);
    border-color: var(--fav-pink);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.18s;
}

.fav-btn-pink:hover {
    background: #d91f46;
    border-color: #d91f46;
    color: #fff;
    box-shadow: 0 4px 12px var(--fav-pink-shadow);
}

/* ─── Empty State ─────────────────────────────────────────────── */
.fav-empty {
    text-align: center;
    padding: 48px 24px 40px;
    background: #fff;
    border-radius: var(--fav-radius);
    border: 2px dashed rgba(254, 44, 85, 0.18);
    animation: fav-fade-in 0.4s ease;
}

@keyframes fav-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fav-empty__illustration {
    width: 140px;
    height: 112px;
    margin: 0 auto 16px;
}

.fav-empty__illustration svg {
    width: 100%;
    height: 100%;
}

.fav-empty__icon {
    font-size: 42px;
    color: var(--fav-pink);
    opacity: 0.35;
    margin-bottom: 12px;
}

.fav-empty__icon--search {
    font-size: 38px;
    color: #9ca3af;
    opacity: 0.6;
    margin-bottom: 12px;
}

.fav-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.fav-empty__sub { color: #6b7280; font-size: 14px; margin-bottom: 20px; }

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

.fav-empty__tips {
    font-size: 12px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 999px;
    display: inline-block;
    padding: 6px 16px;
}

.fav-btn-outline-pink {
    background: transparent;
    border: 1.5px solid var(--fav-pink);
    color: var(--fav-pink);
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.18s;
}
.fav-btn-outline-pink:hover {
    background: var(--fav-pink);
    color: #fff;
    box-shadow: 0 4px 12px var(--fav-pink-shadow);
}

/* ─── Toast ───────────────────────────────────────────────────── */
.fav-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fav-toast {
    background: #1f2937;
    color: #fff;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: fav-toast-in 0.3s ease;
    max-width: 300px;
}

.fav-toast.is-success { background: #16a34a; }
.fav-toast.is-error   { background: #dc2626; }

@keyframes fav-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Heart Button (trang detail - icon only) ────────────────── */
.fav-heart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fav-heart-btn:hover {
    border-color: var(--fav-pink);
    color: var(--fav-pink);
    background: var(--fav-pink-light);
    transform: scale(1.08);
    box-shadow: 0 4px 14px var(--fav-pink-shadow);
}

.fav-heart-btn.is-favorited {
    background: var(--fav-pink);
    border-color: var(--fav-pink);
    color: #fff;
    box-shadow: 0 4px 14px var(--fav-pink-shadow);
}

.fav-heart-btn.is-favorited:hover {
    background: #e02447;
    border-color: #e02447;
    transform: scale(1.08);
}

.fav-heart-btn i {
    transition: transform 0.2s ease;
}

.fav-heart-btn:active i {
    transform: scale(1.3);
}
.fav-heart-btn:active i { transform: scale(1.4); }

/* ─── Gallery Image Overlay (Alibaba-style) ──────────────────── */
.bundle-v6__gallery-heart-wrap {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
}

.fav-heart-btn--overlay {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    color: #9ca3af;
    font-size: 17px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.fav-heart-btn--overlay:hover {
    background: #fff;
    border-color: var(--fav-pink, #fe2c55);
    color: var(--fav-pink, #fe2c55);
    box-shadow: 0 4px 16px rgba(254, 44, 85, 0.22);
    transform: scale(1.1);
}

.fav-heart-btn--overlay.is-favorited {
    background: var(--fav-pink, #fe2c55);
    border-color: var(--fav-pink, #fe2c55);
    color: #fff;
    box-shadow: 0 4px 16px rgba(254, 44, 85, 0.35);
}

.fav-heart-btn--overlay.is-favorited:hover {
    background: #e02447;
    border-color: #e02447;
    transform: scale(1.1);
}

.fav-heart-btn--overlay i {
    transition: transform 0.2s ease;
    pointer-events: none;
}

.fav-heart-btn--overlay:active i {
    transform: scale(1.35);
}


/* ─── Collection Dropdown (trang detail) ─────────────────────── */
.fav-collection-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;
    z-index: 200;
    animation: fav-drop-in 0.2s ease;
}

@keyframes fav-drop-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.fav-collection-dropdown__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    padding: 4px 14px 8px;
}

.fav-collection-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13.5px;
    color: #374151;
    cursor: pointer;
    transition: background 0.12s;
}

.fav-collection-dropdown__item:hover { background: var(--fav-pink-light); color: var(--fav-pink); }

.fav-collection-dropdown__item.is-checked { color: var(--fav-pink); font-weight: 600; }
.fav-collection-dropdown__item.is-checked::after {
    content: '✓';
    margin-left: auto;
    font-weight: 800;
}

.fav-collection-dropdown__divider {
    height: 1px;
    background: rgba(0,0,0,0.07);
    margin: 4px 0;
}

.fav-collection-dropdown__new {
    padding: 8px 14px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .fav-layout { grid-template-columns: 220px 1fr; }
    .fav-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .fav-layout { grid-template-columns: 1fr; }
    .fav-sidebar { order: 2; }
    .fav-main   { order: 1; }
    .fav-hero__stat { display: none; }
    .fav-hero__title { font-size: 22px; }
}

@media (max-width: 480px) {
    .fav-grid { grid-template-columns: 1fr; }
}
