/**
 * استایل‌های Frontend افزونه لارا
 * 
 * @package Lara_Features
 */

/* =====================================
   Wishlist Button
   ===================================== */
.wishlist-btn {
    position: relative;
    background: white;
    border: 2px solid var(--neutral-200);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    border-color: var(--error);
    background: var(--error);
    color: white;
    transform: scale(1.1);
}

.wishlist-btn.added {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.wishlist-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* =====================================
   Wishlist Page
   ===================================== */
.lara-wishlist {
    padding: var(--spacing-2xl) 0;
}

.wishlist-empty {
    padding: var(--spacing-4xl);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.wishlist-products {
    margin-top: var(--spacing-2xl);
}

/* =====================================
   Compare
   ===================================== */
.compare-table-wrapper {
    overflow-x: auto;
    margin-top: var(--spacing-2xl);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.compare-table th,
.compare-table td {
    padding: var(--spacing-lg);
    border: 1px solid var(--neutral-200);
    text-align: center;
}

.compare-table thead th {
    background: var(--primary-50);
    font-weight: bold;
    color: var(--primary-700);
}

.compare-table tbody tr:nth-child(even) {
    background: var(--neutral-50);
}

.compare-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.compare-product-header img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

/* =====================================
   Notifications
   ===================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    z-index: 99999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-right: 4px solid var(--success);
}

.notification-error {
    border-right: 4px solid var(--error);
}

.notification-info {
    border-right: 4px solid var(--info);
}

.notification-warning {
    border-right: 4px solid var(--warning);
}

/* =====================================
   Search Results
   ===================================== */
.search-results-list {
    margin-top: var(--spacing-md);
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.search-result-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--neutral-200);
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--neutral-50);
}

.result-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    flex: 1;
}

.result-info h4 {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

.result-info h4 a {
    color: var(--neutral-900);
}

.result-info h4 a:hover {
    color: var(--primary-600);
}

.result-price {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-600);
}

/* =====================================
   Back to Top
   ===================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-700);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

/* =====================================
   Loading States
   ===================================== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--neutral-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================
   Modal
   ===================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-modal);
    animation: fade-in 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--neutral-500);
    line-height: 1;
    padding: var(--spacing-sm);
}

.modal-close:hover {
    color: var(--neutral-900);
}

/* =====================================
   Responsive
   ===================================== */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        left: 20px;
    }
    
    .compare-table {
        font-size: 14px;
    }
    
    .compare-table th,
    .compare-table td {
        padding: var(--spacing-sm);
    }
}

