/* ==========================================================================
   SH Product Categories – Frontend Styles
   Author: Sumith Harshan | harshan.dev
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────── */
.sh-pc-wrapper {
	width: 100%;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */
.sh-pc-grid {
	display: grid;
	column-gap: 20px;
	row-gap: 20px;
	/* column template is set inline via widget render */
}

@media (max-width: 1024px) {
	.sh-pc-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 600px) {
	.sh-pc-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.sh-pc-card {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07), 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sh-pc-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ── Card Image ───────────────────────────────────────────────────────── */
.sh-pc-card__image-link {
	display: block;
	text-decoration: none;
}

.sh-pc-card__image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	position: relative;
	background: #f3f4f6;
}

.sh-pc-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.35s ease;
}

.sh-pc-card:hover .sh-pc-card__image img {
	transform: scale(1.04);
}

/* Placeholder (no image) */
.sh-pc-card__image--placeholder {
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sh-pc-placeholder-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c4c4c4;
}

.sh-pc-placeholder-icon svg {
	width: 48px;
	height: 48px;
}

/* ── Card Body ────────────────────────────────────────────────────────── */
.sh-pc-card__body {
	padding: 16px 16px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* ── Title ────────────────────────────────────────────────────────────── */
.sh-pc-card__title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.sh-pc-card__title a {
	color: #1a1a2e;
	text-decoration: none;
	transition: color 0.18s ease;
}

.sh-pc-card__title a:hover {
	color: #1e3a8a;
}

/* ── Count ────────────────────────────────────────────────────────────── */
.sh-pc-card__count {
	display: block;
	font-size: 0.78rem;
	color: #9ca3af;
	margin-bottom: 6px;
}

/* ── Description ──────────────────────────────────────────────────────── */
.sh-pc-card__desc {
	margin: 0 0 auto;
	padding-bottom: 14px;
	font-size: 0.875rem;
	color: #6b7280;
	line-height: 1.55;
}

/* ── Button ───────────────────────────────────────────────────────────── */
.sh-pc-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: auto;
	padding-top: 14px;
	font-size: 0.875rem;
	font-weight: 700;
	color: #1e3a8a;
	text-decoration: none;
	letter-spacing: 0.01em;
	border-top: 1px solid transparent;
	transition: color 0.18s ease, gap 0.18s ease;
}

.sh-pc-card__btn:hover {
	color: #1e40af;
	gap: 9px;
}

.sh-pc-card__btn-icon {
	font-size: 1em;
	transition: transform 0.18s ease;
}

.sh-pc-card__btn:hover .sh-pc-card__btn-icon {
	transform: translateX(3px);
}

/* ── Editor notice ────────────────────────────────────────────────────── */
.sh-pc-editor-notice {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px 24px;
	border: 2px dashed #c8c8c8;
	border-radius: 10px;
	color: #8a8a8a;
	text-align: center;
	background: #fafafa;
}

.sh-pc-editor-notice .eicon-product-categories {
	font-size: 40px;
	color: #c0c0c0;
}

.sh-pc-editor-notice p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	max-width: 340px;
}
