/**
 * Catalog SEO Generator — Product Block Styles
 *
 * @package Catalog_SEO_Generator
 * @since   1.0.0
 */

/* ── Product Card ── */
.csg-product-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.csg-product-card:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.csg-product-card--placeholder {
	padding: 24px;
	text-align: center;
	color: #888;
	border-style: dashed;
}

.csg-product-card__image {
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #f8f8f8;
}

.csg-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.csg-product-card__content {
	padding: 12px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.csg-product-card__title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 4px;
}

.csg-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.csg-product-card__title a:hover {
	text-decoration: underline;
}

.csg-product-card__price {
	font-size: 14px;
	font-weight: 700;
	color: #111;
	margin-bottom: 4px;
}

.csg-product-card__price del {
	color: #999;
	font-weight: 400;
	font-size: 12px;
}

.csg-product-card__price ins {
	text-decoration: none;
}

.csg-product-card__desc {
	font-size: 12px;
	color: #555;
	line-height: 1.45;
	margin: 0 0 8px;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.csg-product-card__action {
	margin-top: auto;
}

.csg-product-card__button {
	display: inline-block;
	padding: 6px 14px;
	background: #2271b1;
	color: #fff;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	text-align: center;
	transition: background 0.15s ease;
	width: 100%;
	box-sizing: border-box;
}

.csg-product-card__button:hover {
	background: #135e96;
	color: #fff;
}

/* ── Product Grid ── */
.csg-product-grid {
	margin: 24px 0;
}

.csg-product-grid__heading {
	margin-bottom: 16px;
}

.csg-product-grid__items {
	display: grid;
	gap: 14px;
}

.csg-grid-cols-1 .csg-product-grid__items { grid-template-columns: 1fr; }
.csg-grid-cols-2 .csg-product-grid__items { grid-template-columns: repeat(2, 1fr); }
.csg-grid-cols-3 .csg-product-grid__items { grid-template-columns: repeat(3, 1fr); }
.csg-grid-cols-4 .csg-product-grid__items { grid-template-columns: repeat(4, 1fr); }

/* Standalone card (not in grid) */
.csg-product-card:not(.csg-product-grid .csg-product-card) {
	max-width: 220px;
	margin: 16px 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.csg-grid-cols-3 .csg-product-grid__items,
	.csg-grid-cols-4 .csg-product-grid__items {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.csg-product-grid__items {
		grid-template-columns: 1fr;
	}
}

/* ── Inline Product Card (horizontal, compact) ── */
.csg-product-inline {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	margin: 10px 0 20px;
	transition: box-shadow 0.15s ease;
}

.csg-product-inline:hover {
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
}

.csg-product-inline__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 14px;
	text-decoration: none;
	color: inherit;
}

.csg-product-inline__image {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 4px;
	background: #f8f8f8;
	flex-shrink: 0;
}

.csg-product-inline__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.csg-product-inline__title {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.csg-product-inline__price {
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

.csg-product-inline__price del {
	color: #999;
	font-weight: 400;
	font-size: 12px;
}

.csg-product-inline__price ins {
	text-decoration: none;
}

.csg-product-inline__cta {
	flex-shrink: 0;
	padding: 6px 14px;
	background: #2271b1;
	color: #fff;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.csg-product-inline:hover .csg-product-inline__cta {
	background: #135e96;
}

@media (max-width: 480px) {
	.csg-product-inline__cta {
		display: none;
	}

	.csg-product-inline__link {
		gap: 10px;
		padding: 8px 10px;
	}
}
