/* Basic styles cho compare bar & modal */
#cp-compare-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    z-index: 9999;
    padding: 10px;
    width: 1200px;
    left: calc(( 100% - 1200px) / 2 );
    border-radius: 15px 15px 0px 0px;
    display: none;
}
.cp-compare-bar-inner {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: 3fr 1fr;
}
#cp-compare-bar-list {display: grid;gap:8px;align-items:center;flex:1;grid-template-columns: 1fr 1fr 1fr;}
.cp-compare-bar-item {
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 8px;
    border:1px dashed #ddd;
    border-radius:6px;
    background:#fafafa;
    flex-direction: column;
    position: relative;
    height: 160px;
}
.cp-compare-bar-item img {width: 86px;height: 86px;aspect-ratio: 1/1;}
.cp-compare-bar-item .cp-name {
    overflow: hidden;
    font-size: 14px;
    text-align: center;
    height: 46px; 
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    white-space: normal; 
}
.cp-remove {cursor:pointer;color:#a00;font-weight:bold;position: absolute;right: 10px;top: 0px;}

.cp-btn-clear {
    margin: 0px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: math-auto;
    font-weight: 500;
}
.cp-btn-view-compare { background:#0073aa; color:#fff; padding:6px 10px; border-radius:4px; text-decoration:none; }

.cp-compare-bar-item.cp-empty {
    cursor: pointer;
    fit-content;
    height: 160px;
    padding-top: 25%;
}
/* Modal */
#cp-compare-modal { position:fixed; left:0; top:0; right:0; bottom:0; z-index:10000; display:flex; align-items:center; justify-content:center; }
.cp-modal-bg { position:absolute; left:0; top:0; right:0; bottom:0; background:rgba(0,0,0,0.4); }
.cp-modal-content {position:relative;z-index:10001;background:#fff;padding:18px;border-radius:8px;width:90%;max-width: 1200px;box-shadow:0 8px 24px rgba(0,0,0,0.15);}
#cp-compare-search { width:100%; padding:8px 10px; margin-bottom:8px; border:1px solid #ddd; border-radius:4px; }
#cp-compare-results {max-height: 425px;overflow:auto;border:1px solid #eee;padding:6px;border-radius:6px;}
.cp-select-item {display: flex;padding:8px;cursor:pointer;border-bottom:1px solid #f2f2f2;margin-bottom: 10px;border: 1px solid;border-radius: 12px;gap: 12px;}
.cp-select-item:hover { background:#f9f9f9; }

#cp-compare-table { width:100%; border-collapse:collapse; margin-top:12px; }
#cp-compare-table th, #cp-compare-table td { border:1px solid #eee; padding:8px; vertical-align:top; text-align:left; }
.cp-col-product img { width:80px; height:80px; object-fit:cover; margin-right:8px; float:left; }

/* GRID sÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚ÂºÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â£n phÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚ÂºÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â©m */
.cp-compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.cp-product-box {
    text-align: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.cp-product-box img {
    max-width: 100%;
    height: auto;
}

.cp-product-name {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.cp-product-price {
    color: red;
    margin: 10px 0;
}

.cp-remove {
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    color: #262626;
}

/* BÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚ÂºÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â£ng thÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â´ng sÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â»ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¹Ã…â€œ */
.cp-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.cp-spec-table th,
.cp-spec-table td {
    border: 1px solid #eee;
    padding: 10px;
}

.cp-spec-table th {
    background: #fafafa;
    font-weight: bold;
}

.cp-spec-row-title {
    width: 25%;
    background: #f5f5f5;
    font-weight: bold;
}

.cp-select-item img.cp-select-thumb {
    width: 60px;
    aspect-ratio: 1/1;
    height: 60px;
}
.gr-btn-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gr-btn-bar a.cp-btn-view-compare {
    background: black;
    text-align: center;
    border-radius: 99px;
    border: 1px solid;
}

.gr-btn-bar a.cp-btn-view-compare:hover {
    color: black;
    background: white;
    border: 1px solid;
}

.gr-btn-bar span.cp-close-bar {
    text-align: center;
    border: 1px solid;
    border-radius: 99px;
    padding: 4px;
}

.gr-btn-bar span.cp-close-bar:hover {
    background: black;
    color: white;
    cursor: pointer;
}
button#cp-compare-floating-btn {
    position: fixed;
    bottom: 10%;
    left: 2%;
    text-transform: math-auto;
    border: 1px solid;
    border-radius: 99px;
    background: white;
    font-size: 12px;
    z-index: 99;
}
@media only screen and (max-width: 490px) {
	div#cp-compare-bar {
		width: 100% !important;
		left: 0;
	}

	button#cp-compare-clear {
		flex: 1;
		flex-basis: 25%;
	}

	a.cp-btn-view-compare {
		flex: 1;
		text-align: center;
	}

	#cp-compare-bar-list {
		flex: 1 0 0;
		flex-wrap: nowrap;
		grid-template-columns: 1fr;
	}

	.cp-compare-bar-inner {
		width: 100%;
		max-width: 100%;
		grid-template-columns: 1fr;
		grid-template-rows: 3fr 1fr;
	}
    .cp-compare-bar-item.cp-empty {
        padding-top: 20%;
        
    }
}
	