/**
 * WooCommerce Compare Products - Styles
 * Based on Figma Design
 */

/* Google Fonts - Manrope */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

/* ================================
   Variables
   ================================ */
:root {
	--wcs-font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
	--wcs-color-text: #2f2f2f;
	--wcs-color-better: #e54b4b;
	--wcs-color-worse: #e54b4b;
	--wcs-color-border: #e5e5e5;
	--wcs-color-bg: #ffffff;
	--wcs-color-bg-light: #f5f5f5;
	--wcs-transition: 0.3s ease;
}

/* ================================
   Compare Button
   ================================ */
.wcs-compare-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: transparent;
	border: 1px solid var(--wcs-color-border);
	border-radius: 4px;
	font-family: var(--wcs-font-family);
	font-size: 14px;
	font-weight: 500;
	color: var(--wcs-color-text);
	cursor: pointer;
	transition: var(--wcs-transition);
}

.wcs-compare-button:hover {
	border-color: var(--wcs-color-better);
	color: var(--wcs-color-better);
}

.wcs-compare-button.wcs-in-compare {
	background: var(--wcs-color-better);
	border-color: var(--wcs-color-better);
	color: #fff;
}

.wcs-compare-button.wcs-in-compare:hover {
	background: #2a8a3c;
}

.wcs-compare-button.wcs-loading {
	opacity: 0.7;
	pointer-events: none;
}

.wcs-compare-button .wcs-icon {
	width: 20px;
	height: 20px;
}

/* ================================
   Compare Page - Empty State
   ================================ */
.wcs-compare-empty {
	text-align: center;
	padding: 60px 20px;
	font-family: var(--wcs-font-family);
}

.wcs-compare-empty p {
	font-size: 16px;
	color: #666;
	margin-bottom: 20px;
}

.wcs-btn-primary {
	display: inline-block;
	padding: 14px 30px;
	background: var(--wcs-color-better);
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 500;
	transition: var(--wcs-transition);
}

.wcs-btn-primary:hover {
	background: #2a8a3c;
	color: #fff;
}

/* ================================
   Compare Page - Header
   ================================ */
.wcs-compare-page {
	font-family: var(--wcs-font-family);
	max-width: 1800px;
	margin: 0 auto;
	padding: 20px;
}

.wcs-compare-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 40px;
}

.wcs-compare-title {
	font-size: 40px;
	font-weight: 500;
	color: var(--wcs-color-text);
	margin: 0;
}

.wcs-clear-all {
	background: none;
	border: 1px solid var(--wcs-color-worse);
	color: var(--wcs-color-worse);
	padding: 10px 20px;
	border-radius: 4px;
	font-family: var(--wcs-font-family);
	font-size: 14px;
	cursor: pointer;
	transition: var(--wcs-transition);
}

.wcs-clear-all:hover {
	background: var(--wcs-color-worse);
	color: #fff;
}

/* ================================
   Compare Products Grid
   ================================ */
.wcs-compare-wrapper {
	overflow-x: auto;
}

.wcs-compare-products {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 45%;
	grid-template-rows: auto auto auto;
	gap: 50px;
	min-width: fit-content;
}

.wcs-product-column {
	position: relative;
	display: grid;
	grid-template-rows: subgrid;
	grid-row: 1 / -1;
	gap: 0;
}

/* Remove button */
.wcs-remove-product {
	position: absolute;
	top: 0;
	right: 0;
	width: 32px;
	height: 32px;
	background: var(--wcs-color-bg-light);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--wcs-transition);
	z-index: 10;
}

.wcs-remove-product:hover {
	background: var(--wcs-color-worse);
	color: #fff;
}

.wcs-remove-product svg {
	width: 16px;
	height: 16px;
}

/* Product Title */
.wcs-product-title {
	font-size: 40px;
	font-weight: 500;
	color: var(--wcs-color-text);
	margin: 0 0 50px 0;
	padding-right: 50px;
}

/* Product Info */
.wcs-product-info {
	display: flex;
	gap: 50px;
	align-items: flex-start;
	margin-bottom: 50px;
}

.wcs-product-image {
	flex: 0 0 400px;
	width: 400px;
	height: 400px;
	background: #fff;
	overflow: hidden;
}

.wcs-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wcs-product-description {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
	color: var(--wcs-color-text);
	line-height: 20px;
	letter-spacing: 0.7px;
}

/* ================================
   Characteristics Section
   ================================ */
.wcs-characteristics {
	display: flex;
	flex-direction: column;
	gap: 50px;
}

.wcs-characteristics-title {
	font-size: 40px;
	font-weight: 500;
	color: var(--wcs-color-text);
	margin: 0;
}

.wcs-attributes-list {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	gap: 20px;
}

.wcs-attribute-item {
	width: 100%;
	display: flex;
	gap: 30px;
	align-items: center;
	padding: 20px;
}

