/* Jewelry Compare styles */

/* ---- Compare button (icon only) ----
 * Rendered as a small square icon box, sized to sit next to a typical
 * wishlist heart icon. No theme colours forced — neutral border + grey icon
 * so it looks at home on any store. The text label is kept in the markup for
 * screen-readers but hidden visually. */
.jc-compare-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: #333;
	text-decoration: none;
	vertical-align: middle;
	box-sizing: border-box;
	transition: border-color .2s, color .2s;
	
}
.single-product-site .jc-compare-btn {
	margin-top: 10px;
	margin-right: 10px;
}
.jc-compare-btn .jc-label {
	/* visually hidden, still readable by screen-readers */
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.jc-compare-btn .jc-icon {
	width: 20px;
	height: 20px;
	display: inline-block;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 3 5 7l4 4V8h6V6H9V3zm6 18 4-4-4-4v3H9v2h6v3z'/></svg>") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 3 5 7l4 4V8h6V6H9V3zm6 18 4-4-4-4v3H9v2h6v3z'/></svg>") center/contain no-repeat;
	opacity: .65;
}
.jc-compare-btn:hover {
	border-color: #333;
}
.jc-compare-btn:hover .jc-icon,
.jc-compare-btn.active .jc-icon {
	opacity: 1;
}
.jc-compare-btn.active {
	border-color: #333;
}

/* ---- Floating bar ---- */
.jc-bar {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #1a1a1a;
	color: #fff;
	padding: 10px 16px;
	border-radius: 40px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.jc-bar[hidden] {
	display: none;
}
.jc-bar-count {
	background: #fff;
	color: #1a1a1a;
	border-radius: 50%;
	min-width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
}
.jc-bar-view {
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	padding: 0;
}

/* ---- Modal ---- */
.jc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
}
.jc-modal[hidden] {
	display: none;
}
.jc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 15, 20, .55);
	backdrop-filter: blur(2px);
}
.jc-modal-box {
	position: relative;
	background: #fff;
	max-width: 1140px;
	width: 95%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	margin: 4vh auto;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	overflow: hidden;
}
.jc-modal-title {
	margin: 0;
	padding: 20px 56px 20px 26px;
	font-size: 20px;
	font-weight: 600;
	border-bottom: 1px solid #eee;
}
.jc-modal-content {
	overflow: auto;
	padding: 0;
}
.jc-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border: 0 !important;
	background: #f2f2f2 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	color: #555;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, color .2s;
	z-index: 5;
}
/* Some themes inject ::before/::after glyphs or backgrounds onto <button>s —
 * kill them so only our × icon shows. */
.jc-modal-close::before,
.jc-modal-close::after {
	content: none !important;
	display: none !important;
}
.jc-modal-close .jc-x {
	width: 15px;
	height: 15px;
	display: block;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>") center/contain no-repeat;
}
.jc-modal-close:hover {
	background: #1a1a1a !important;
	color: #fff;
}
body.jc-modal-open {
	overflow: hidden;
}

/* ---- Add-to-compare search bar ---- */
.jc-add-bar {
	position: relative;
	padding: 14px 26px;
	border-bottom: 1px solid #f0f0f0;
}
.jc-add-search {
	width: 100% !important;
	padding: 11px 16px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
}
.jc-add-search:focus {
	outline: none;
	border-color: #b8860b;
}
.jc-add-results {
	position: absolute;
	left: 26px;
	right: 26px;
	top: calc(100% - 6px);
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
	max-height: 320px;
	overflow: auto;
	z-index: 5;
}
.jc-add-results[hidden] {
	display: none;
}
.jc-add-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: #333;
	border-bottom: 1px solid #f5f5f5;
}
.jc-add-item:last-child {
	border-bottom: 0;
}
.jc-add-item:hover {
	background: #faf6ec;
}
.jc-add-item img,
.jc-add-noimg {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	background: #f2f2f2;
	flex: 0 0 44px;
}
.jc-add-info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}
.jc-add-name {
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.jc-add-price {
	font-size: 13px;
	color: #b8860b;
}
.jc-add-plus {
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #1a1a1a;
	color: #fff;
	font-size: 18px;
	line-height: 1;
}
.jc-add-item:hover .jc-add-plus {
	background: #b8860b;
}
.jc-add-empty {
	padding: 16px;
	text-align: center;
	color: #888;
}

/* ---- Comparison table ---- */
.jc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.jc-table th,
.jc-table td {
	padding: 14px 16px;
	text-align: center;
	vertical-align: middle;
	border-bottom: 1px solid #f0f0f0;
	min-width: 200px;
}
/* First column = field labels */
.jc-table th {
	text-align: left;
	background: #fafafa;
	font-weight: 600;
	color: #444;
	width: 150px;
	min-width: 150px;
	white-space: nowrap;
	position: sticky;
	left: 0;
	z-index: 1;
}
/* Zebra striping on attribute rows for readability */
.jc-table tr:nth-child(even) td {
	background: #fcfcfc;
}
.jc-table .jc-row-image td,
.jc-table .jc-row-image th {
	border-bottom: 0;
	padding-bottom: 0;
}

/* Product image */
.jc-table .jc-thumb {
	display: inline-block;
	padding: 8px;
	border-radius: 10px;
	background: #f7f7f7;
}
.jc-table .jc-thumb img {
	max-width: 150px;
	height: auto;
	margin: 0 auto;
	display: block;
	border-radius: 6px;
}

/* Title / price emphasis */
.jc-table .jc-row-title td a {
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
}
.jc-table .jc-row-title td a:hover {
	text-decoration: underline;
}
.jc-table .jc-row-price td {
	font-size: 16px;
	font-weight: 700;
	color: #b8860b; /* gold tone for a jewelry store */
}
.jc-table .jc-row-price del {
	color: #aaa;
	font-weight: 400;
	font-size: 13px;
	margin-right: 4px;
}

/* Remove button */
.jc-table .jc-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: right;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #f2f2f2;
	color: #888;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.jc-table .jc-remove:hover {
	background: #e23b3b;
	color: #fff;
}

/* Add to cart button */
.jc-table .jc-row-cart td {
	border-bottom: 0;
}
.jc-table .jc-add-to-cart {
	display: inline-block;
	width: 100%;
	max-width: 180px;
	padding: 11px 16px;
	background: #1a1a1a;
	color: #fff !important;
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s;
}
.jc-table .jc-add-to-cart:hover {
	background: #b8860b;
}
.jc-table .jc-add-to-cart.loading {
	opacity: .7;
}
.jc-table .added_to_cart {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	text-decoration: underline;
}

.jc-empty,
.jc-no-products {
	text-align: center;
	padding: 50px 20px;
	color: #777;
}
.jc-loading {
	height: 120px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 50 50'><path fill='%23b8860b' d='M25 5a20 20 0 1 0 20 20h-4A16 16 0 1 1 25 9z'><animateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/></path></svg>") center no-repeat;
}

@media (max-width: 600px) {
	.jc-modal-title {
		font-size: 17px;
		padding: 16px 50px 16px 18px;
	}
	.jc-table th,
	.jc-table td {
		padding: 10px;
		min-width: 150px;
		font-size: 13px;
	}
	.jc-table th {
		width: 100px;
		min-width: 100px;
	}
	.jc-table .jc-thumb img {
		max-width: 90px;
	}
	.jc-bar {
		right: 10px;
		bottom: 10px;
	}
}
