/**
 * Picks Curated Wishlist CSS
 * Styles for wishlist buttons, cards, and notifications
 * 
 * File: /wp-content/themes/picks-curated-theme/src/wishlist.css
 */

/* ==========================================
   WISHLIST BUTTON
   ========================================== */

.pc-wishlist-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.pc-wishlist-btn:hover {
    border-color: #f87171;
    background: #fef2f2;
    transform: scale(1.1);
}

.pc-wishlist-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: all 0.2s ease;
}

.pc-wishlist-btn .heart-empty {
    color: #9ca3af;
}

.pc-wishlist-btn:hover .heart-empty {
    color: #f87171;
}

.pc-wishlist-btn .heart-filled {
    display: none;
    color: #ef4444;
}

/* Saved state */
.pc-wishlist-btn.is-saved {
    background: #fef2f2;
    border-color: #fecaca;
}

.pc-wishlist-btn.is-saved .heart-empty {
    display: none;
}

.pc-wishlist-btn.is-saved .heart-filled {
    display: block;
}

.pc-wishlist-btn.is-saved:hover {
    background: #fee2e2;
}

/* Loading state */
.pc-wishlist-btn.is-loading {
    pointer-events: none;
}

.pc-wishlist-btn.is-loading svg {
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Button on product cards - absolute positioning */
.product-card .pc-wishlist-btn,
.pc-product-card .pc-wishlist-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Larger button variant */
.pc-wishlist-btn-lg {
    width: 3rem;
    height: 3rem;
}

.pc-wishlist-btn-lg svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Button with text */
.pc-wishlist-btn-text {
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    gap: 0.5rem;
}

.pc-wishlist-btn-text svg {
    width: 1.125rem;
    height: 1.125rem;
}

.pc-wishlist-btn-text span {
    font-size: 0.875rem;
    font-weight: 500;
}

.pc-wishlist-btn-text.is-saved span::after {
    content: 'Saved';
}

.pc-wishlist-btn-text:not(.is-saved) span::after {
    content: 'Save';
}

/* ==========================================
   WISHLIST COUNTER (Header)
   ========================================== */

.pc-wishlist-counter {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    background: #ef4444;
    border-radius: 9999px;
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
}

/* ==========================================
   WISHLIST GRID (Dashboard)
   ========================================== */

.pc-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* ==========================================
   WISHLIST ITEM CARD
   ========================================== */

.pc-wishlist-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.pc-wishlist-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pc-wishlist-item-image {
    position: relative;
    height: 160px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pc-wishlist-item-image img {
    max-height: 140px;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pc-wishlist-item:hover .pc-wishlist-item-image img {
    transform: scale(1.05);
}

.pc-wishlist-item-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pc-wishlist-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.pc-wishlist-badge-price-drop {
    background: #dcfce7;
    color: #166534;
}

.pc-wishlist-badge-price-up {
    background: #fef2f2;
    color: #991b1b;
}

.pc-wishlist-remove-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pc-wishlist-item:hover .pc-wishlist-remove-btn {
    opacity: 1;
}

.pc-wishlist-remove-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.pc-wishlist-remove-btn svg {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.pc-wishlist-remove-btn:hover svg {
    color: #dc2626;
}

.pc-wishlist-item-content {
    padding: 1rem;
}

.pc-wishlist-item-category {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.pc-wishlist-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.pc-wishlist-item-title a {
    color: inherit;
    text-decoration: none;
}

.pc-wishlist-item-title a:hover {
    color: #2563eb;
}

.pc-wishlist-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.pc-wishlist-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

.pc-wishlist-item-original-price {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.pc-wishlist-price-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.pc-wishlist-price-change.down {
    color: #059669;
}

.pc-wishlist-price-change.up {
    color: #dc2626;
}

.pc-wishlist-price-change svg {
    width: 0.875rem;
    height: 0.875rem;
}

.pc-wishlist-item-retailer {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.pc-wishlist-item-actions {
    display: flex;
    gap: 0.5rem;
}

.pc-wishlist-buy-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-wishlist-buy-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: translateY(-1px);
    color: white;
}

.pc-wishlist-buy-btn svg {
    width: 1rem;
    height: 1rem;
}

.pc-wishlist-alert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-wishlist-alert-btn:hover {
    background: #e5e7eb;
}

.pc-wishlist-alert-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #6b7280;
}

.pc-wishlist-alert-btn.has-alert {
    background: #fef3c7;
}

.pc-wishlist-alert-btn.has-alert svg {
    color: #d97706;
}

/* ==========================================
   WISHLIST EMPTY STATE
   ========================================== */

.pc-wishlist-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.pc-wishlist-empty-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-wishlist-empty-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #f87171;
}

.pc-wishlist-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.pc-wishlist-empty p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pc-wishlist-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: #2563eb;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-wishlist-empty-btn:hover {
    background: #1d4ed8;
    color: white;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.pc-wishlist-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: #1f2937;
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.pc-wishlist-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pc-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-toast-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pc-toast-success .pc-toast-icon {
    color: #34d399;
}

.pc-toast-error .pc-toast-icon {
    color: #f87171;
}

.pc-toast-warning .pc-toast-icon {
    color: #fbbf24;
}

.pc-toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ==========================================
   LIMIT MODAL
   ========================================== */

.pc-limit-modal {
    position: relative;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
}

.pc-modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-modal-close-btn:hover {
    background: #e5e7eb;
}

.pc-modal-close-btn svg {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.pc-limit-modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-limit-modal-icon svg {
    width: 2rem;
    height: 2rem;
    color: #ef4444;
}

.pc-limit-modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.pc-limit-modal p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.pc-limit-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pc-btn-upgrade {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-btn-upgrade:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    color: white;
}

.pc-btn-secondary {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-btn-secondary:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
    .pc-wishlist-grid {
        grid-template-columns: 1fr;
    }

    .pc-wishlist-toast {
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
    }

    .pc-wishlist-toast.show {
        transform: translateX(0) translateY(0);
    }

    .pc-wishlist-item-actions {
        flex-direction: column;
    }

    .pc-wishlist-alert-btn {
        width: 100%;
        height: auto;
        padding: 0.625rem;
    }
}