.wcs-attribute-icon {
	flex: 0 0 80px;
	width: 80px;
	height: 80px;
	overflow: hidden;
}

.wcs-attribute-icon svg,
.wcs-attribute-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wcs-attribute-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.wcs-attribute-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--wcs-color-text);
	letter-spacing: 0.7px;
	margin: 0;
}

.wcs-attribute-value {
	font-size: 24px;
	font-weight: 500;
	color: var(--wcs-color-text);
	letter-spacing: 1.2px;
	margin: 0;
}

/* Value Comparison Colors */
.wcs-attribute-value.wcs-value-better {
	color: var(--wcs-color-better);
}

.wcs-attribute-value.wcs-value-worse {
	color: var(--wcs-color-worse);
}

.wcs-attribute-value.wcs-value-different {
	color: var(--wcs-color-text);
}

/* ================================
   Product Footer
   ================================ */

.wcs-product-price {
	font-size: 24px;
	font-weight: 600;
	color: var(--wcs-color-text);
}

.wcs-product-price del {
	color: #999;
	font-size: 18px;
}

.wcs-product-price ins {
	text-decoration: none;
	color: var(--wcs-color-better);
}

.wcs-btn-view {
	display: inline-block;
	padding: 14px 30px;
	background: var(--wcs-color-better);
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 500;
	font-size: 14px;
	transition: var(--wcs-transition);
}

.wcs-btn-view:hover {
	background: #2a8a3c;
	color: #fff;
}

/* ================================
   Compare Link
   ================================ */
.wcs-compare-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--wcs-font-family);
	color: var(--wcs-color-text);
	text-decoration: none;
}

.wcs-compare-link:hover {
	color: var(--wcs-color-better);
}

.wcs-compare-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: var(--wcs-color-better);
	color: #fff;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

/* ================================
   Notifications
   ================================ */
.wcs-notification {
	position: fixed;
	bottom: 20px;
	right: 20px;
	padding: 15px 25px;
	background: #333;
	color: #fff;
	border-radius: 4px;
	font-family: var(--wcs-font-family);
	font-size: 14px;
	z-index: 9999;
	opacity: 0;
	transform: translateY(20px);
	transition: var(--wcs-transition);
}

.wcs-notification-show {
	opacity: 1;
	transform: translateY(0);
}

.wcs-notification-success {
	background: var(--wcs-color-better);
}

.wcs-notification-error {
	background: var(--wcs-color-worse);
}

.wcs-notification-info {
	background: #333;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1400px) {
	.wcs-compare-products {
		grid-auto-columns: 600px;
	}

	.wcs-product-column {
		max-width: 600px;
	}

	.wcs-product-title,
	.wcs-characteristics-title,
	.wcs-compare-title {
		font-size: 28px;
	}

	.wcs-product-image {
		flex: 0 0 280px;
		width: 280px;
		height: 280px;
	}

	.wcs-attribute-value {
		font-size: 18px;
	}
}

@media (max-width: 768px) {
	.wcs-compare-products {
		display: flex;
		flex-direction: column;
		gap: 40px;
	}

	.wcs-product-column {
		flex: 1 1 100%;
		max-width: 100%;
		display: flex;
		flex-direction: column;
		gap: 30px;
	}

	.wcs-product-info {
		flex-direction: column;
		gap: 20px;
		margin-bottom: 30px;
	}

	.wcs-product-image {
		flex: 0 0 auto;
		width: 100%;
		height: auto;
		aspect-ratio: 1;
	}

	.wcs-attribute-item {
		width: 100%;
	}

	.wcs-compare-header {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}

	.wcs-product-title,
	.wcs-characteristics-title,
	.wcs-compare-title {
		font-size: 24px;
	}
}

/* ================================
   Floating Compare Button
   ================================ */
.wcs-floating-compare-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: var(--wcs-color-better);
	border: none;
	border-radius: 50px;
	font-family: var(--wcs-font-family);
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: var(--wcs-transition);
	box-shadow: 0 4px 12px rgba(51, 158, 71, 0.3);
}

.wcs-floating-compare-btn:hover {
	background: #2a8a3c;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(51, 158, 71, 0.4);
}

.wcs-floating-compare-btn.wcs-floating-hidden {
	display: none;
}

.wcs-floating-compare-btn .wcs-floating-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.wcs-floating-compare-btn .wcs-floating-text {
	white-space: nowrap;
}

.wcs-floating-compare-btn .wcs-floating-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 50px;
	font-size: 12px;
	font-weight: 700;
}

/* Responsive for floating button */
@media (max-width: 480px) {
	.wcs-floating-compare-btn {
		padding: 10px 18px;
		font-size: 13px;
	}

	.wcs-floating-compare-btn .wcs-floating-icon {
		width: 18px;
		height: 18px;
	}

	.wcs-floating-compare-btn .wcs-floating-count {
		min-width: 20px;
		height: 20px;
		font-size: 11px;
	}
}
