/* =========================================================
   YITH Wishlist — Custom Card Grid Layout
   3 desktop / 2 tablet / 2 mobile, sa × dugmetom za uklanjanje
   ========================================================= */

/* ---------- Reset table to grid ---------- */
.wishlist_table.custom-grid,
.wishlist_table.custom-grid thead,
.wishlist_table.custom-grid tbody,
.wishlist_table.custom-grid tfoot {
	display: block !important;
	width: 100% !important;
	border: none !important;
	background: transparent !important;
}

.wishlist_table.custom-grid thead {
	display: none !important;
}

.wishlist_table.custom-grid tbody.wishlist-grid-wrapper {
	display: grid !important;
	grid-template-columns: repeat(5, 1fr) !important;
	gap: 24px !important;
	padding: 0 !important;
	margin: 0 !important;
}

.wishlist_table.custom-grid tr.wishlist-grid-row {
	display: block !important;
	width: 100% !important;
	border: none !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 0 !important;
}

.wishlist_table.custom-grid td.wishlist-grid-cell {
	display: block !important;
	width: 100% !important;
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
	height: 100%;
}

/* Empty state and pagination span full width */
.wishlist_table.custom-grid tr:has(td.wishlist-empty),
.wishlist_table.custom-grid tr.pagination-row {
	grid-column: 1 / -1 !important;
}

.wishlist_table.custom-grid td.wishlist-empty {
	text-align: center !important;
	padding: 48px 24px !important;
	background: #F9FAFB !important;
	border-radius: 12px !important;
	color: #666 !important;
	font-size: 15px !important;
}

/* ---------- Card ---------- */
.wishlist-card {
	background: #FFFFFF !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	transition: box-shadow 0.2s ease !important;
}

.wishlist-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* ---------- Image area ---------- */
.wishlist-card__image {
	position: relative !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	background: #F5F7FA !important;
	overflow: hidden !important;
}

.wishlist-card__image-link {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
}

.wishlist-card__image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
}

/* ---------- Remove (×) button ---------- */
.wishlist-card__remove {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	width: 32px !important;
	height: 32px !important;
	border-radius: 50% !important;
	background: #FFFFFF !important;
	color: var(--grey-color) !important;
	font-size: 22px !important;
	font-weight: 400 !important;
	line-height: 30px !important;
	text-align: center !important;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	transition: all 0.2s ease !important;
	z-index: 2 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
}

.wishlist-card__remove:hover {
	background: #E74C3C !important;
	color: #FFFFFF !important;
	transform: scale(1.1) !important;
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

/* ---------- Card body ---------- */
.wishlist-card__body {
	padding: 20px !important;
	display: flex !important;
	flex-direction: column !important;
	flex: 1 !important;
	gap: 10px !important;
}

/* Product name */
.wishlist-card__name {
	margin: 0 0 4px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: #1A1A1A !important;
}

.wishlist-card__name a {
	color: inherit !important;
	text-decoration: none !important;
}

.wishlist-card__name a:hover {
	color: #1B3A6B !important;
}

.wishlist-card__variation {
	display: block !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	color: #666 !important;
	margin-top: 4px !important;
}

/* ACF fields */
.wishlist-card__field {
	font-size: 13px !important;
	line-height: 1.45 !important;
	color: #444 !important;
}

.wishlist-card__field.wishlist-card__pzn, .wishlist-card__field.wishlist-card__ingredients {
	display: none !important;
}

.wishlist-card__field-label {
	font-weight: 600 !important;
	color: #1A1A1A !important;
	margin-right: 4px !important;
}

.wishlist-card__field-value {
	color: #555 !important;
}

.wishlist-card__ingredients .wishlist-card__field-value {
	display: none !important;
	margin-top: 4px !important;
	font-size: 12px !important;
	line-height: 1.5 !important;
	color: #666 !important;
}

/* Stock status */
.wishlist-card__stock {
	font-size: 13px !important;
	font-weight: 500 !important;
}

.wishlist-card__stock .wishlist-in-stock {
	color: #2E7D32 !important;
}

.wishlist-card__stock .wishlist-out-of-stock {
	color: #C62828 !important;
}

/* Date added */
.wishlist-card__date {
	font-size: 12px !important;
	color: #888 !important;
}

/* Price (pinned to bottom) */
.wishlist-card__price {
	margin-top: auto !important;
	padding-top: 14px !important;
	border-top: 1px solid #EEE !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #1B3A6B !important;
}

.wishlist-card__price del {
	color: #999 !important;
	font-weight: 400 !important;
	margin-right: 8px !important;
}

.wishlist-card__price ins {
	background: transparent !important;
	text-decoration: none !important;
}

.wishlist-title-container .show-title-form {
	display: none !important;
}

/* ---------- Pagination ---------- */
.wishlist-pagination td {
	padding: 24px 0 0 !important;
	text-align: center !important;
	background: transparent !important;
	border: none !important;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
	.wishlist_table.custom-grid tbody.wishlist-grid-wrapper {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 20px !important;
	}
}

/* Mobile: 2 columns (tighter) */
@media (max-width: 600px) {
	.wishlist_table.custom-grid tbody.wishlist-grid-wrapper {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
	}

	.wishlist-card__body {
		padding: 14px !important;
		gap: 8px !important;
	}

	.wishlist-card__name {
		font-size: 14px !important;
	}

	.wishlist-card__field {
		font-size: 12px !important;
	}

	.wishlist-card__price {
		font-size: 16px !important;
		padding-top: 10px !important;
	}

	.wishlist-card__remove {
		width: 28px !important;
		height: 28px !important;
		font-size: 18px !important;
		top: 8px !important;
		right: 8px !important;
	}
}