/* ==========================================================================
   WISHLIST STYLESHEET - UNITED VISION
   ========================================================================== */

/* Header Wishlist Icon */
.wishlist-header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.wishlist-header-link:hover,
.wishlist-header-link.is-active {
    color: #f39a78;
    border-color: #f39a78;
    background: #fff7f3;
}

.wishlist-header-count {
    position: absolute;
    top: -8px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    color: #fff;
    background: #f28f6b;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* Single Product Page Wishlist Toggle Button */
.wishlist-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #555;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wishlist-icon-button:hover,
.wishlist-icon-button:focus-visible,
.wishlist-icon-button.is-active {
    color: #f28f6b;
    background: #fff5f0;
    border-color: #f28f6b;
    box-shadow: 0 4px 14px rgba(242, 143, 107, 0.25);
    outline: none;
}

.wishlist-icon-button:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   WISHLIST PAGE (Trang danh sách yêu thích)
   ========================================================================== */
.wishlist-page {
    min-height: 480px;
    padding-top: 28px;
}

.wishlist-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.wishlist-page-heading .page-title-center {
    margin: 6px 0 0;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wishlist-title-count {
    font-size: 20px;
    font-weight: 600;
    color: #f28f6b;
}

.wishlist-eyebrow {
    margin: 0;
    color: #f28f6b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wishlist-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wishlist-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #444;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wishlist-continue-btn:hover {
    color: #fff;
    background: #2b2f33;
    border-color: #2b2f33;
}

.wishlist-clear-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #888;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-clear-btn:hover {
    color: #fff;
    background: #e53935;
    border-color: #e53935;
}

/* Empty State */
.wishlist-empty {
    max-width: 580px;
    margin: 60px auto;
    padding: 50px 30px;
    text-align: center;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.wishlist-empty > i {
    margin-bottom: 16px;
    color: #f28f6b;
    font-size: 54px;
}

.wishlist-empty h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    font-family: 'Montserrat', sans-serif;
}

.wishlist-empty p {
    margin: 0 auto 24px;
    color: #666;
    font-size: 14px;
    line-height: 1.65;
    max-width: 440px;
}

.wishlist-empty .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    color: #fff;
    background: #f28f6b;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wishlist-empty .btn-primary:hover {
    background: #e67d57;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242, 143, 107, 0.35);
}

/* ==========================================================================
   PRODUCT GRID & CARD
   ========================================================================== */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.wishlist-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.wishlist-card:hover {
    transform: translateY(-4px);
    border-color: #f2c7b5;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Top Badges (Còn hàng / Giảm giá) */
.wishlist-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.wishlist-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wishlist-badge.badge-instock {
    color: #1b5e20;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.wishlist-badge.badge-contact {
    color: #e65100;
    background: #fff3e0;
    border: 1px solid #ffe0b2;
}

.wishlist-badge.badge-sale {
    color: #fff;
    background: #e53935;
    border: 1px solid #d32f2f;
}

/* Nút xóa khỏi yêu thích góc trên phải */
.wishlist-card-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #666;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-card-remove:hover {
    color: #fff;
    background: #e53935;
    border-color: #e53935;
    transform: scale(1.08);
}

/* Ảnh sản phẩm */
.wishlist-card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    padding: 22px;
    background: #fff;
    border-bottom: 1px solid #f2f3f5;
    text-decoration: none;
    overflow: hidden;
}

.wishlist-card-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.wishlist-card:hover .wishlist-card-image img {
    transform: scale(1.06);
}

/* Phần thân thẻ chứa đầy đủ thông tin sản phẩm */
.wishlist-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 16px 18px 18px;
}

/* Dòng thương hiệu & SKU */
.wishlist-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.wishlist-card-vendor {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.wishlist-card-sku {
    color: #999;
    font-size: 11px;
    font-weight: 500;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Tên sản phẩm */
.wishlist-card-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.wishlist-card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wishlist-card-title a:hover {
    color: #f28f6b;
}

/* Khối Giá bán */
.wishlist-card-price-box {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    min-height: 24px;
}

.wishlist-card-price {
    color: #f28f6b;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.wishlist-card-price.is-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d96b43;
    font-size: 14px;
    font-weight: 700;
}

.wishlist-card-compare-price {
    color: #9e9e9e;
    font-size: 13px;
    font-weight: 500;
    text-decoration: line-through;
}

/* Hàng nút hành động dưới cùng */
.wishlist-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.wishlist-btn-detail,
.wishlist-btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wishlist-btn-detail {
    color: #333;
    background: #f7f7f8;
    border: 1px solid #ddd;
}

.wishlist-btn-detail:hover {
    color: #fff;
    background: #2b2f33;
    border-color: #2b2f33;
}

.wishlist-btn-contact {
    color: #fff;
    background: #f28f6b;
    border: 1px solid #f28f6b;
}

.wishlist-btn-contact:hover {
    background: #e67d57;
    border-color: #e67d57;
    box-shadow: 0 4px 12px rgba(242, 143, 107, 0.35);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1199px) {
    .wishlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 820px) {
    .wishlist-page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .wishlist-heading-actions {
        width: 100%;
        justify-content: space-between;
    }

    .wishlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .wishlist-card-body {
        padding: 14px;
    }

    .wishlist-card-title {
        font-size: 14px;
        min-height: 38px;
    }

    .wishlist-card-price {
        font-size: 15px;
    }
}

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

    .wishlist-heading-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wishlist-continue-btn,
    .wishlist-clear-btn {
        justify-content: center;
    }
}
