/**
 * NexaiIT Wishlist Pro - Compatible Edition
 * Professional Styling
 * Version: 3.0.0
 */

/* ==================== CONTAINER ==================== */
.nexai-wishlist-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==================== HEADER ==================== */
.nexai-wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.nexai-wishlist-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nexai-wishlist-title svg {
    color: #ef4444;
}

.nexai-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.nexai-count {
    font-size: 20px;
    font-weight: 700;
    margin-right: 5px;
}

/* ==================== LOADING ==================== */
.nexai-loading {
    text-align: center;
    padding: 80px 20px;
}

.nexai-loader {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: nexai-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes nexai-spin {
    to { transform: rotate(360deg); }
}

.nexai-loading p {
    color: #6b7280;
    font-size: 16px;
}

/* ==================== EMPTY STATE ==================== */
.nexai-empty {
    text-align: center;
    padding: 80px 20px;
}

.nexai-empty svg {
    margin-bottom: 20px;
    opacity: 0.6;
}

.nexai-empty h3 {
    font-size: 24px;
    color: #374151;
    margin: 0 0 10px;
    font-weight: 600;
}

.nexai-empty p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* ==================== GRID ==================== */
.nexai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

[data-columns="1"] .nexai-grid { grid-template-columns: 1fr; }
[data-columns="2"] .nexai-grid { grid-template-columns: repeat(2, 1fr); }
[data-columns="4"] .nexai-grid { grid-template-columns: repeat(4, 1fr); }

/* ==================== CARD ==================== */
.nexai-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nexai-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.nexai-card.removing {
    animation: nexai-remove 0.4s ease forwards;
}

@keyframes nexai-remove {
    to {
        opacity: 0;
        transform: scale(0.8);
        height: 0;
        margin: 0;
    }
}

/* ==================== IMAGE ==================== */
.nexai-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f3f4f6;
}

.nexai-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.nexai-card:hover .nexai-image img {
    transform: scale(1.05);
}

.nexai-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
}

.nexai-rating span {
    color: #1f2937;
    font-weight: 600;
}

/* ==================== CONTENT ==================== */
.nexai-content {
    padding: 20px;
}

.nexai-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nexai-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.nexai-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== FOOTER ==================== */
.nexai-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.nexai-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nexai-price .label {
    font-size: 12px;
    color: #6b7280;
}

.nexai-price .amount {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

/* ==================== BUTTONS ==================== */
.nexai-actions {
    display: flex;
    gap: 10px;
}

.nexai-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nexai-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nexai-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.nexai-remove {
    background: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.nexai-remove:hover {
    background: #ef4444;
    color: white;
}

/* ==================== PAGINATION ==================== */
.nexai-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.nexai-page-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.nexai-page-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.nexai-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nexai-page-info {
    color: #6b7280;
    font-weight: 600;
}

/* ==================== ICON (NAVBAR) ==================== */
.nexai-wishlist-icon {
    display: inline-block;
    position: relative;
}

.nexai-wishlist-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.nexai-wishlist-icon a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nexai-icon-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: nexai-pulse 2s ease-in-out infinite;
}

@keyframes nexai-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==================== NOTIFICATION ==================== */
.nexai-notify {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: #1f2937;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: bottom 0.3s;
    font-weight: 500;
}

.nexai-notify.show {
    bottom: 30px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .nexai-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .nexai-wishlist-wrapper {
        padding: 20px 15px;
    }
    
    .nexai-wishlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .nexai-wishlist-title {
        font-size: 24px;
    }
    
    .nexai-grid {
        grid-template-columns: 1fr !important;
    }
    
    .nexai-image {
        height: 180px;
    }
    
    .nexai-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .nexai-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .nexai-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== ERROR ==================== */
.nexai-error {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
    font-size: 16px;
}

/* ==================== DARK MODE ==================== */
@media (prefers-color-scheme: dark) {
    .nexai-wishlist-wrapper {
        color: #e5e7eb;
    }
    
    .nexai-wishlist-title {
        color: #f9fafb;
    }
    
    .nexai-card {
        background: #1f2937;
    }
    
    .nexai-title {
        color: #f9fafb;
    }
    
    .nexai-page-btn {
        background: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }
}

/* ==================== UTILITIES ==================== */
.nexai-hidden {
    display: none !important;
}
