/* Compare Styles */

/* Hide old bottom bar */
#compare-bar {
    display: none !important;
}

/* Single Product Compare Button */
.single-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #ddd;
    color: #333;
    padding: 10px 20px;
    border-radius: 4px;
    /* Standard radius */
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    /* Space from Add to Cart */
    transition: all 0.2s ease;
    width: 100%;
    /* Full width or auto depending on layout */
    justify-content: center;
}

.single-compare-btn:hover {
    background: #f9f9f9;
    border-color: #999;
}

.single-compare-btn.active {
    background: #f0f7f0;
    border-color: #4CAF50;
    color: #2e7d32;
}

.single-compare-btn .material-symbols-outlined {
    font-size: 20px;
}

/* Compare Page Table Polish */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.comparison-table thead th {
    background: #fff;
    border-bottom: 2px solid #eee;
}

.comparison-table .product-header {
    text-align: center;
}

.comparison-table .product-header img {
    margin-bottom: 15px;
    max-height: 150px;
    object-fit: contain;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Responsive Table */
@media (max-width: 768px) {
    .compare-page .container {
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 600px;
    }
}

/* Search Modal Styles (Kept for potential re-use) */
.compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.compare-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

#compare-search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.result-image img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 15px;
}

.result-info {
    flex: 1;
}

.result-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.result-price {
    font-size: 14px;
    color: #666;
}

.result-add {
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.result-add.added {
    background: #4CAF50;
}