

/* ============================================================================
   COMPARE BAR
============================================================================ */

.cmp-bar{
    position:fixed;
    left:0;
    right:0;
    bottom:-250px;
    background:#fff;
    border-top:0px solid #0056ad;
    z-index:9999;
    transition:.3s;
    box-shadow:0 -6px 20px rgba(0,0,0,.15);
}

.cmp-bar.is-visible{
    bottom:0;
     border-top:10px solid #0056ad;
}

/* Khi collapsed: thu gọn chỉ còn viền trên + nút toggle */
.cmp-bar.is-collapsed {
    bottom: 0;
}

.cmp-bar.is-collapsed .cmp-bar-inner {
    display: none;
}

.cmp-bar-inner{
    max-width:1425px;
    margin:0 auto;
    padding:33px 16px 14px;
    display:flex;
    align-items:center;
    gap:16px;
}

.cmp-bar-slots{
    flex:1;
    display:flex;
    gap:25px;
    justify-content: center;
}
.slot-remove:hover {
    transition: all .5s ease;
    transform: rotate(90deg);
}
/* ============================================================================
   NÚT TOGGLE
============================================================================ */

.cmp-toggle {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #0056ad;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    transition: background .2s;
    z-index: 1;
    margin: 0;
}

.cmp-toggle:hover {
    background: #0047a0;
}

.cmp-bar.is-visible .cmp-toggle {
    display: flex;
}

.cmp-toggle svg {
    transition: transform .3s;
    pointer-events: none;
}

.cmp-bar.is-collapsed .cmp-toggle svg {
    transform: rotate(180deg);
}

/* ============================================================================
   SLOTS & BUTTONS
============================================================================ */

.cmp-slot{
    width:240px;
    background:#f5f7fa;
    border:1px solid #dbe3ee;
    border-radius:8px;
    padding:10px;
    display:flex;
    align-items:center;
    gap:10px;
    position:relative;
}

.cmp-slot img{
    width:60px;
    height:60px;
    border-radius:6px;
    object-fit:cover;
}

.slot-name{
    font-size:12px;
    font-weight:700;
    line-height:1.4;
}

.slot-remove{
   position: absolute;
    top: -21px;
    left: -31px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 30px;
    color: #f00a0a;
    padding: 0px 15px !important;
    border-radius: 50px;
    line-height: 1;
    display: flex;
    margin: 0;
    justify-content: center;
    margin: 0;
    height: auto;
    min-height: auto;
}
.cmp-btn-clear:hover,
.cmp-btn-go:hover {
    transform: translateY(-1px);
}

.cmp-btn-go{
    background:#0056ad;
    color:#fff;
    border:none;
    border-radius:6px;
    padding:8px 20px;
    cursor:pointer;
    font-weight:700;
    font-size: 16px;
    margin: 0;
    min-height: auto;
    line-height: 1.4;
}

.cmp-btn-go:disabled{
    opacity:.5;
    cursor:not-allowed;
}

.cmp-btn-clear{
    background: #b4b3b3;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    min-height: auto;
}
.cmp-bar-button {
    gap: 10px;
    display: flex;
}
/* ============================================================================
   OVERLAY
============================================================================ */

.cmp-overlay{
    position:fixed;
    inset:0;
    background:#f4f6f9;
    z-index:10000;
    overflow:auto;
    display:none;
}

.cmp-overlay.is-open{
    display:block;
    padding-top: 50px;
}

.cmp-overlay-inner{
    max-width:1200px;
    margin:0 auto;
    padding:30px 16px 80px;
}

.cmp-overlay-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:24px;
}

.cmp-back{
    background:none;
    border:none;
    cursor:pointer;
    color:#0056ad;
    font-size:15px;
}

.cmp-overlay-title{
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    max-width: 50%;
}

.cmp-table{
    background:#fff;
    border-radius:10px;
    overflow:hidden;
    border:1px solid #dfe5ec;
}

.cmp-products-row{
    display:grid;
}

.cmp-product-col{
    padding:30px 20px;
    border-right:1px solid #edf1f5;
    text-align:center;
}

.cmp-product-col:last-child{
    border-right:none;
}

.cmp-product-col img{
    width:170px;
    height:170px;
    object-fit:cover;
    margin:0 auto 16px;
    display:block;
}

.cmp-prod-name{
    font-size:18px;
    
    margin-bottom:12px;
}

.cmp-prod-price-wrap{
    margin-bottom:14px;
    line-height:1.5;
}

.cmp-price-sale{
    display:block;
    font-size:22px;
    font-weight:700;
    color:red;
}

.cmp-price-regular{
    display:inline-block;
    
    text-decoration:line-through;
    margin-top:3px;
}

.cmp-prod-rating{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:5px;
    margin-bottom:16px;
    font-size:13px;
    color:#555;
}

.cmp-stars{
    display:inline-flex;
    gap:2px;
    vertical-align:middle;
}

.cmp-stars svg{
    width:16px;
    height:16px;
}

.cmp-view-btn:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.cmp-view-btn{
    display: inline-block;
    background: #0056ad;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
}

.cmp-prod-desc{
    margin-top:16px;
    font-size:13px;
    line-height:1.7;
    color:#666;
    text-align:left;
}

.cmp-attr-group-heading{
    background:#f3f6fa;
    padding:16px;
    text-align:center;
    font-weight:700;
    border-top:1px solid #e6ebf1;
    color:#0056ad;
}

.cmp-attr-row{
    display:grid;
}

.cmp-attr-cell{
    padding:18px;
    border-top:1px solid #edf1f5;
    border-right:1px solid #edf1f5;
    text-align:center;
}

.cmp-attr-cell:last-child{
    border-right:none;
}

@media (max-width: 1403px) {
    .cmp-bar-inner {
        flex-wrap: wrap;
    }
    .cmp-bar-button {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 1403px) {
    
   .cmp-bar-slots {
        width: 100%;
        overflow: auto;
        padding-top: 16px;
        padding-left: 16px;
    }
        .cmp-slot {
        min-width: 220px;
    }
    .cmp-overlay-title{font-size: 16px;}
    .cmp-product-col {
    padding: 5px;
    }
}