/* ============================================================
   GADGET5 — Wishlist Stylesheet (v8.0 - Soothing Luxury)
   Brand Color System:
     --g5-white    #FAFCFD (Soft Porcelain White)
     --g5-bg       #F1F6F9 (Mild Ice Surface)
     --g5-teal     #137A7F (Deep Velvet Marine Teal)
     --g5-text     #243C3C (Refined Slate Charcoal)
     --g5-gold     #E5B842 (Champagne Satin Gold)
     --g5-red      #E0245E (Heart Active Rose Red)
   ============================================================ */

:root {
	--g5-white: #FAFCFD;
	--g5-bg: #F1F6F9;
	--g5-teal: #137A7F;
	--g5-teal-dark: #0D5C60;
	--g5-text: #243C3C;
	--g5-gold: #E5B842;
	--g5-red: #E0245E;
	--g5-line: rgba(36, 60, 60, 0.08);
	--g5-shadow: 0 6px 20px rgba(36, 60, 60, 0.06);
}

/* 1. Heart Button on Product Cards & Single Product */
.g5-wish-svg {
	width: 20px;
	height: 20px;
	display: block;
	transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

.g5-wish-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: var(--g5-text);
	background: rgba(250, 252, 253, 0.92);
	box-shadow: 0 3px 10px rgba(36, 60, 60, 0.12);
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease;
	outline: none;
}

.g5-wish-btn:active {
	transform: scale(0.9);
}

.g5-wish-btn.is-on {
	color: var(--g5-red) !important;
	background: #FFFFFF !important;
}

.g5-wish-btn.is-on .g5-wish-svg {
	fill: var(--g5-red) !important;
	stroke: var(--g5-red) !important;
}

/* Single Product Specific Layout */
.single-product .g5-wish-btn {
	position: relative;
	top: auto;
	right: auto;
	margin: 10px 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 2. Header Wishlist Link & Count Badge */
.g5-wish-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	line-height: 1;
}

.g5-wish-count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	display: none;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	font: 800 10px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--g5-text);
	background: var(--g5-gold);
	border: 2px solid var(--g5-white);
	box-shadow: 0 2px 5px rgba(36, 60, 60, 0.2);
	pointer-events: none;
}

.g5-wish-count[data-on] {
	display: flex !important;
}

.g5-wish-link.has-label .g5-wish-count {
	position: static;
	margin-left: 6px;
}

/* 3. Wishlist Page Shell */
.g5-wish-page {
	max-width: 1180px;
	margin: 0 auto;
	padding: 24px 16px 60px;
	box-sizing: border-box;
}

.g5-wish-empty {
	text-align: center;
	padding: 60px 20px;
	background: var(--g5-bg);
	border-radius: 20px;
	color: var(--g5-text);
	border: 1px solid var(--g5-line);
}

.g5-wish-empty p {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 16px;
	color: rgba(36, 60, 60, 0.75);
}

.g5-wish-shop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 26px;
	border-radius: 12px;
	background: var(--g5-teal);
	color: #FFFFFF !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 6px 18px rgba(19, 122, 127, 0.25);
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.g5-wish-shop:hover {
	background: var(--g5-teal-dark);
	transform: translateY(-2px);
}

/* Wishlist Product Cards */
.g5-wc {
	position: relative;
	background: var(--g5-white);
	border: 1px solid var(--g5-line);
	border-radius: 18px;
	padding: 14px;
	box-shadow: var(--g5-shadow);
	box-sizing: border-box;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.g5-wc:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(36, 60, 60, 0.1);
}

.g5-wc-img {
	display: block;
	object-fit: cover;
	background: var(--g5-bg);
}

.g5-wc-t {
	font-size: 14px;
	font-weight: 700;
	color: var(--g5-text);
	text-decoration: none;
	display: block;
	margin-bottom: 6px;
	line-height: 1.35;
}

.g5-wc-p {
	color: var(--g5-teal);
	font-weight: 800;
	font-size: 15px;
	margin-bottom: 12px;
}

.g5-wc-x {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 50%;
	background: rgba(224, 36, 94, 0.12);
	color: var(--g5-red);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.g5-wc-x:hover {
	background: var(--g5-red);
	color: #FFFFFF;
}

.g5-wc-acts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.g5-wc-add {
	border: none;
	border-radius: 10px;
	background: var(--g5-teal);
	color: #FFFFFF;
	font-weight: 700;
	font-size: 12.5px;
	padding: 9px 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.g5-wc-add:hover {
	background: var(--g5-teal-dark);
}

.g5-wc-buy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--g5-text);
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--g5-text);
	font-weight: 700;
	font-size: 12.5px;
	padding: 9px 6px;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.g5-wc-buy:hover {
	background: var(--g5-text);
	color: #FFFFFF;
}

/* Toast */
.g5-toast {
	position: fixed;
	left: 50%;
	bottom: max(24px, env(safe-area-inset-bottom));
	transform: translateX(-50%) translateY(10px);
	z-index: 99999;
	background: rgba(36, 60, 60, 0.95);
	color: #FFFFFF;
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.g5-toast.on {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ================= DESKTOP (>=768px) ================= */
@media (min-width: 768px) {
	.g5-wish-list {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 20px;
	}
	.g5-wc-img {
		width: 100%;
		height: 190px;
		border-radius: 12px;
		margin-bottom: 12px;
	}
}

/* ================= MOBILE (<=767px) ================= */
@media (max-width: 767px) {
	.g5-wish-page { padding: 12px 10px 48px; }
	.g5-wish-list { display: flex; flex-direction: column; gap: 12px; }
	.g5-wc {
		display: grid;
		grid-template-columns: 88px 1fr;
		gap: 12px;
		padding: 12px;
	}
	.g5-wc-img {
		width: 88px;
		height: 88px;
		border-radius: 10px;
	}
	.g5-wc-body { min-width: 0; padding-right: 28px; }
	.g5-wc-acts { grid-template-columns: 1fr; gap: 6px; }
}