/* @import url('/css/main.css'); removed to prevent cascade conflicts */

/* Product Card Styles for User and Main */
.items-list,
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.item-row {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 12px rgba(139, 92, 246, 0.08), 0 1.5px 6px rgba(0, 0, 0, 0.04);
	padding: 1.5rem 1.25rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	position: relative;
	transition: box-shadow 0.2s, transform 0.2s;
}

.item-row:hover {
	box-shadow: 0 6px 24px rgba(139, 92, 246, 0.16), 0 3px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px) scale(1.02);
}

.item-main {
	margin-bottom: 1rem;
}

.item-main strong {
	font-size: 1.15rem;
	color: #8B5CF6;
	letter-spacing: 0.01em;
}

.item-main .cat {
	color: #6B7280;
	font-size: 0.95em;
	margin-left: 0.5em;
}

.item-main small {
	color: #9CA3AF;
	font-size: 0.95em;
}

.item-main span {
	display: block;
	margin-top: 0.5em;
	color: #374151;
	font-size: 0.98em;
}

.item-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
}

.btn {
	border: none;
	border-radius: 8px;
	padding: 0.5em 1.1em;
	font-weight: 500;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-primary {
	background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
	color: #fff;
	box-shadow: 0 1px 4px rgba(139, 92, 246, 0.08);
}

.btn-primary:hover {
	background: linear-gradient(90deg, #EC4899 0%, #8B5CF6 100%);
}

.btn-secondary {
	background: #F3F4F6;
	color: #6B7280;
}

.btn-secondary:hover {
	background: #8B5CF6;
	color: #fff;
}

.btn-danger {
	background: #EF4444;
	color: #fff;
}

.btn-danger:hover {
	background: #B91C1C;
}

.empty {
	color: #9CA3AF;
	text-align: center;
	padding: 2em 0;
	font-size: 1.1em;
}

@media (max-width: 600px) {

	.items-list,
	.grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.item-row {
		padding: 1rem;
	}
}

/* === INLINED STYLES FROM PETS.CSS FOR RELIABILITY === */

/* Products grid: explicit responsive breakpoints for 1/2/3/4 columns */
.grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(1, 1fr);
	align-items: start;
}

@media (min-width: 600px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1200px) {
	.grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Product card - matching pet card style */
.card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(139, 92, 246, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.card:hover::before {
	opacity: 1;
}

.card:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 12px 32px rgba(139, 92, 246, 0.2), 0 6px 16px rgba(0, 0, 0, 0.08);
}

.card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 12px;
}

.card h3 {
	margin: 0 0 8px 0;
	font-size: 1.2rem;
	color: #1F2937;
	/* Line clamping for uniform title height */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: 3rem;
	/* 1.5rem x 2 lines roughly */
	line-height: 1.5rem;
}

.card p {
	margin: 4px 0;
	color: #6B7280;
	font-size: 0.9rem;
	/* Ensure category has one line fixed height */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 1.2rem;
}

.card .price {
	margin-top: auto;
	font-size: 1.3rem;
	font-weight: 700;
	color: #8B5CF6;
	padding-top: 12px;
}

.card .actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 12px;
}

.card .btn {
	flex: 1;
}

/* Button styles for product cards */
.btn {
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-weight: 500;
	font-size: 0.95rem;
	cursor: pointer;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.btn-primary {
	background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
	color: #fff;
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
	background: linear-gradient(90deg, #EC4899 0%, #8B5CF6 100%);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
	transform: translateY(-1px);
}

/* Filter Styles */
.filter-container {
	background: white;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	margin-bottom: 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
}

.search-box {
	flex: 1;
	min-width: 250px;
	position: relative;
}

.search-box input {
	width: 100%;
	padding: 12px 16px 12px 40px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 0.95rem;
	transition: all 0.2s;
}

.search-box input:focus {
	border-color: #8B5CF6;
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-box i {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #9CA3AF;
}

.filter-group {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.filter-select {
	padding: 12px 36px 12px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background-color: white;
	font-size: 0.95rem;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 0.5rem center;
	background-repeat: no-repeat;
	background-size: 1.5em 1.5em;
	min-width: 140px;
}

.filter-select:focus {
	border-color: #8B5CF6;
	outline: none;
}

/* Product modal styles */
.pet-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1050;
	padding: 20px;
}

.pet-modal-content {
	background: white;
	width: 100%;
	max-width: 900px;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	max-height: 85vh;
}

.pet-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.pet-modal-body {
	display: flex;
	gap: 24px;
	padding: 24px;
	flex-direction: row;
	flex-shrink: 1;
	overflow: hidden;
}

@media (max-width: 768px) {
	.pet-modal-body {
		flex-direction: column;
		overflow-y: auto;
	}

	.pet-modal-image {
		width: 100%;
		max-width: none;
	}
}

.pet-modal-image img {
	width: 100%;
	max-width: 320px;
	height: auto;
	border-radius: 8px;
	object-fit: cover;
}

.pet-modal-details {
	flex: 1;
	overflow-y: auto;
	max-height: 400px;
}

.detail-row {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
}

.detail-label {
	font-weight: 600;
	width: 120px;
	color: #374151;
	flex-shrink: 0;
}

.detail-description {
	margin: 0;
	color: #6B7280;
	line-height: 1.5;
}

.pet-modal-reserve {
	padding: 24px;
	border-top: 1px solid #f3f4f6;
	background: #fafafa;
	flex-shrink: 0;
	max-height: 350px;
	overflow-y: auto;
}

.reserve-form .form-group {
	margin-bottom: 12px;
}

.reserve-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: #374151;
}

.reserve-form input,
.reserve-form select,
.reserve-form textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}

.modal-close {
	background: none;
	border: 0;
	font-size: 24px;
	cursor: pointer;
	color: #6B7280;
	transition: color 0.2s;
}

.modal-close:hover {
	color: #1F2937;
}