/* Wishlist page: the big Motta page-header banner is filtered out for this
   page (see inc/wishlist.php), so .pf-page__content picks up its own top
   spacing here instead of leaning on the removed hero. Product cards reuse
   .pf-product-card from components.css; this file only adds the bits that
   are unique to the wishlist (bulk-select toolbar, item checkbox, empty
   state, share/footer polish). */

.wcboost-wishlist-page .pf-page__content {
    max-width: min(1320px, 94vw);
    padding-top: clamp(28px, 4vw, 44px);
}

.wcboost-wishlist-page .pf-page__content > * + * { margin-top: 0; }

/* ---------- Bulk-select toolbar ---------- */

.pf-wishlist-toolbar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 16px 20px;
    position: sticky;
    top: 12px;
    z-index: 5;
}

.pf-wishlist-toolbar--busy { opacity: 0.6; pointer-events: none; }

.pf-wishlist-toolbar__summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.pf-wishlist-toolbar__select-all {
    align-items: center;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    user-select: none;
}

.pf-wishlist-toolbar__select-all input {
    accent-color: var(--primary);
    height: 17px;
    margin: 0;
    width: 17px;
}

.pf-wishlist-toolbar__meta {
    align-items: baseline;
    color: var(--text-light);
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
}

.pf-wishlist-toolbar__count { color: var(--text); font-weight: 600; }
.pf-wishlist-toolbar__total { color: var(--primary); font-weight: 700; }
.pf-wishlist-toolbar__divider { color: var(--border); }

.pf-wishlist-toolbar__actions { align-items: center; display: flex; gap: 10px; }

.pf-wishlist-toolbar__selected-count {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    min-width: 0;
}

.pf-wishlist-toolbar__move,
.pf-wishlist-toolbar__remove {
    align-items: center;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    padding: 10px 18px;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.pf-wishlist-toolbar__move {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
}

.pf-wishlist-toolbar__move:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }

.pf-wishlist-toolbar__remove {
    background: transparent;
    border: 1px solid var(--border);
    color: #C0334D;
}

.pf-wishlist-toolbar__remove:hover:not(:disabled) {
    background: #FDEEF1;
    border-color: #C0334D;
}

.pf-wishlist-toolbar__move:disabled,
.pf-wishlist-toolbar__remove:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

@media (max-width: 640px) {
    .pf-wishlist-toolbar { position: static; }
    .pf-wishlist-toolbar__actions { flex-basis: 100%; justify-content: flex-end; }
}

/* ---------- Per-card select checkbox ---------- */

.pf-product-card__select {
    cursor: pointer;
    display: inline-flex;
    left: 10px;
    position: absolute;
    top: 10px;
    z-index: 2;
}

.pf-product-card__select-input {
    height: 100%;
    left: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.pf-product-card__select-box {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1.5px solid rgba(36, 18, 95, 0.18);
    border-radius: 7px;
    color: transparent;
    display: inline-flex;
    font-size: 11px;
    height: 24px;
    justify-content: center;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    width: 24px;
}

.pf-product-card__select-input:checked ~ .pf-product-card__select-box,
.pf-product-card__select-input:focus-visible ~ .pf-product-card__select-box {
    border-color: var(--primary);
}

.pf-product-card__select-input:checked ~ .pf-product-card__select-box {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.pf-product-card__select-input:focus-visible ~ .pf-product-card__select-box {
    outline: 3px solid rgba(var(--primary-rgb), 0.35);
    outline-offset: 2px;
}

/* Card fade-out when removed via the toolbar (see assets/js/wishlist.js). */
.pf-product-card--removing {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
    transition: opacity 200ms ease, transform 200ms ease;
}

/* ---------- Empty state ---------- */

.wcboost-wishlist-page .wishlist-empty {
    background: var(--surface-tint);
    border-radius: var(--radius);
    padding: clamp(40px, 6vw, 64px) 24px;
    text-align: center;
}

.wcboost-wishlist-page .wishlist-empty .woocommerce-info {
    background: none;
    border: 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.wcboost-wishlist-page .wishlist-empty .woocommerce-info::before { display: none; }

.wcboost-wishlist-page .return-to-shop { margin-top: 18px; text-align: center; }

.wcboost-wishlist-page .return-to-shop .button {
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-weight: 700;
    padding: 12px 26px;
    transition: background-color 180ms ease, transform 180ms ease;
}

.wcboost-wishlist-page .return-to-shop .button:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ---------- Update-wishlist bar & footer ---------- */

.pf-wishlist-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.pf-wishlist-actions .pf-product-card__cart { max-width: 240px; }

.wcboost-wishlist-footer { margin-top: 36px; }

/* Deliberately no .wishlist-share rules here: Motta's own woocommerce.css
   already ships a complete brand-colored share-button component (64px
   circular icons, column layout) scoped to body.woocommerce-wishlist. An
   earlier version of this file redefined .wishlist-share__buttons a with a
   fixed 38px box, which fought that component's flex-column layout instead
   of replacing it and made every icon/label overflow its slot. */
