/* === Wishlist Nav === */
.wishlist-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    white-space: nowrap;
}

.wishlist-nav-icon {
    color: #f5c518;
    font-size: 16px;
    line-height: 1;
}

.wishlist-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #f5c518;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    line-height: 1;
}

.wishlist-nav-count.hidden {
    display: none;
}

/* === Wishlist button on card === */
.card-wrap {
    position: relative;
}

.btn-wishlist {
    position: absolute;
    top: 10px;
    left: 5px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 4px 10px 4px 7px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    color: #333;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.btn-wishlist:hover {
    background: #fff9e0;
    border-color: #f5c518;
}

.btn-wishlist__icon {
    color: #ccc;
    font-size: 15px;
    line-height: 1;
    transition: color 0.15s;
}

.btn-wishlist--active .btn-wishlist__icon {
    color: #f5c518;
}

.btn-wishlist--active {
    border-color: #f5c518;
    background: #fff9e0;
    color: #333;
}

/* === Wishlist button on card detail page === */
.product-info--top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.btn-wishlist--card {
    position: static;
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 14px;
    padding: 9px 18px 9px 14px;
    border-radius: 8px;
    background: #f8f8f8;
    border-color: #ddd;
}

.btn-wishlist--card:hover {
    background: #fff9e0;
    border-color: #f5c518;
}

.btn-wishlist--card .btn-wishlist__icon {
    font-size: 18px;
}

.btn-wishlist--card.btn-wishlist--active {
    background: #fff9e0;
    border-color: #f5c518;
}

/* === Wishlist page === */
.wishlist-page {
    padding: 40px 0 80px;
}

.wishlist-info-bar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 28px;
}

.wishlist-info-bar__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.wishlist-info-bar__star {
    color: #f5c518;
    font-size: 20px;
    line-height: 1;
}

.wishlist-info-bar__title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.wishlist-info-bar__slots {
    font-size: 14px;
    color: #555;
}

.wishlist-info-bar__slots strong {
    color: #111;
}

.wishlist-info-bar__hint {
    font-size: 13px;
    color: #777;
    margin-left: 32px;
}

.wishlist-info-bar--full .wishlist-info-bar__title {
    color: #c0392b;
}

/* === Wishlist item === */
.wishlist-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f2;
    padding: 20px 0;
    gap: 20px;
    transition: opacity 0.3s;
}

.wishlist-item--removing {
    opacity: 0;
}

.wishlist-item__img {
    width: 160px;
    height: 108px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.wishlist-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-item__info {
    flex: 1;
    min-width: 0;
}

.wishlist-item__title {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
    text-decoration: none;
}

.wishlist-item__title:hover {
    color: #0048ff;
}

.wishlist-item__year {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.wishlist-item__price {
    font-size: 16px;
    color: #fb6206;
    font-weight: 600;
}

.wishlist-item__price .old-price {
    color: #aaa;
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
    margin-right: 6px;
}

.wishlist-item__remove {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.wishlist-item__remove:hover {
    border-color: #c0392b;
    color: #c0392b;
}

/* === Wishlist empty === */
.wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.wishlist-empty__icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.wishlist-empty__text {
    font-size: 18px;
    margin-bottom: 20px;
}

.wishlist-empty__link {
    display: inline-block;
    padding: 10px 24px;
    background: #0048ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.wishlist-empty__link:hover {
    background: #003ad4;
}

/* === Submit button === */
.wishlist-submit-wrap {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.wishlist-submit-btn {
    padding: 14px 36px;
    background: #0048ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.wishlist-submit-btn:hover {
    background: #003ad4;
}

.wishlist-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* === Toast notification === */
.wishlist-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #333;
    color: #fff;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    transition: transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
}

.wishlist-toast.wishlist-toast--show {
    transform: translateX(-50%) translateY(0);
}

.wishlist-toast.wishlist-toast--error {
    background: #c0392b;
}

.wishlist-toast.wishlist-toast--link {
    pointer-events: auto;
    cursor: pointer;
    white-space: normal;
    padding: 12px 24px;
}

.wishlist-toast.wishlist-toast--link:hover {
    background: #444;
}

.wishlist-toast__link {
    display: block;
    margin-top: 5px;
    color: #f5c518;
    font-weight: 600;
    font-size: 13px;
}

/* === Mobile === */
@media (max-width: 768px) {
    .product-info--top {
        flex-direction: column;
        gap: 10px;
    }

    .btn-wishlist--card {
        width: 100%;
        justify-content: center;
    }

    .btn-wishlist {
        top: 8px;
        left: 4px;
        font-size: 11px;
        padding: 3px 8px 3px 5px;
    }

    .wishlist-item {
        flex-wrap: wrap;
    }

    .wishlist-item__img {
        width: 120px;
        height: 80px;
        order: 1;
    }

    .wishlist-item__info {
        order: 2;
    }

    .wishlist-item__remove {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }

    .wishlist-info-bar__hint {
        margin-left: 0;
        margin-top: 4px;
    }

    .wishlist-submit-btn {
        width: 100%;
        text-align: center;
    }
}
