/**
 * Ed Compare - CSS
 * @author Energiedin
 */

.ed-compare-btn{display:inline-flex;align-items:center;gap:10px;padding:12px 20px;background:#f5f5f5;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:14px;font-weight:500;color:#333;transition:all .2s}
.ed-compare-btn:hover{background:#e8e8e8;border-color:#ccc}
.ed-compare-btn.added{background:#e3f2fd;border-color:#2196F3;color:#1976D2}
.ed-compare-btn.added svg{stroke:#1976D2}

.ed-compare-bar{
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #3A3D3C 0%, #616357 100%);
    padding: 15px 0px;
    z-index: 99;
    transition: bottom .3s;
}
.ed-compare-bar.active{bottom:0}
.ed-compare-bar-content{display:flex;align-items:center;justify-content:space-between;max-width:1340px;margin:0 auto;gap:20px; padding: 0 15px;}
.ed-compare-bar-info{display:flex;align-items:center;gap:8px;color:#fff}
.ed-compare-bar-count{
    background: var(--cs-primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.ed-compare-bar-label{font-size:14px;opacity:.9}
.ed-compare-bar-items{display:flex;gap:10px;flex:1;overflow-x:auto;padding:5px 0}
.ed-compare-bar-item{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.1);padding:8px 12px;border-radius:6px;min-width:150px;max-width:200px}
.ed-compare-bar-item img{width:40px;height:40px;object-fit:cover;border-radius:4px;background:#fff}
.ed-compare-bar-item-info{flex:1;min-width:0}
.ed-compare-bar-item-name{color:#fff;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ed-compare-bar-item-remove{background:0;border:0;color:rgba(255,255,255,.6);cursor:pointer;padding:4px;transition:color .2s}
.ed-compare-bar-item-remove:hover{color:#ff5252}
.ed-compare-bar-actions{display:flex;gap:10px}
.ed-compare-bar-btn{padding:12px 24px;border:0;border-radius:0px;cursor:pointer;font-size:14px;font-weight:600;transition:all .2s;display:flex;align-items:center;gap:8px}
.ed-compare-bar-btn.primary{background:var(--cs-primary); color:#fff}
.ed-compare-bar-btn.secondary{background:0;color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.2)}
.ed-compare-bar-btn.secondary:hover{color:#fff;border-color:rgba(255,255,255,.4)}

.ed-compare-modal{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:999}
.ed-compare-modal.active{display:flex;align-items:flex-start;justify-content:center;padding:20px;overflow-y:auto}
.ed-compare-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);backdrop-filter:blur(4px)}
.ed-compare-modal-container{position:relative;background:#fff;border-radius:0px;width:100%;max-width:1200px;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.3);animation:compareModalIn .3s}
@keyframes compareModalIn{from{opacity:0;transform:translateY(-30px)}to{opacity:1;transform:translateY(0)}}
.ed-compare-modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 25px;border-bottom:1px solid #eee;background:#fafafa}
.ed-compare-modal-header h2{margin:0;font-size:20px;font-weight:600;color:#333}
.ed-compare-modal-close{background:0;border:0;cursor:pointer;padding:8px;color:#666;transition:color .2s;border-radius:50%}
.ed-compare-modal-close:hover{color:#333;background:#eee}
.ed-compare-modal-body{padding:25px;overflow-x:auto;overflow-y:auto;flex:1}
.ed-compare-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#666}
.ed-compare-spinner{width:40px;height:40px;border:3px solid #eee;border-top-color:#2196F3;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:15px}
@keyframes spin{to{transform:rotate(360deg)}}

.ed-compare-table{width:100%;border-collapse:collapse;min-width:600px}
.ed-compare-table th,.ed-compare-table td{padding:15px;text-align:center;border-bottom:1px solid #eee;vertical-align:top}
.ed-compare-table th{background:#fafafa;font-weight:600;color:#333;text-align:left;width:150px;min-width:150px}
.ed-compare-table td{min-width:200px}
.ed-compare-product-header{position:relative;padding:15px}
.ed-compare-product-remove{position:absolute;top:10px;right:10px;background:#f5f5f5;border:0;width:28px;height:28px;border-radius:50%;cursor:pointer;color:#999;transition:all .2s;display:flex;align-items:center;justify-content:center}
.ed-compare-product-remove:hover{color:#000}
.ed-compare-product-image{width:120px;height:120px;object-fit:contain;margin:0 auto 15px;display:block;border-radius:8px;background:#f9f9f9;padding:10px}
.ed-compare-product-name{font-size:14px;font-weight:600;color:#333;margin-bottom:5px;line-height:1.4}
.ed-compare-product-name a{color:inherit;text-decoration:none}
.ed-compare-product-ref{font-size:12px;color:#999}
.ed-compare-price{    color: #0462C7;
    font-size: 20px;
    font-weight: 500;}
.ed-compare-price-old{font-size:14px;color:#999;text-decoration:line-through;display:block;margin-bottom:5px}
.ed-compare-stock{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:20px;font-size:13px;font-weight:500}
.ed-compare-stock.in-stock{background:#e8f5e9;color:#2e7d32}
.ed-compare-stock.out-of-stock{background:#ffebee;color:#c62828}
.ed-compare-stock-dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.ed-compare-actions{    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;}
.ed-compare-btn-cart{
        padding: 12px 20px;
    background: var(--cs-primary);
    color: #fff;
    border: 0;
    border-radius: 0px;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
    text-transform: unset;
    font-weight: 400;
    font-size: 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ed-compare-btn-cart:hover{background:var(--cs-primary-hover);color:#fff}
.ed-compare-btn-cart:disabled{opacity:.7;cursor:not-allowed}
.ed-compare-btn-cart.loading{background:#666}
.ed-compare-btn-cart.added{background:#4caf50}
.ed-compare-btn-cart.added:hover{background:#43a047}
.ed-compare-btn-view{
        display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f5f5f5;
    color: #000;
    border: 0;
    border-radius: 0px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}
.ed-compare-btn-view:hover{background:#e8e8e8;color:#333}
.ed-compare-feature-name{font-weight:500;color:#555}
.ed-compare-feature-value{color:#333}
.ed-compare-feature-empty{color:#ccc}

@media(max-width:768px){.ed-compare-bar-content{flex-wrap:wrap}.ed-compare-bar-items{order:3;width:100%;margin-top:10px}.ed-compare-modal.active{padding:10px}.ed-compare-modal-container{max-height:95vh}.ed-compare-modal-body{padding:15px}.ed-compare-table th{width:100px;min-width:100px;font-size:13px}.ed-compare-table td{min-width:150px}.ed-compare-product-image{width:80px;height:80px}.ed-compare-product-name{font-size:13px}.ed-compare-price{font-size:16px}}
