/* 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 solid #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;
}

img.icon-plus-ss {
    width: 32px;
    height: auto;
    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 {
	position: absolute;
	right: 5px;
	top: 5px;
}

.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;
    height: 160px;
    padding-top: 15%;
    border: 1px dashed #ddd;
}
span.cp-remove img {
    width: 24px;
    height: auto;
}
p.sl-sp-dc {margin-bottom: 15px !important;font-size: 14px;font-weight: 400;}
/* 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; }

.cp-compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.cp-product-box {
    text-align: center;
    position: relative;
    background: rgba(245, 242, 239, 1);
}

.cp-product-box img {
    aspect-ratio: 1/1;
    max-width: 100%;
    height: auto;
    padding: 4px;
}

.cp-product-name {
    font-size: 18px;
    font-weight: 400 !important;
    line-height: 28px;
    text-align: left;
    min-height: 56px;
}

.cp-remove {
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}
.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;
    padding: 12px 24px;
    line-height: 1.5;
}

.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;
    padding: 12px 24px;
    line-height: 1.5;
}

.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;
}

div#cp-compare-container {
    max-width: 1130px;
}

.box-text-ss {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.cp-product-box.cp-product-empty {
    background: transparent;
    padding: 30px;
}

.cp-product-box.cp-product-empty .product-empty-container {
    width: 100%;
    border: 1px dashed #CDCDCD;
    height: auto;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.cp-spec-label {
    padding: 8px 10px;
    background: #F2F2F2;
}

.cp-spec-values {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.cp-spec-value {
    padding: 8px 10px;
    text-align: left;
}
a.cp-btn-datlich.dlhtv {
    font-size: 14px;
    padding: 12px 24px;
    line-height: 20px;
    border: 1px solid;
    border-radius: 99px;
    text-transform: none;
}

button.cp-btn-datmua.button.alt,
button.cp-btn-added_to_cart.button.alt
{
    margin: 0px;
    border-radius: 99px;
    font-size: 14px;
    line-height: 20px !important;
    padding: 12px 24px;
    text-transform: none;
}
.cp-product-actions{
    display: flex;
    gap:0 12px;
}
.cp-product-actions button.cp-btn-added_to_cart{ 
    background:#487B62
}
.cp-product-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 25px;
    flex: 1;
}
.cp-product-box.has-product {
    display: flex;
    flex-direction: column;
    border:1px solid transparent
}
.cp-product-box .cp-remove img {
    width: 24px !important;
    padding: 0px;
}
.cp-product-thumb {
    padding-top: 36px;
}
.cp-product-box.has-product:hover {
    transition: ease-in 0.3s;
    box-shadow: 0 7px 29px 0 rgba(99, 99, 110, .2);
    border: 1px solid black;
}
.cp-product-name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}

.cp-product-box.has-product {
	display: flex;
	flex-direction: column;
	
}

.cp-product-info {
	padding: 20px;
	flex: 1;
}
.cp-product-price {
	flex: 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

@media only screen and (max-width: 490px) {
	div#cp-compare-bar {
		width: 100% !important;
		left: 0;
	}
	.cp-product-name {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		overflow: hidden;
		text-overflow: ellipsis;
		word-break: break-word;
	}

	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%;
        
    }
	.cp-compare-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.cp-product-actions {
		 
		flex-direction: column;
		 
	}

	a.cp-btn-datlich.dlhtv {
		padding: 10px 20px;
	}

	button.cp-btn-datmua.button.alt {
		padding: 10px 20px;
	}
}

@media only screen and (max-width: 991px ) {
    .cp-product-info {
        padding: 10px;
        flex: 1;
    }

    a.cp-btn-datlich.dlhtv {
        padding: 10px 20px;
        margin-bottom: 10px;
    }
}
	