/* EPSS Product Compare Styles */

/* Compare Button (archive) */
.epss-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}
.epss-compare-btn:hover {
    border-color: #2e7d32;
    color: #2e7d32;
}
.epss-compare-btn.active {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}
.epss-compare-btn.active svg { stroke: #fff; }

/* Compare Button (single product) */
.epss-compare-btn-single {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}
.epss-compare-btn-single:hover { border-color: #2e7d32; color: #2e7d32; }
.epss-compare-btn-single.active { background: #e8f5e9; border-color: #2e7d32; color: #2e7d32; }

/* Floating Compare Bar */
.epss-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #2e7d32;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 12px 20px;
    transition: transform 0.3s ease;
}
.epss-compare-bar.hidden { transform: translateY(100%); pointer-events: none; }
.epss-compare-bar-inner { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto; }
.epss-compare-bar-items { display: flex; gap: 8px; flex: 1; }
.epss-compare-bar-item {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}
.epss-compare-bar-item img { width: 100%; height: 100%; object-fit: cover; }
.epss-compare-bar-item.empty {
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; color: #aaa; font-size: 20px;
    border-style: dashed;
}
.epss-compare-bar-remove {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #c62828; color: #fff; border: none;
    font-size: 12px; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.epss-compare-bar-actions { display: flex; gap: 8px; align-items: center; }
.epss-compare-bar-view {
    background: #2e7d32 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none;
    font-size: 14px;
}
.epss-compare-bar-view:hover { background: #1b5e20 !important; }
.epss-compare-bar-clear {
    background: none; border: none; color: #888;
    cursor: pointer; font-size: 12px; text-decoration: underline;
}

/* Compare Table (full page) */
.epss-compare-table-wrap { overflow-x: auto; margin: 20px 0; }
.epss-compare-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.epss-compare-table th, .epss-compare-table td { padding: 12px 16px; border-bottom: 1px solid #e0e0e0; text-align: center; vertical-align: top; }
.epss-compare-table th { background: #f8f8f8; }
.epss-compare-label-col { width: 140px; text-align: left !important; }
.epss-compare-label { font-weight: 600; color: #333; text-align: left !important; font-size: 13px; }
.epss-compare-product-col { position: relative; min-width: 180px; }
.epss-compare-product-col img { width: 120px; height: 120px; object-fit: contain; border-radius: 8px; }
.epss-compare-name { display: block; margin-top: 8px; font-weight: 600; font-size: 13px; color: #333; text-decoration: none; }
.epss-compare-name:hover { color: #2e7d32; }
.epss-compare-remove {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px; border-radius: 50%;
    background: #f5f5f5; border: 1px solid #ddd;
    font-size: 16px; cursor: pointer; color: #888;
}
.epss-compare-remove:hover { background: #ffebee; color: #c62828; border-color: #c62828; }
.epss-compare-instock { color: #2e7d32; font-weight: 600; }
.epss-compare-outofstock { color: #c62828; }
.epss-compare-view-btn { background: #2e7d32 !important; color: #fff !important; border: none !important; font-size: 13px !important; }
.epss-compare-empty { text-align: center; padding: 60px 20px; }
.epss-compare-empty h2 { margin-bottom: 12px; }

/* Toast notification */
.epss-compare-toast {
    position: fixed; bottom: 80px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333; color: #fff;
    padding: 10px 20px; border-radius: 6px;
    font-size: 13px; opacity: 0;
    transition: all 0.3s ease; z-index: 10000;
    pointer-events: none;
}
.epss-compare-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Archive stock badge */
.epss-archive-stock-badge {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: #2e7d32; margin-top: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .epss-compare-bar-inner { flex-wrap: wrap; }
    .epss-compare-bar-items { order: 1; width: 100%; }
    .epss-compare-bar-actions { order: 2; width: 100%; justify-content: center; margin-top: 8px; }
    .epss-compare-table th, .epss-compare-table td { padding: 8px; font-size: 12px; }
    .epss-compare-product-col img { width: 80px; height: 80px; }
}
