/* ============================================================
   BLEND PIXEL STUDIO - wishlist.css v4.0
   Wishlist page (page-wishlist.php + woocommerce/ti-wishlist.php v3.0
   + woocommerce/ti-wishlist-empty.php). Loaded only on /wishlist/.

   CHANGELOG v4.0 (UX redesign):
   - Two-column layout: item list + sticky summary card.
   - One clear primary action ("Add all to cart"); bulk actions are compact
     secondary/ghost buttons, disabled until something is selected.
   - TI's own toolbar (native <select> + 3 amber buttons) is hidden once JS
     runs (html.bps-wl-js); it stays in the DOM because our buttons trigger it.
   - Bigger 4:3 thumbnails, category label, license chip, subtle trash icon
     instead of the white circle.
   - Designed empty state.
   - FIX: removed the old global `.wishlist_products_counter_number
     { color: accent }` rule - it made the header wishlist badge number
     amber-on-amber (invisible) on this page.
   - Replaces the v3.x file AND the temporary wishlist-ADD-TO-END.css
     snippet. Pure ASCII.
   ============================================================ */

.bps-wishlist-page {
    --wl-bg:    var(--ith-bg, #0b0a0e);
    --wl-s1:    var(--ith-s1, #121118);
    --wl-s2:    var(--ith-s2, #1a1924);
    --wl-s3:    var(--ith-s3, #22202e);
    --wl-bd:    var(--ith-bd, #2e2c3e);
    --wl-bdh:   var(--ith-bdh, #3e3c52);
    --wl-acc:   var(--ith-accent, #efb07d);
    --wl-acc-l: var(--ith-accent-light, #f5c89a);
    --wl-acc-g: var(--ith-accent-glow, rgba(239,176,125,0.18));
    --wl-acc-t: rgba(239,176,125,0.07);
    --wl-t1:    var(--ith-text, #f0ede8);
    --wl-t2:    var(--ith-text-secondary, #9a8e7e);
    --wl-t3:    var(--ith-text-muted, #8f8271);
    --wl-ok:    var(--ith-success, #4ade80);
    --wl-err:   var(--ith-error, #f87171);
    --wl-mono:  var(--vp-font-mono, 'IBM Plex Mono', ui-monospace, monospace);
    --wl-disp:  var(--vp-font-display, 'Bricolage Grotesque', sans-serif);
    background:  var(--wl-bg);
    color:       var(--wl-t1);
    font-family: var(--vp-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    min-height: 60vh;
}

/* -- Kill Kadence chrome (same pattern as the other custom pages) -- */
.page-template-page-wishlist .entry-header,
.page-template-page-wishlist .page-title-wrap,
.page-template-page-wishlist .hero-section,
.page-template-page-wishlist .entry-title,
.page-template-page-wishlist h1.page-title,
.page-template-page-wishlist .bps-page-hero,
.page-template-page-wishlist .kadence-breadcrumbs,
.page-template-page-wishlist .woocommerce-breadcrumb { display: none !important; }

.page-template-page-wishlist #primary,
.page-template-page-wishlist .site-main,
.page-template-page-wishlist .content-container,
.page-template-page-wishlist .entry-content-wrap,
.page-template-page-wishlist .entry-content,
.page-template-page-wishlist article.page,
.page-template-page-wishlist .wp-block-group {
    background: transparent !important; background-color: transparent !important;
    box-shadow: none !important; border: none !important; border-radius: 0 !important;
    padding: 0 !important; margin: 0 !important; max-width: 100% !important;
}

/* ============================================================
   HERO - compact; the list is the content, not the banner
   ============================================================ */
.bps-wishlist-hero {
    background: linear-gradient(135deg, var(--wl-s2) 0%, var(--wl-bg) 100%);
    border-bottom: 1px solid var(--wl-bd);
    padding: 48px 24px 36px;
    text-align: center;
}
.bps-wishlist-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--wl-acc); margin-bottom: 12px;
}
.bps-wishlist-eyebrow-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--wl-acc);
    box-shadow: 0 0 8px var(--wl-acc-g);
}
.bps-wishlist-title {
    font-family: var(--wl-disp);
    font-size: clamp(28px, 4vw, 40px); font-weight: 800;
    letter-spacing: -0.02em; margin: 0 0 8px; color: var(--wl-t1); line-height: 1.1;
}
.bps-wishlist-sub {
    font-size: 15px; color: var(--wl-t2); margin: 0; line-height: 1.6;
}

/* ============================================================
   CONTENT + LAYOUT
   ============================================================ */
.bps-wishlist-content {
    max-width: 1160px; margin: 0 auto; padding: 36px 24px 96px;
}
.bps-wishlist-page .tinv-wishlist.bps-wl-redesign {
    background: transparent; border: 0; padding: 0; color: var(--wl-t2);
}
.bps-wl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}
.bps-wl-form { margin: 0; min-width: 0; }

/* TI's internal wishlist-name heading ("Default Wishlist") - meaningless
   with a single wishlist per user. */
.bps-wishlist-page .tinv-wishlist .tinv-header { display: none !important; }

/* TI's own toolbar: kept in the DOM (our buttons trigger it), hidden once
   JS is running. Without JS it stays visible and usable. */
html.bps-wl-js .bps-wl-toolbar {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    overflow: hidden !important; clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important; white-space: nowrap !important;
    margin: -1px !important; padding: 0 !important; border: 0 !important;
}
html:not(.bps-wl-js) [data-bps-wl-proxy],
html:not(.bps-wl-js) .bps-wl-bulk { display: none !important; }

/* No-JS fallback styling for TI's toolbar */
.bps-wl-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 16px;
}
.bps-wl-toolbar .tinvwl-to-left,
.bps-wl-toolbar .tinvwl-to-right { float: none !important; display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   BUTTONS (scoped; !important beats WooCommerce's .button.alt)
   ============================================================ */
.bps-wishlist-page .bps-wl-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 16px !important; margin: 0 !important;
    border-radius: 9px !important;
    font-family: inherit !important; font-size: 13px !important; font-weight: 700 !important;
    line-height: 1 !important; letter-spacing: 0 !important; text-transform: none !important;
    text-decoration: none !important; white-space: nowrap;
    cursor: pointer; box-shadow: none !important;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, opacity .18s ease;
}
.bps-wishlist-page .bps-wl-btn svg { flex-shrink: 0; }
.bps-wishlist-page .bps-wl-btn--primary {
    background: var(--wl-acc) !important; color: #000 !important; border: 1px solid var(--wl-acc) !important;
}
.bps-wishlist-page .bps-wl-btn--primary:hover {
    background: var(--wl-acc-l) !important; border-color: var(--wl-acc-l) !important; color: #000 !important;
    transform: translateY(-1px);
}
.bps-wishlist-page .bps-wl-btn--secondary {
    background: var(--wl-s2) !important; color: var(--wl-t1) !important; border: 1px solid var(--wl-bd) !important;
}
.bps-wishlist-page .bps-wl-btn--secondary:hover:not(:disabled) {
    border-color: var(--wl-acc) !important; color: var(--wl-acc) !important;
}
.bps-wishlist-page .bps-wl-btn--ghost {
    background: transparent !important; color: var(--wl-t2) !important; border: 1px solid transparent !important;
}
.bps-wishlist-page .bps-wl-btn--ghost:hover:not(:disabled) {
    background: rgba(248,113,113,.1) !important; color: var(--wl-err) !important;
}
.bps-wishlist-page .bps-wl-btn:disabled {
    opacity: .4; cursor: not-allowed; transform: none !important;
}
.bps-wishlist-page .bps-wl-btn--block { width: 100%; height: 48px; font-size: 14px !important; }
.bps-wishlist-page .bps-wl-btn i.ftinvwl { display: none; } /* TI icon font not loaded - text/SVG is enough */

/* ============================================================
   CHECKBOXES
   ============================================================ */
.bps-wishlist-page input.bps-wl-check {
    -webkit-appearance: none !important; appearance: none !important;
    width: 18px !important; height: 18px !important; margin: 0 !important; padding: 0 !important;
    flex-shrink: 0; position: relative; cursor: pointer;
    background: var(--wl-s3) !important;
    border: 1.5px solid var(--wl-bdh) !important; border-radius: 5px !important;
    transition: background-color .15s ease, border-color .15s ease;
}
.bps-wishlist-page input.bps-wl-check:hover { border-color: var(--wl-acc) !important; }
.bps-wishlist-page input.bps-wl-check:checked,
.bps-wishlist-page input.bps-wl-check:indeterminate {
    background: var(--wl-acc) !important; border-color: var(--wl-acc) !important;
}
.bps-wishlist-page input.bps-wl-check:checked::after {
    content: ''; position: absolute; left: 5px; top: 1.5px;
    width: 5px; height: 9px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.bps-wishlist-page input.bps-wl-check:indeterminate::after {
    content: ''; position: absolute; left: 3.5px; top: 7px; width: 8px; height: 2px; background: #000; border-radius: 1px;
}

/* ============================================================
   LIST HEADER
   ============================================================ */
.bps-wl-listhead {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
    min-height: 56px; padding: 9px 12px 9px 18px; margin-bottom: 12px;
    background: var(--wl-s1); border: 1px solid var(--wl-bd); border-radius: 12px;
}
.bps-wl-selectall {
    display: inline-flex; align-items: center; gap: 10px; margin: 0;
    font-size: 13px; font-weight: 600; color: var(--wl-t1); cursor: pointer; user-select: none;
}
.bps-wl-count {
    font-size: 13px; color: var(--wl-t3);
    padding-left: 16px; border-left: 1px solid var(--wl-bd);
}
.bps-wl-listhead > .bps-wl-count:first-child { padding-left: 0; border-left: 0; }
.bps-wl-bulk { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bps-wl-selected { font-size: 12px; font-weight: 700; color: var(--wl-acc); margin-right: 6px; }
.bps-wl-selected:empty { display: none; }

/* ============================================================
   ITEM ROWS
   ============================================================ */
.bps-wl-items { display: flex; flex-direction: column; gap: 10px; }

.bps-wl-item {
    display: grid;
    grid-template-columns: 18px 128px minmax(0, 1fr) auto 36px;
    grid-template-areas: "cb thumb main side remove";
    align-items: center;
    gap: 18px;
    padding: 14px 14px 14px 18px;
    background: var(--wl-s1);
    border: 1px solid var(--wl-bd);
    border-radius: 14px;
    transition: border-color .2s ease, background-color .2s ease;
}
.bps-wl-item:hover { border-color: var(--wl-bdh); }
.bps-wl-item.is-selected { border-color: rgba(239,176,125,.45); background: var(--wl-acc-t); }
.bps-wl-item:not(:has(.bps-wl-cb)) {
    grid-template-columns: 128px minmax(0, 1fr) auto 36px;
    grid-template-areas: "thumb main side remove";
}

.bps-wl-cb { grid-area: cb; display: flex; }

.bps-wl-thumb { grid-area: thumb; }
.bps-wl-thumb a { display: block; }
.bps-wl-thumb img {
    display: block; width: 128px !important; height: 96px !important; max-width: none;
    object-fit: cover; border-radius: 10px;
    background: radial-gradient(ellipse at center, var(--wl-s3) 0%, var(--wl-s2) 75%);
    border: 1px solid var(--wl-bd);
    transition: transform .3s ease;
}
.bps-wl-item:hover .bps-wl-thumb img { transform: scale(1.03); }

.bps-wl-main { grid-area: main; min-width: 0; }
.bps-wl-cat {
    display: block; margin-bottom: 4px;
    font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wl-acc);
}
.bps-wl-name a {
    font-family: var(--wl-disp); font-size: 16px; font-weight: 700; line-height: 1.3;
    color: var(--wl-t1); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color .18s ease;
}
.bps-wl-name a:hover { color: var(--wl-acc); }
.bps-wl-name .variation { margin: 4px 0 0; font-size: 12px; color: var(--wl-t3); }
.bps-wl-name .variation dt,
.bps-wl-name .variation dd { display: inline; margin: 0; }

.bps-wl-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px;
    font-size: 12px; color: var(--wl-t3);
}
.bps-wl-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 6px;
    background: var(--wl-s2); border: 1px solid var(--wl-bd);
    font-size: 11px; font-weight: 600; color: var(--wl-t2);
}
.bps-wl-date time { color: inherit; }
.bps-wl-oos {
    font-size: 11px; font-weight: 700; color: var(--wl-err);
    padding: 3px 8px; border-radius: 6px; background: rgba(248,113,113,.1);
}

.bps-wl-side {
    grid-area: side;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.bps-wl-price {
    font-family: var(--wl-mono); font-size: 18px; font-weight: 600; color: var(--wl-t1);
    line-height: 1; white-space: nowrap;
}
.bps-wl-price ins { text-decoration: none; color: var(--wl-acc); }
.bps-wl-price del { font-size: 13px; color: var(--wl-t3); opacity: .8; margin-right: 6px; }
.bps-wl-atc { display: flex; }

.bps-wl-remove { grid-area: remove; display: flex; justify-content: center; align-self: start; }
.bps-wishlist-page .bps-wl-remove button {
    all: unset;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
    color: var(--wl-t3);
    transition: background-color .18s ease, color .18s ease;
}
.bps-wishlist-page .bps-wl-remove button:hover { background: rgba(248,113,113,.12); color: var(--wl-err); }
.bps-wishlist-page .bps-wl-remove button:focus-visible { outline: 2px solid var(--wl-acc); outline-offset: 2px; }

/* ============================================================
   SUMMARY CARD
   ============================================================ */
.bps-wl-summary {
    position: sticky; top: 96px;
    background: var(--wl-s1); border: 1px solid var(--wl-bd); border-radius: 16px;
    padding: 22px;
}
body.admin-bar .bps-wl-summary { top: 128px; }
.bps-wl-summary-title {
    font-family: var(--wl-disp); font-size: 17px; font-weight: 700; color: var(--wl-t1);
    margin: 0 0 14px;
}
.bps-wl-summary-rows { margin: 0 0 14px; padding: 0; }
.bps-wl-summary-rows > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--wl-bd);
}
.bps-wl-summary-rows > div:last-child { border-bottom: 0; }
.bps-wl-summary-rows dt { font-size: 13px; color: var(--wl-t2); margin: 0; }
.bps-wl-summary-rows dd { margin: 0; font-family: var(--wl-mono); font-size: 14px; font-weight: 600; color: var(--wl-t1); }
.bps-wl-summary-total dd { font-size: 24px; color: var(--wl-acc); }
.bps-wl-summary-note {
    font-size: 12px; line-height: 1.6; color: var(--wl-t3);
    margin: 0 0 16px; padding: 10px 12px;
    background: var(--wl-s2); border: 1px solid var(--wl-bd); border-radius: 9px;
}
.bps-wl-summary-link {
    display: block; text-align: center; margin-top: 12px;
    font-size: 13px; font-weight: 600; color: var(--wl-t2); text-decoration: none;
    transition: color .18s ease;
}
.bps-wl-summary-link:hover { color: var(--wl-acc); }
.bps-wl-trust {
    list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--wl-bd);
    display: flex; flex-direction: column; gap: 8px;
}
.bps-wl-trust li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--wl-t3); margin: 0; }
.bps-wl-trust svg { color: var(--wl-t2); flex-shrink: 0; }

/* ============================================================
   EMPTY STATE (ti-wishlist-empty.php)
   ============================================================ */
.bps-wl-empty {
    max-width: 520px; margin: 24px auto 0; padding: 48px 32px;
    text-align: center;
    background: var(--wl-s1); border: 1px solid var(--wl-bd); border-radius: 18px;
}
.bps-wl-empty-icon {
    width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--wl-acc); background: var(--wl-acc-t);
    box-shadow: 0 0 0 8px var(--wl-s1), 0 0 0 9px var(--wl-bd);
}
.bps-wl-empty-title {
    font-family: var(--wl-disp); font-size: 22px; font-weight: 700; color: var(--wl-t1); margin: 0 0 8px;
}
.bps-wishlist-page .bps-wl-empty-text {
    font-size: 14px; line-height: 1.65; color: var(--wl-t2); margin: 0 auto 24px; max-width: 380px;
    background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important;
}
.bps-wishlist-page .bps-wl-empty-text::before { display: none !important; }
.bps-wl-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; }
.bps-wishlist-page .bps-wl-empty-actions .bps-wl-btn { height: 44px; padding: 0 22px !important; }

/* ============================================================
   TI ODDS AND ENDS
   ============================================================ */
/* TI's jQuery blockUI overlay is inline white (#fff, 60%) - a white flash on
   the dark theme during every AJAX action. */
.bps-wishlist-page .blockUI.blockOverlay {
    background: rgba(10, 13, 16, .55) !important; border-radius: 14px;
}
.bps-wishlist-page .tinv-lists-nav { margin-top: 20px; text-align: center; }
.bps-wishlist-page .tinv-lists-nav a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
    padding: 0 12px; margin: 0 3px; border-radius: 8px;
    background: var(--wl-s2); border: 1px solid var(--wl-bd); color: var(--wl-t2); text-decoration: none;
}
.bps-wishlist-page .tinv-lists-nav a:hover { border-color: var(--wl-acc); color: var(--wl-acc); }
.bps-wishlist-page .tinv-wishlist .woocommerce-message,
.bps-wishlist-page .tinv-wishlist .woocommerce-info,
.bps-wishlist-page .tinv-wishlist .woocommerce-error { max-width: none !important; margin: 0 0 16px !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .bps-wl-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
    .bps-wl-item { grid-template-columns: 18px 104px minmax(0, 1fr) auto 36px; gap: 14px; }
    .bps-wl-item:not(:has(.bps-wl-cb)) { grid-template-columns: 104px minmax(0, 1fr) auto 36px; }
    .bps-wl-thumb img { width: 104px !important; height: 78px !important; }
}

@media (max-width: 860px) {
    .bps-wl-layout { grid-template-columns: 1fr; }
    .bps-wl-summary { position: static; }
}

@media (max-width: 640px) {
    .bps-wishlist-hero { padding: 36px 20px 28px; }
    .bps-wishlist-content { padding: 24px 16px 72px; }

    .bps-wl-listhead { padding: 10px 12px; }
    .bps-wl-count { display: none; }
    .bps-wl-bulk { margin-left: auto; }
    .bps-wl-bulk .bps-wl-btn { height: 34px; padding: 0 11px !important; font-size: 12px !important; }

    .bps-wl-item {
        grid-template-columns: 18px 84px minmax(0, 1fr) 34px;
        grid-template-areas:
            "cb   thumb main main"
            "side side  side side";
        gap: 12px;
        padding: 12px;
    }
    .bps-wl-item:not(:has(.bps-wl-cb)) {
        grid-template-columns: 84px minmax(0, 1fr) 34px;
        grid-template-areas:
            "thumb main main"
            "side  side side";
    }
    /* remove button floats in the top-right corner on mobile */
    .bps-wl-item { position: relative; }
    .bps-wl-remove { position: absolute; top: 8px; right: 8px; }
    .bps-wl-main { padding-right: 34px; }
    .bps-wl-thumb img { width: 84px !important; height: 63px !important; }
    .bps-wl-name a { font-size: 14px; }
    .bps-wl-side {
        flex-direction: row; align-items: center; justify-content: space-between;
        padding-top: 12px; border-top: 1px solid var(--wl-bd);
    }
    .bps-wl-empty { padding: 36px 20px; }
}