/* ==========================================================================
   RentCenter WC Terms — Public Styles
   Minimal, theme-agnostic. Uses WC classes where possible.
   ========================================================================== */

/* ---------- Term Grid ---------- */

.rcwct-term-grid {
	display: grid;
	grid-template-columns: repeat(var(--rcwct-columns, 4), 1fr);
	gap: 20px;
}

@media (max-width: 768px) {
	.rcwct-term-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.rcwct-term-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Term Card ---------- */

.rcwct-term-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #d0d0d0;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	overflow: hidden;
}

.rcwct-term-card:hover {
	border-color: #999;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rcwct-term-card-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rcwct-term-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcwct-term-card-placeholder .rcwct-placeholder-icon::before {
	content: "";
	display: block;
	width: 40px;
	height: 40px;
	background: #ccc;
	border-radius: 4px;
}

.rcwct-term-card-content {
	padding: 16px;
}

.rcwct-term-card-title {
	margin: 0 0 6px;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
}

.rcwct-term-card-desc {
	margin: 0;
	font-size: 0.9em;
	color: #555;
	line-height: 1.4;
}

/* ---------- Scroll Container (Archive shortcode) ---------- */

.rcwct-archive-section {
	margin-bottom: 40px;
}

.rcwct-archive-section-title {
	margin-bottom: 16px;
	font-size: 1.4em;
}

.rcwct-scroll-container {
	position: relative;
}

.rcwct-scroll-row {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	cursor: grab;
	padding-bottom: 4px;
}

.rcwct-scroll-row::-webkit-scrollbar {
	display: none;
}

.rcwct-scroll-row.rcwct-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.rcwct-scroll-row .rcwct-term-card {
	flex: 0 0 260px;
	min-width: 200px;
}

.rcwct-scroll-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 36px;
	height: 36px;
	border: 1px solid #ccc;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s;
}

.rcwct-scroll-arrow:hover {
	border-color: #999;
}

.rcwct-scroll-left {
	left: -12px;
}

.rcwct-scroll-right {
	right: -12px;
}

/* ---------- Featured Term ---------- */

.rcwct-featured-term {
	display: flex;
	border: 1px solid rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.rcwct-featured-image {
	flex: 0 0 280px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
}

.rcwct-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcwct-featured-content {
	flex: 1;
	padding: 24px 32px;
	display: flex;
	flex-direction: column;
}

.rcwct-featured-title {
	margin: 0 0 8px;
	font-size: 1.5em;
}

.rcwct-featured-desc {
	margin: 0 0 20px;
	color: #555;
	line-height: 1.5;
}

.rcwct-featured-products {
	margin-bottom: 20px;
}

.rcwct-featured-products .products {
	display: flex;
	gap: 16px;
}

.rcwct-featured-link {
	margin-top: auto;
	text-decoration: underline;
	color: inherit;
}

.rcwct-featured-link:hover {
	color: #000;
}

@media (max-width: 768px) {
	.rcwct-featured-term {
		flex-direction: column;
	}

	.rcwct-featured-image {
		flex: none;
		aspect-ratio: 16 / 9;
	}
}

/* ---------- Single Term Page ---------- */

.rcwct-single-term-hero {
	display: flex;
	gap: 32px;
	margin-bottom: 32px;
}

.rcwct-hero-content {
	flex: 1;
}

.rcwct-hero-content h1 {
	margin: 0 0 12px;
}

.rcwct-hero-description {
	color: #555;
	line-height: 1.6;
	margin-bottom: 0;
}

.rcwct-hero-image-wrap {
	flex: 0 0 280px;
}

.rcwct-hero-image-wrap img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

@media (max-width: 768px) {
	.rcwct-single-term-hero {
		flex-direction: column;
	}

	.rcwct-hero-image-wrap {
		flex: none;
	}
}

/* ---------- Filter Pills ---------- */

.rcwct-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	align-items: center;
}

.rcwct-filter-label {
	font-weight: 600;
	margin-right: 4px;
}

.rcwct-pill {
	display: inline-block;
	padding: 4px 16px;
	border: 1px solid #333;
	border-radius: 40px;
	background: #fff;
	color: #333;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: 600;
	text-transform: uppercase;
	transition: background 0.2s, color 0.2s;
}

.rcwct-pill:hover,
.rcwct-pill.rcwct-pill-active {
	background: #333;
	color: #fff;
}

.rcwct-pill-clear {
	border-style: dashed;
	font-weight: 400;
	text-transform: none;
}

.rcwct-pill-clear:hover {
	background: #f5f5f5;
	color: #333;
}

/* ---------- Product Actions ---------- */

.rcwct-product-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

.rcwct-add-all-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #333;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 1em;
	text-decoration: none;
}

.rcwct-add-all-btn:hover {
	background: #000;
	color: #fff;
}

/* ---------- Footer Links ---------- */

.rcwct-term-footer {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #eee;
	text-align: center;
}

.rcwct-term-footer p {
	margin: 8px 0;
}

.rcwct-term-footer a {
	color: inherit;
	text-decoration: underline;
}
