/* ═══════════════════════════════════════════════════════════════
   Wishlist Button
   CSS variables use --shop-* with fallbacks for cross-theme compatibility.
   ═══════════════════════════════════════════════════════════════ */

.p-card-wish{
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--shop-transition, 0.25s ease);
    border: none;
    cursor: pointer;
    z-index: 3;
}

ul.products .product:hover .p-card-wish,
.product:hover .p-card-wish{
    opacity: 1;
    transform: scale(1);
}

.p-card-wish svg{
    width: 16px;
    height: 16px;
    stroke: var(--shop-fg, var(--brand-dark, #1a1a1a));
    stroke-width: 1.5;
    fill: none;
}

.p-card-wish:hover{
    background: #fff;
}

.p-card-wish.active svg{
    fill: var(--shop-error, var(--brand-secondary, #FF3D81));
    stroke: var(--shop-error, var(--brand-secondary, #FF3D81));
}

/* ── Responsive: 768px ── */
@media (max-width: 768px) {
    .p-card-wish{
        width: 32px;
        height: 32px;
    }

    .p-card-wish svg{
        width: 14px;
        height: 14px;
    }
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
    .p-card-wish{
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
    }

    .p-card-wish svg{
        width: 12px;
        height: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Nav Wishlist Heart Icon (Velour Pro Addons)
   ═══════════════════════════════════════════════════════════════ */

.nav-wishlist-link {
    text-decoration: none;
    color: inherit;
    position: relative;
}

.wishlist-count {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: var(--shop-fg, var(--brand-secondary, #FF3D81));
    color: var(--shop-bg, var(--brand-card, #fff));
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════════════
   Wishlist Page — WooCommerce Product Grid Overrides
   The wishlist page now uses WooCommerce's product loop template,
   so products render using the theme's .product-card design.
   These overrides handle wishlist-page-specific styling.
   ═══════════════════════════════════════════════════════════════ */

/* 4-column grid on wishlist page (overrides theme's 3-column shop grid) */
.vnpa-wishlist-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media (min-width: 1024px) {
    .vnpa-wishlist-page ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .vnpa-wishlist-page ul.products {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .vnpa-wishlist-page ul.products {
        gap: 8px;
    }
}

/* Ensure product cards on wishlist page have remove animation support */
.vnpa-wishlist-page .product-card {
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure the wishlist button is always visible on the wishlist page */
.vnpa-wishlist-page .product-card-wishlist {
    opacity: 1;
    transform: scale(1);
}

/* Ensure the quick view overlay doesn't interfere on wishlist page */
.vnpa-wishlist-page .product-card-quick-view {
    opacity: 1;
    pointer-events: auto;
}


/* ═══════════════════════════════════════════════════════════════
   Wishlist Page — Remove Button (X icon on product cards)
   ═══════════════════════════════════════════════════════════════ */

.vnpa-wishlist-remove {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-fg, var(--brand-dark, #1a1a1a));
    transition: all var(--shop-transition, 0.25s ease);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transform: scale(0.8);
}

.vnpa-wishlist-page .product-card:hover .vnpa-wishlist-remove,
.vnpa-wishlist-remove:focus {
    opacity: 1;
    transform: scale(1);
}

.vnpa-wishlist-remove:hover {
    background: var(--shop-error, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.vnpa-wishlist-remove svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 480px) {
    .vnpa-wishlist-remove {
        width: 28px;
        height: 28px;
        top: 6px;
        left: 6px;
    }

    .vnpa-wishlist-remove svg {
        width: 12px;
        height: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Empty State (matches theme's shop empty state)
   ═══════════════════════════════════════════════════════════════ */

.velour-wishlist-page__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.velour-wishlist-page__empty svg {
    margin-bottom: 20px;
    opacity: 0.15;
    stroke: var(--shop-fg, var(--brand-dark, #111827));
}

.velour-wishlist-page__empty p {
    font-size: 0.95rem;
    color: var(--shop-muted, var(--brand-muted, #6B7280));
    margin-bottom: 32px;
    font-weight: 300;
}

.velour-wishlist-page__continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    border: 1.5px solid var(--shop-border, var(--brand-border, #E5E7EB));
    border-radius: 50px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--shop-fg, var(--brand-dark, #111827));
    text-decoration: none;
    transition: all var(--shop-transition, 0.25s ease);
}

.velour-wishlist-page__continue:hover {
    border-color: var(--shop-fg, var(--brand-dark, #111827));
    background: var(--shop-fg, var(--brand-dark, #111827));
    color: var(--shop-bg, var(--brand-bg, #FAFBFC));
}


/* ═══════════════════════════════════════════════════════════════
   Legacy Wishlist Page
   These styles are used when the custom template is not active
   and the shortcode renders custom .wishlist-item cards.
   ═══════════════════════════════════════════════════════════════ */

.velour-wishlist-page__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 30px;
}

/* ── Legacy Wishlist Item Card ── */

.wishlist-item {
    position: relative;
    background: transparent;
    border: none;
    transition: all var(--shop-transition, 0.25s ease);
}

/* ── Card Image ── */

.wishlist-item__image {
    display: block;
    aspect-ratio: 3/4;
    border-radius: var(--shop-radius, 12px);
    overflow: hidden;
    background: var(--shop-card-bg, var(--brand-panel, #F8F9FA));
    position: relative;
    margin-bottom: 14px;
}

.wishlist-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.wishlist-item:hover .wishlist-item__image img {
    transform: scale(1.06);
}

/* ── Remove Button ── */

.wishlist-item__remove {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--shop-transition, 0.25s ease);
}

.wishlist-item:hover .wishlist-item__remove {
    opacity: 1;
    transform: scale(1);
}

.wishlist-item__remove svg {
    stroke: var(--shop-fg, var(--brand-dark, #1a1a1a));
    transition: stroke 0.2s ease;
}

.wishlist-item__remove:hover {
    background: var(--shop-error, #dc2626);
}

.wishlist-item__remove:hover svg {
    stroke: #fff;
}

/* ── Card Info ── */

.wishlist-item__info {
    padding: 0 4px;
}

.wishlist-item__name {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px;
    line-height: 1.4;
}

.wishlist-item__name a {
    color: var(--shop-fg, var(--brand-dark, #111827));
    text-decoration: none;
    transition: color var(--shop-transition, 0.25s ease);
}

.wishlist-item__name a:hover {
    color: var(--shop-muted, var(--brand-muted, #6B7280));
}

/* ── Price ── */

.wishlist-item__price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 14px;
}

.wishlist-item__price .price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wishlist-item__price del {
    font-size: 0.76rem;
    color: var(--shop-muted, var(--brand-muted, #6B7280));
    text-decoration: line-through;
}

.wishlist-item__price ins {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--shop-fg, var(--brand-dark, #111827));
    text-decoration: none;
}

.wishlist-item__price .woocommerce-Price-amount {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--shop-fg, var(--brand-dark, #111827));
}

/* ── View Product Link ── */

.wishlist-item__view {
    display: inline-block;
    padding: 13px 0;
    width: 100%;
    text-align: center;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: var(--shop-radius-sm, 8px);
    text-decoration: none;
    transition: background var(--shop-transition, 0.25s ease);
}

.wishlist-item__view:hover {
    background: var(--shop-fg, var(--brand-dark, #111827));
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .velour-wishlist-page__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .velour-wishlist-page__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .wishlist-item__name {
        font-size: 0.78rem;
    }

    .wishlist-item__price .woocommerce-Price-amount,
    .wishlist-item__price ins {
        font-size: 0.78rem;
    }

    .wishlist-item__view {
        padding: 10px 0;
        font-size: 0.7rem;
    }
}

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

    .wishlist-item__name {
        font-size: 0.72rem;
    }

    .wishlist-item__price .woocommerce-Price-amount,
    .wishlist-item__price ins {
        font-size: 0.72rem;
    }

    .wishlist-item__view {
        padding: 8px 0;
        font-size: 0.65rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Wishlist Toast Notification
   Fixed bottom-center toast with proper contrast colors.
   ═══════════════════════════════════════════════════════════════ */

.vnpa-wishlist-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.vnpa-wishlist-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Added state — dark background with white text */
.vnpa-wishlist-toast--added {
    background: rgba(26, 26, 26, 0.94);
    color: #ffffff;
}

/* Removed state — subtle dark background */
.vnpa-wishlist-toast--removed {
    background: rgba(26, 26, 26, 0.88);
    color: rgba(255, 255, 255, 0.85);
}

.vnpa-wishlist-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vnpa-wishlist-toast--added .vnpa-wishlist-toast__icon {
    color: #FF3D81;
}

.vnpa-wishlist-toast--removed .vnpa-wishlist-toast__icon {
    color: rgba(255, 255, 255, 0.7);
}

.vnpa-wishlist-toast__text {
    line-height: 1.3;
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
    .vnpa-wishlist-toast {
        bottom: 16px;
        padding: 12px 20px;
        font-size: 0.8rem;
        border-radius: 40px;
    }
}
