/* ==========================================================
   Custom Wishlist Styles
   File: wishlist.css
   Place in: wp-content/themes/generatepress-child/wishlist.css

   IMPORTANT — SAFE ZONE:
   Every selector below starts with ".cw-" (Custom Wishlist prefix).
   Nothing here touches body, .home, hero, or global theme classes,
   so it CANNOT affect the homepage or hero section.
   ========================================================== */

:root {
	--cw-bg-light: #F0F8FF;
	--cw-text-dark: #2F4F4F;
	--cw-accent-teal: #40E0D0;
	--cw-white: #FFFFFF;
	--cw-gold: #FFCC33;
	--cw-danger: #E0435B;
}

/* ---------- Heart button: Shop / Category loop ---------- */
.cw-loop-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--cw-white);
	border: 1px solid #e2e8ec;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 2px 6px rgba(47, 79, 79, 0.12);
	transition: transform .2s ease, background .2s ease;
}
.cw-loop-btn .cw-heart-icon {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--cw-text-dark);
	stroke-width: 1.8;
	transition: fill .2s ease, stroke .2s ease;
}
.cw-loop-btn:hover { background: var(--cw-gold); transform: scale(1.06); }
.cw-loop-btn.cw-active .cw-heart-icon { fill: var(--cw-danger); stroke: var(--cw-danger); }
.cw-loop-btn.cw-pop { animation: cwPop .4s ease; }
.cw-loop-btn.cw-loading { opacity: .5; pointer-events: none; }
@keyframes cwPop {
	0% { transform: scale(1); }
	40% { transform: scale(1.3); }
	100% { transform: scale(1); }
}

/* ---------- Heart button: Single product page ---------- */
.cw-single-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 10px 18px;
	background: var(--cw-white);
	border: 1.5px solid var(--cw-accent-teal);
	border-radius: 30px;
	color: var(--cw-text-dark);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.cw-single-btn .cw-heart-icon { width: 18px; height: 18px; fill: none; stroke: var(--cw-text-dark); stroke-width: 1.8; }
.cw-single-btn:hover { background: var(--cw-accent-teal); color: var(--cw-white); }
.cw-single-btn:hover .cw-heart-icon { stroke: var(--cw-white); }
.cw-single-btn.cw-active { background: #FFE9EC; border-color: var(--cw-danger); }
.cw-single-btn.cw-active .cw-heart-icon { fill: var(--cw-danger); stroke: var(--cw-danger); }

/* ---------- Wishlist page — mobile first (default) ---------- */
.cw-wishlist-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: 12px;
	font-family: inherit;
}
.cw-empty-msg {
	text-align: center;
	color: var(--cw-text-dark);
	padding: 40px 16px;
	font-size: 16px;
}

.cw-wishlist-item {
	display: grid;
	grid-template-columns: 70px 1fr;
	grid-template-areas:
		"image details"
		"total total"
		"remove remove";
	gap: 6px 12px;
	background: var(--cw-white);
	border: 1px solid #e6edf0;
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 14px;
	box-shadow: 0 2px 10px rgba(47, 79, 79, 0.06);
	transition: opacity .25s ease;
}
.cw-row-removing { opacity: .4; }
.cw-row-updating { opacity: .7; }

.cw-item-image { grid-area: image; }
.cw-item-image img { width: 100%; height: auto; border-radius: 10px; display: block; }

.cw-item-details { grid-area: details; display: flex; flex-direction: column; gap: 6px; }
.cw-item-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--cw-text-dark);
	text-decoration: none;
	line-height: 1.3;
	letter-spacing: .2px;
}
.cw-item-title:hover { color: var(--cw-accent-teal); }
.cw-item-price { font-size: 14px; color: var(--cw-text-dark); opacity: .85; }
.cw-item-price .woocommerce-Price-amount { font-weight: 600; }

.cw-qty-controls {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	border: 1px solid var(--cw-accent-teal);
	border-radius: 24px;
	overflow: hidden;
}
.cw-qty-btn {
	width: 32px;
	height: 32px;
	background: var(--cw-bg-light);
	border: none;
	color: var(--cw-text-dark);
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
}
.cw-qty-btn:hover { background: var(--cw-accent-teal); color: var(--cw-white); }
.cw-qty-input {
	width: 38px;
	height: 32px;
	border: none;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--cw-text-dark);
	background: var(--cw-white);
}

.cw-item-line-total {
	grid-area: total;
	text-align: right;
	font-size: 15px;
	font-weight: 700;
	color: var(--cw-text-dark);
	padding-top: 4px;
	border-top: 1px dashed #e6edf0;
	margin-top: 4px;
}

.cw-remove-btn {
	grid-area: remove;
	justify-self: end;
	background: none;
	border: none;
	color: var(--cw-danger);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 2px;
	text-decoration: underline;
}
.cw-remove-btn:hover { color: #b5202f; }

/* ---------- Summary box (subtotal / shipping / total) ---------- */
.cw-wishlist-summary {
	background: var(--cw-bg-light);
	border-radius: 14px;
	padding: 16px;
	margin-top: 6px;
}
.cw-summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: var(--cw-text-dark);
	padding: 6px 0;
}
.cw-total-row {
	border-top: 1px solid rgba(47, 79, 79, 0.2);
	margin-top: 6px;
	padding-top: 10px;
	font-size: 17px;
	font-weight: 700;
}
.cw-total-row span:last-child { color: #16794f; }

/* ---------- Tablet and up ---------- */
@media (min-width: 600px) {
	.cw-wishlist-item {
		grid-template-columns: 90px 1fr auto;
		grid-template-areas: "image details total" "remove remove remove";
		align-items: center;
	}
	.cw-item-line-total { text-align: right; border-top: none; margin-top: 0; padding-top: 0; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
	.cw-wishlist-item {
		grid-template-columns: 100px 1fr auto auto;
		grid-template-areas: "image details total remove";
	}
	.cw-remove-btn { justify-self: end; }
}
