/* Basic styles cho compare bar & modal */
a.btn-compare.text-sm {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    font-weight: 500;
}
a.button.primary.dktv {
    background: white;
    color: #111827;
    border: 1px solid #e4e5e9;
}
a.btn-compare.text-sm:hover {
    cursor: pointer;
}
.group-btn {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.group-btn a.button.primary {
    margin: 0px;
    text-transform: none;
    border-radius: 8px;
    padding: 8px 20px;
}

.group-btn a.button.primary:first-child {
    flex: 1;
}
#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 {
    margin: 0 auto;
    display: grid;
    align-items: center;
    grid-template-columns: 3fr 1fr;
    column-gap: 20px;
    padding: 0px !important;
}
#cp-compare-bar-list {display: grid;gap:20px;align-items:center;flex:1;grid-template-columns: 1fr 1fr 1fr;}
.cp-compare-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    background: #F3F4F6;
    flex-direction: row;
    position: relative;
}
.cp-compare-bar-item img {
    width: 104px;
    height: 72px;
    aspect-ratio: 4 / 3;
}

img.icon-plus-ss {
    width: 32px;
    height: auto;
    aspect-ratio: 1/1;
}

.cp-compare-bar-item .cp-name {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}
.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 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 98px;
    padding: 0px;
    justify-content: center;
    border: none;
}

.cp-compare-bar-item.cp-empty img {
    width: 32px;
    height: 32px;
}
span.cp-remove img {
    width: 24px;
    height: auto;
}

.btn-compare-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-compare-group a.cp-btn-view-compare {
    font-size: 14px;
    line-height: 20px;
    flex: 1;
    width: 100%;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: #fe5f00;
}

.btn-compare-group span.cp-close-bar {
    font-size: 14px;
    line-height: 20px;
    flex: 1;
    width: 100%;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.btn-compare-group a.cp-btn-view-compare:hover {
    color: white;
    background: #FF7F33;
}

.btn-compare-group span.cp-close-bar:hover {
    cursor: pointer;
    background: #E5E7EB;
}
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: 32px;border-radius: 12px;width:90%;max-width: 1200px;box-shadow:0 8px 24px rgba(0,0,0,0.15);display: flex;flex-direction: column;gap: 32px;}
#cp-compare-search {width:100%;padding:8px 10px;margin-bottom:8px;border:1px solid #ddd;border-radius: 12px;}
#cp-compare-results {max-height: 425px;overflow:auto;}
.cp-select-item {display: flex;padding: 12px;cursor:pointer;margin-bottom: 12px;border-radius: 12px;gap: 12px;align-items: center;background: #F3F4F6;}
.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: 24px;
    margin-bottom: 30px;
}

.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: 95px;
    height: 65px;
}
.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;
}
.btn-select-item {
    font-size: 14px;
    line-height: 20px;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    height: fit-content;
    text-align: center;
    background: white;
}
.title-select-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.close-compare-modal {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    padding: 6px;
}
.cp-compare-card {
    position: relative;
    padding: 24px;
    border-radius: 12px;
    background: #F3F4F6;
    text-align: center;
}

.cp-compare-card span.cp-remove {
    right: 24px;
    top: 24px;
}

.cp-compare-card img {aspect-ratio: 3/2;}

.cp-compare-card span.cp-remove img {aspect-ratio: 1;}

.cp-compare-card h3 {
    margin: 12px 0px 8px;
    font-size: 20px;
    line-height: 28px;
    font-weight: 500;
}

.cp-compare-card ins.highlight {
    font-size: 18px;
    line-height: 24px;
}

.cp-compare-card del.strike {
    font-size: 14px;
    line-height: 20px;
}
.cp-product-empty {
    position: relative;
    padding: 24px;
    border-radius: 12px;
    background: #F3F4F6;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.cp-product-empty img {
    width: 32px;
    height: 32px;
    margin: 0px auto;
}

.cp-product-empty span {
    font-size: 18px;
    line-height: 26px;
}
.cp-spec-group-body {
    display: none;
}

.cp-spec-group.is-open .cp-spec-group-body {
    display: block;
}

.cp-accordion-icon {
    float: right;
    transition: transform .25s ease;
}
.cp-spec-group-title.js-spec-toggle {
    position: relative;
    padding: 16px 72px 16px 24px;
    border-bottom: 1px solid;
}
.cp-spec-title-full {
    background: #F3F4F6;
    padding: 12px 24px;
    margin-bottom: 0px;
    font-weight: 500;
}
.cp-spec-values-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.cp-spec-values-row .cp-spec-value {
    padding: 12px 24px;
    border-right: 1px solid #E5E7EB;
}

span.spec-toggle {
    background: url(/wp-content/themes/yadeaplus/assets/images/add.svg);
    width: 24px;
    height: 24px;
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: ease-in 0.3s;
}

.cp-spec-group.is-open span.spec-toggle {
    background: url(/wp-content/themes/yadeaplus/assets/images/minus.svg);
}

.cp-spec-group.is-open .cp-spec-group-title.js-spec-toggle {
    background: #E5E7EB;
    border-bottom: none;
}
div#cp-compare-page {
    padding: 48px 0px 60px 0px;
}
.col-page-title h1.page-title {margin-bottom: 12px;}

.col-page-title p {
    margin-bottom: 0px;
}

@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;
	}
	.cp-spec-values-row {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
	div#cp-compare-page {
		padding: 20px 0px 30px 0px;
	}
	.cp-modal-content {
		padding: 12px;
		width: 100%;
		height: 100%;
		border-radius: 0px;
	}

	div#cp-compare-results {
		max-height: none;
	}

	.cp-modal-content {
		gap: 12px;
	}

	.close-compare-modal {
		right: 12px;
		top: 12px;
	}
	.cp-compare-card {
		padding: 24px 12px;
	}


	.cp-compare-card span.cp-remove {
		right: 12px;
		top: 12px;
	}

	.cp-compare-grid {
		gap: 12px;
	}
	.group-btn {
		flex-direction: column;
	}

	.cp-compare-card {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
}

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