/* Product Comparison Styles */

.compare-header {
    text-align: center;
    margin-bottom: 30px;
}

.compare-header h1 {
    font-size: 2.5rem;
    color: #333;
}

.compare-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px;
}

#productSearch {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 30px;
    outline: none;
    transition: border-color 0.3s;
}


#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 15px;
    align-self: flex-start;
}

.search-result-details {
    flex: 1;
}

.search-result-details .name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.search-result-details .brand {
    color: #007bff;
    font-size: 14px;
    margin-bottom: 4px;
}

.search-result-details .description {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.search-result-details .price {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.search-result-details .specs-preview {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.compare-container-grid {
        display: grid;
    place-content: center;
    grid-template-columns: repeat(auto-fit, minmax(375px, 0fr));
    gap: 7px;
    margin-top: 30px;
}

.product-compact-card {
    background: white;
    height: fit-content;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: auto;
    justify-self: center;
    max-width: 400px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-compact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background: #c82333;
}

.product-compact-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-compact-card h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}

.product-compact-card .brand {
    color: #007bff;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.product-compact-card .price {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin: 0 0 15px 0;
}

.product-compact-card .description {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.product-compact-card .specs {
    margin-bottom: 20px;
}

.product-compact-card .specs p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.product-compact-card .specs strong {
    color: #333;
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 30px;
}

.btn-clear-all {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.btn-clear-all:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-clear-all:active {
    transform: translateY(0);
}

#emptyState {
text-align: center;
    padding: 60px 20px;
    background: #f2ffe857;
    border-radius: 23px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#emptyState .empty-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

#emptyState h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

#emptyState p {
    font-size: 16px;
    color: #666;
    margin-bottom: 0;
}



@keyframes popupIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes popupOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* Notification exit animation class */
.notification-message.removing {
    animation: popupOut 0.3s ease forwards !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .compare-container-grid {
        grid-template-columns: 1fr;
    }
    
    .compare-header h1 {
        font-size: 2rem;
    }
    
    .search-result-item {
        padding: 10px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 50px;
    }
    
    .search-result-details .name {
        font-size: 14px;
    }
    
    .search-result-details .brand,
    .search-result-details .description,
    .search-result-details .price {
        font-size: 12px;
    }
}


