/* Compare Feature CSS */

.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 20px;
    z-index: 1050;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.compare-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.compare-count {
    color: white;
    font-weight: bold;
    margin-right: 20px;
}

.compare-items-preview {
    display: flex;
    gap: 10px;
    flex-grow: 1;
}

.compare-item-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-item-preview i {
    color: #ccc;
    font-size: 1.5rem;
}

.compare-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-actions {
    display: flex;
    gap: 10px;
}

/* Compare Button on Cards */
.compare-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.compare-btn:hover,
.compare-btn.active {
    background: #667eea;
    color: white;
}

.compare-btn.active {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Compare Page */
.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 15px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.compare-table th {
    background: #f8f9fa;
    font-weight: 600;
    width: 150px;
}

.compare-table .compare-header {
    text-align: center;
}

.compare-table .compare-image {
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    width: 100%;
}

.compare-table .highlight {
    background: rgba(102, 126, 234, 0.1);
    font-weight: bold;
}

.compare-table .best-value {
    position: relative;
}

.compare-table .best-value::after {
    content: "Best";
    position: absolute;
    top: 5px;
    right: 5px;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 10px;
}

/* Dark mode */
[data-theme="dark"] .compare-table th {
    background: #2a2a2a;
}

[data-theme="dark"] .compare-table td {
    border-color: #444;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .compare-bar-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .compare-items-preview {
        justify-content: center;
    }

    .compare-item-preview {
        width: 40px;
        height: 40px;
    }
}