/* ============================================================
   WC Auction Bidding — Wishlist Styles v8.2
   ============================================================ */

/* ============================================================
   HEADER ICON WRAPPER
   ============================================================ */
#wcab-wl-header-icon {
    position:    relative;
    display:     inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor:      pointer;
    color:       #fff;
    padding:     6px 10px;
    user-select: none;
    z-index:     9999;
}
#wcab-wl-header-icon svg {
    width:  28px;
    height: 28px;
    color:  rgba(255,255,255,0.75);
    display: block;
    transition: color .2s, transform .2s;
}
#wcab-wl-header-icon:hover svg,
#wcab-wl-header-icon.active svg {
    color: #fff;
    transform: scale(1.15);
}

/* ---- Badge ---- */
#wcab-wl-count {
    position:    absolute;
    top:         -4px;
    right:       0px;
    min-width:   20px;
    height:      20px;
    background:  rgba(255,255,255,0.3);
    border:      2px solid rgba(255,255,255,0.5);
    color:       #fff;
    border-radius: 999px;
    font-size:   11px;
    font-weight: 800;
    line-height: 16px;
    text-align:  center;
    padding:     0 4px;
    pointer-events: none;
    transition:  background .2s;
}
#wcab-wl-count.has-items {
    background:  #f0a500;
    border-color: #f0a500;
}
#wcab-wl-count.wcab-wl-count-pulse {
    animation: wcab-wl-pop .35s ease-out;
}
@keyframes wcab-wl-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* ============================================================
   DROPDOWN PANEL — hidden by default, .open shows it
   ============================================================ */
#wcab-wl-dropdown {
    display:       none;
    position:      absolute;
    top:           calc(100% + 12px);
    right:         0;
    width:         360px;
    max-height:    520px;
    background:    #fff;
    border-radius: 12px;
    box-shadow:    0 12px 40px rgba(0,0,0,.22);
    z-index:       99999;
    flex-direction: column;
    overflow:      hidden;
    border:        1px solid #e0e0e0;
    /* Arrow pointer */
}
#wcab-wl-dropdown::before {
    content:   '';
    position:  absolute;
    top:       -8px;
    right:     20px;
    width:     14px;
    height:    14px;
    background: #1a2b4a;
    transform: rotate(45deg);
    border-top:  1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
}

/* JS adds .open to show it */
#wcab-wl-dropdown.open {
    display: flex !important;
}

/* ---- Dropdown Header ---- */
.wcab-wl-dropdown-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         14px 18px;
    background:      #1a2b4a;
    color:           #fff;
    font-size:       15px;
    font-weight:     700;
    flex-shrink:     0;
    letter-spacing:  .02em;
}
.wcab-wl-close-btn {
    background:  transparent;
    border:      none;
    cursor:      pointer;
    font-size:   20px;
    color:       rgba(255,255,255,.7);
    line-height: 1;
    padding:     0;
    width:       28px;
    height:      28px;
    display:     flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition:  background .15s, color .15s;
}
.wcab-wl-close-btn:hover {
    background: rgba(255,255,255,.15);
    color:      #fff;
}

