/**
 * Ofcore Wishlist — front styles
 */

.ofcore-wish-btn {
	transition: color 0.2s;
}

.ofcore-wish-btn.is-wished svg,
.ofcore-wish-btn.is-active svg,
.ofcore-wish-btn.is-on svg,
[data-wish].is-wished svg,
[data-wish].is-active svg,
[data-wish].is-on svg {
	fill: #e74c3c;
	color: #e74c3c;
	stroke: #e74c3c;
}

.ofcore-wish-btn-large {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border: 1px solid #ddd;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	margin: 16px 0;
	transition: all 0.2s;
	color: #1b1815;
}

.ofcore-wish-btn-large:hover {
	border-color: #1b1815;
}

.ofcore-wish-btn-large .ofcore-wish-label-remove {
	display: none;
}

.ofcore-wish-btn-large.is-wished .ofcore-wish-label-add {
	display: none;
}

.ofcore-wish-btn-large.is-wished .ofcore-wish-label-remove {
	display: inline;
}

.ofcore-wish-btn-large.is-wished svg {
	fill: #e74c3c;
	stroke: #e74c3c;
}

.ofcore-wish-count {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #e74c3c;
	color: #fff;
	font-size: 10px;
	min-width: 16px;
	height: 16px;
	border-radius: 8px;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
	font-weight: 700;
	z-index: 2;
}

.ofcore-wish-count.has-items {
	display: inline-flex;
}

.ofcore-wishlist-page {
	max-width: 1400px;
	margin: 40px auto;
	padding: 0 20px;
}

.ofcore-wishlist-empty {
	text-align: center;
	padding: 80px 20px;
}

.ofcore-wishlist-empty h2 {
	font-size: 24px;
	margin-bottom: 12px;
}

.ofcore-wishlist-empty p {
	color: #767676;
	margin-bottom: 20px;
}

.ofcore-wishlist-note {
	margin-top: 24px;
	padding: 14px 16px;
	background: #f7f5f2;
	border: 1px solid #ebe6df;
	border-radius: 4px;
	font-size: 13px;
	color: #555;
}

.ofcore-wishlist-note a {
	color: #1b1815;
	font-weight: 600;
}

.ofcore-wishlist-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-top: 20px;
}

@media (min-width: 640px) {
	.ofcore-wishlist-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.ofcore-wishlist-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ofcore-wish-item {
	position: relative;
	border: 1px solid #eee;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s;
}

.ofcore-wish-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ofcore-wish-item__media {
	display: block;
	position: relative;
	aspect-ratio: 3 / 4;
	background: #f5f5f4;
}

.ofcore-wish-item__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ofcore-wish-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	z-index: 2;
	color: #1b1815;
}

.ofcore-wish-item__title {
	display: block;
	padding: 12px 12px 4px;
	font-size: 14px;
	text-decoration: none;
	color: #1b1815;
}

.ofcore-wish-item__price {
	padding: 0 12px 8px;
	font-weight: 600;
	font-size: 14px;
}

.ofcore-wish-item__actions {
	padding: 8px 12px 12px;
	display: flex;
	gap: 8px;
}

.ofcore-wish-item__actions .btn {
	flex: 1;
	text-align: center;
	font-size: 12px;
	padding: 8px;
	text-decoration: none;
	border: 1px solid #ddd;
	background: #fff;
	color: #1b1815;
	border-radius: 4px;
	cursor: pointer;
}

.ofcore-wish-item__actions .btn--dark {
	background: #1b1815;
	border-color: #1b1815;
	color: #fff;
}

.ofcore-wish-toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #1b1815;
	color: #fff;
	padding: 12px 20px;
	border-radius: 4px;
	font-size: 14px;
	transform: translateY(20px);
	opacity: 0;
	transition: all 0.3s;
	z-index: 999999;
	pointer-events: none;
}

.ofcore-wish-toast.show {
	transform: none;
	opacity: 1;
}

@media (max-width: 767px) {
	.ofcore-wish-toast {
		bottom: calc(72px + env(safe-area-inset-bottom, 0px));
		right: 12px;
		left: 12px;
		text-align: center;
	}
}