/* ---- Dropdown Body (scrollable) ---- */
#wcab-wl-dropdown-body {
    overflow-y:  auto;
    flex:        1;
    padding:     4px 0;
    max-height:  400px;
    scrollbar-width: thin;
}
#wcab-wl-dropdown-body::-webkit-scrollbar { width: 4px; }
#wcab-wl-dropdown-body::-webkit-scrollbar-track { background: #f5f5f5; }
#wcab-wl-dropdown-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* ---- Dropdown Footer ---- */
.wcab-wl-dropdown-footer {
    border-top:  1px solid #eee;
    padding:     12px 18px;
    text-align:  center;
    flex-shrink: 0;
    background:  #f8f8f8;
}
.wcab-wl-view-all {
    font-size:   13px;
    font-weight: 700;
    color:       #5b50d6 !important;
    text-decoration: none !important;
    transition:  color .15s;
}
.wcab-wl-view-all:hover { color: #4740b8 !important; text-decoration: underline !important; }

/* Empty + Loading states */
.wcab-wl-empty,
.wcab-wl-loading {
    text-align:  center;
    color:       #aaa;
    font-size:   14px;
    padding:     36px 20px;
    margin:      0;
}
.wcab-wl-empty::before {
    content:  '♡';
    display:  block;
    font-size: 40px;
    color:    #ddd;
    margin-bottom: 10px;
}

/* ============================================================
   WISHLIST ITEM — inside dropdown
   ============================================================ */
.wcab-wl-item {
    display:       flex;
    align-items:   center;
    gap:           12px;
    padding:       12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition:    background .15s;
}
.wcab-wl-item:last-child { border-bottom: none; }
.wcab-wl-item:hover      { background: #f9f9ff; }

/* Product image */
.wcab-wl-item-img-link {
    flex-shrink: 0;
    display:     block;
    border-radius: 8px;
    overflow:    hidden;
    border:      1px solid #eee;
}
.wcab-wl-item img {
    width:      64px;
    height:     64px;
    object-fit: cover;
    display:    block;
}

/* Item body */
.wcab-wl-item-body {
    flex:           1;
    min-width:      0;
    display:        flex;
    flex-direction: column;
    gap:            4px;
}

/* Product name */
.wcab-wl-item-name {
    font-size:     13px;
    font-weight:   700;
    color:         #1a1a1a !important;
    text-decoration: none !important;
    display:       -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow:      hidden;
    line-height:   1.35;
}
.wcab-wl-item-name:hover { color: #5b50d6 !important; }

/* Price */
.wcab-wl-item-price {
    font-size:   13px;
    font-weight: 700;
    color:       #5b50d6;
}
.wcab-wl-item-price .price,
.wcab-wl-item-price .amount,
.wcab-wl-item-price ins .amount {
    font-size:   13px !important;
    font-weight: 700 !important;
    color:       #5b50d6 !important;
}
.wcab-wl-item-price del { opacity: .5; font-size: 11px; }

/* Action buttons row */
.wcab-wl-item-actions {
    display:     flex;
    align-items: center;
    gap:         6px;
    margin-top:  2px;
}

/* Move to cart / Bid button */
.wcab-wl-item-move {
    font-size:     11px !important;
    padding:       5px 10px !important;
    border-radius: 5px !important;
    font-weight:   700 !important;
    white-space:   nowrap;
    cursor:        pointer;
    transition:    filter .15s;
    line-height:   1.3 !important;
    border:        none !important;
    text-decoration: none !important;
}
.wcab-wl-item-move:hover  { filter: brightness(.9); }
.wcab-wl-item-move:disabled { opacity: .5; cursor: not-allowed; }

/* Remove ✕ button */
.wcab-wl-item-remove {
    background:  transparent;
    border:      none;
    cursor:      pointer;
    color:       #ccc;
    font-size:   16px;
    line-height: 1;
    padding:     4px 6px;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 50%;
    transition:  color .15s, background .15s;
}
.wcab-wl-item-remove:hover {
    color:      #e74c3c;
    background: rgba(231,76,60,.08);
}

/* ============================================================
   FULL PAGE (shortcode [wcab_wishlist])
   ============================================================ */
.wcab-wl-page h2 { margin-bottom: 20px; }
.wcab-wl-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap:                   20px;
}
.wcab-wl-item--page {
    flex-direction: column;
    border:         1px solid #e2e2e2;
    border-radius:  10px;
    padding:        0;
    overflow:       hidden;
    gap:            0;
    box-shadow:     0 2px 8px rgba(0,0,0,.06);
    transition:     box-shadow .2s, transform .2s;
    background:     #fff;
    align-items:    stretch;
}
.wcab-wl-item--page:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.wcab-wl-item--page .wcab-wl-item-img-link { width: 100%; border-radius: 0; border: none; border-bottom: 1px solid #eee; }
.wcab-wl-item--page img { width: 100%; height: 180px; object-fit: cover; }
.wcab-wl-item--page .wcab-wl-item-body { padding: 12px 14px 14px; }
.wcab-wl-item--page .wcab-wl-item-name { font-size: 14px; }
.wcab-wl-item--page .wcab-wl-item-move { font-size: 13px !important; padding: 7px 14px !important; flex: 1; }

/* ============================================================
   WISHLIST TOGGLE BUTTON (♡ next to Buy Now)
   ============================================================ */
.wcab-wl-btn {
    display:       inline-flex !important;
    align-items:   center !important;
    gap:           5px !important;
    background:    transparent !important;
    border:        1.5px solid #ccc !important;
    border-radius: 5px !important;
    color:         #999 !important;
    font-size:     13px !important;
    font-weight:   600 !important;
    padding:       8px 14px !important;
    cursor:        pointer;
    transition:    all .2s;
    white-space:   nowrap;
    line-height:   1.2 !important;
    box-shadow:    none !important;
    text-decoration: none !important;
}
.wcab-wl-btn svg { color: #ccc; transition: color .2s, transform .2s; flex-shrink: 0; }
.wcab-wl-btn:hover,
.wcab-wl-btn.in-wishlist {
    border-color: #e91e63 !important;
    color:        #e91e63 !important;
    background:   rgba(233,30,99,.06) !important;
}
.wcab-wl-btn:hover svg,
.wcab-wl-btn.in-wishlist svg { color: #e91e63; }
.wcab-wl-btn.in-wishlist svg { fill: #e91e63; transform: scale(1.2); }

/* ============================================================
   FAB FALLBACK (fixed button if not in Elementor header)
   ============================================================ */
#wcab-wl-header-icon.wcab-wl-fab {
    position:      fixed !important;
    bottom:        90px !important;
    right:         20px !important;
    top:           auto !important;
    left:          auto !important;
    width:         54px !important;
    height:        54px !important;
    border-radius: 50% !important;
    background:    #1a2b4a !important;
    box-shadow:    0 4px 20px rgba(0,0,0,.3) !important;
    z-index:       99998 !important;
    padding:       0 !important;
    border:        3px solid rgba(255,255,255,.2) !important;
}
#wcab-wl-header-icon.wcab-wl-fab #wcab-wl-dropdown {
    bottom:   64px;
    top:      auto;
    right:    0;
}
#wcab-wl-header-icon.wcab-wl-fab #wcab-wl-dropdown::before { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    #wcab-wl-dropdown {
        width:      calc(100vw - 24px);
        right:      -10px;
        max-height: 70vh;
    }
    #wcab-wl-dropdown::before { right: 30px; }
    .wcab-wl-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 400px) {
    .wcab-wl-grid { grid-template-columns: 1fr; }
    #wcab-wl-dropdown { width: 100vw; right: -16px; border-radius: 0; }
}
