/**
 * HostingTags Homepage Templates Stylesheet
 *
 * Covers: Deals Hub, Coupons Hub, Comparisons
 * Dense layout, no empty spaces, mobile-first responsive.
 *
 * @package HostingTags
 * @since   2.3.0
 */

/* ═══════════════════════════════════════
   CSS Custom Properties — synced with theme customizer.
   Overridden dynamically via PHP from Customizer settings.
   ═══════════════════════════════════════ */

/* CSS fallback :root — overridden dynamically by PHP hostingtags_design_tokens() */
:root {
	/* Primary (gmr_scheme-color) */
	--ht-primary: #124187;
	--ht-primary-light: #d1dced;
	--ht-primary-lighter: #e8edf4;
	--ht-primary-dark: #0d3066;
	--ht-primary-rgb: 18, 65, 135;

	/* Accent / CTA (gmr_hover-link-color) */
	--ht-accent: #FCBB23;
	--ht-accent-dark: #d9a010;

	/* Headings / Content */
	--ht-heading: #1a1a2e;
	--ht-content: #000000;
	--ht-link: #124187;

	/* Semantic: badges / discounts */
	--ht-badge: #dc2626;

	/* Semantic: success */
	--ht-success: #16a34a;
	--ht-success-dark: #15803d;
	--ht-success-light: #dcfce7;
	--ht-success-bg: #dcfce7;
	--ht-coupon-bg: #dcfce7;

	/* Semantic: danger / expired */
	--ht-danger: #dc2626;
	--ht-danger-dark: #991b1b;
	--ht-danger-light: #fef2f2;
	--ht-danger-bg: #fef2f2;
	--ht-coupon-expired-bg: #fef2f2;

	/* Stars / ratings */
	--ht-star: #e5a91e;

	/* Warning / expiry */
	--ht-warning: #f59e0b;
	--ht-warning-dark: #d97706;
	--ht-warning-light: #fef3c7;
	--ht-warning-bg: #fef3c7;

	/* Grays */
	--ht-gray-50: #f9fafb;
	--ht-gray-100: #f3f4f6;
	--ht-gray-200: #e5e7eb;
	--ht-gray-300: #d1d5db;
	--ht-gray-400: #9ca3af;
	--ht-gray-500: #6b7280;
	--ht-gray-600: #4b5563;
	--ht-gray-700: #374151;
	--ht-gray-800: #1f2937;
	--ht-gray-900: #111827;

	/* Layout */
	--ht-radius: 10px;
	--ht-radius-sm: 6px;
	--ht-radius-lg: 14px;
	--ht-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
	--ht-shadow-md: 0 4px 12px rgba(0,0,0,.08);
	--ht-shadow-lg: 0 10px 25px rgba(0,0,0,.1);
	--ht-transition: .2s ease;
}

/* ═══════════════════════════════════════
   INLINE SVG ICONS
   ═══════════════════════════════════════ */

.ht-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}
.ht-section-title .ht-icon {
	vertical-align: -3px;
	opacity: .75;
}
.ht-section-subtitle .ht-icon {
	vertical-align: -2px;
	opacity: .65;
}
.ht-stat .ht-icon {
	margin-right: 4px;
	opacity: .85;
}
.ht-coupon-header__sub .ht-icon {
	vertical-align: -3px;
	opacity: .8;
}
.ht-deal-row__price .ht-icon,
.ht-deal-row__discount .ht-icon {
	vertical-align: -2px;
	margin-right: 2px;
}
.ht-deal-card__rating .ht-icon,
.ht-review-row__rating .ht-icon {
	vertical-align: -2px;
}
.ht-provider-rating .ht-icon {
	vertical-align: -1px;
}
.ht-cat-name .ht-icon {
	vertical-align: -2px;
	opacity: .5;
	margin-right: 3px;
}
.ht-filter-btn .ht-icon {
	vertical-align: -2px;
}
.ht-copy-btn .ht-icon {
	vertical-align: middle;
}
.ht-exp-days .ht-icon {
	vertical-align: -2px;
	margin-right: 2px;
}
.ht-discount-card__pct .ht-icon {
	vertical-align: -3px;
}
.ht-compare-table th .ht-icon {
	vertical-align: -2px;
	opacity: .6;
	margin-right: 3px;
}
.ht-rated-meta .ht-icon {
	vertical-align: -2px;
	opacity: .55;
	margin-right: 2px;
}
.ht-review-row__date .ht-icon {
	vertical-align: -1px;
	opacity: .5;
	margin-right: 2px;
}
.ht-deal-card__coupon .ht-icon {
	vertical-align: middle;
}
.ht-cmp-header__title .ht-icon {
	vertical-align: -4px;
	opacity: .85;
}
.ht-view-all .ht-icon {
	vertical-align: -2px;
	margin-left: 3px;
}

/* ═══════════════════════════════════════
   SHARED — Section titles, grids, utils
   ═══════════════════════════════════════ */

.ht-section-title {
	font-size: calc(var(--ht-body-size, 14px) * 1.25);
	font-weight: 700;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ht-primary);
	color: var(--ht-heading);
}
.ht-section-subtitle {
	font-size: var(--ht-body-size, 14px);
	font-weight: 600;
	margin: 18px 0 8px;
	color: #333;
}
.ht-view-all {
	text-align: right;
	margin: 10px 0 0;
}
.ht-view-all a {
	font-weight: 600;
	color: var(--ht-primary);
}
.ht-expired {
	color: var(--ht-danger);
	font-weight: 600;
	font-size: calc(var(--ht-body-size, 14px) * 0.8);
}
.ht-active {
	color: var(--ht-success);
	font-weight: 600;
	font-size: calc(var(--ht-body-size, 14px) * 0.8);
}

/* ═══════════════════════════════════════
   HERO (Deals Hub)
   ═══════════════════════════════════════ */

.ht-hero {
	background: linear-gradient(135deg, var(--ht-primary) 0%, var(--ht-primary-light) 100%);
	color: #fff;
	padding: 36px 20px;
	text-align: center;
	border-radius: 6px;
	margin-bottom: 20px;
}
.ht-hero__title {
	font-size: calc(var(--ht-body-size, 14px) * 1.5);
	margin: 0 0 6px;
	font-weight: 800;
}
.ht-hero__tagline {
	margin: 0 0 16px;
	opacity: .9;
	font-size: var(--ht-body-size, 14px);
}
.ht-hero__search {
	display: flex;
	max-width: 520px;
	margin: 0 auto 16px;
	gap: 0;
}
.ht-hero__input {
	flex: 1;
	padding: 10px 14px;
	border: none;
	border-radius: 4px 0 0 4px;
	font-size: var(--ht-body-size, 14px);
	outline: none;
}
.ht-hero__btn {
	padding: 10px 20px;
	background: var(--ht-accent);
	color: #fff;
	border: none;
	border-radius: 0 4px 4px 0;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s;
}
.ht-hero__btn:hover {
	background: var(--ht-accent-dark);
}
.ht-hero__stats {
	display: flex;
	justify-content: center;
	gap: 24px;
}
.ht-stat {
	font-size: calc(var(--ht-body-size, 14px) * 0.9);
	opacity: .9;
}
.ht-stat strong {
	font-size: calc(var(--ht-body-size, 14px) * 1.3);
	display: block;
}

/* ═══════════════════════════════════════
   TOP PROVIDERS BAR
   ═══════════════════════════════════════ */

.ht-providers-bar {
	margin-bottom: 20px;
}
.ht-providers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
}
.ht-provider-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 12px 8px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	transition: box-shadow .2s, border-color .2s;
	text-align: center;
}
.ht-provider-card:hover {
	border-color: var(--ht-primary);
	box-shadow: 0 2px 8px rgba(var(--ht-primary-rgb), .15);
}
.ht-provider-card img {
	border-radius: 6px;
	margin-bottom: 6px;
	object-fit: contain;
}
.ht-provider-initial {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ht-primary);
	color: #fff;
	font-size: 1.4rem;
	font-weight: 700;
	border-radius: 8px;
	margin-bottom: 6px;
}
.ht-provider-initial--lg {
	width: 56px;
	height: 56px;
	font-size: 1.6rem;
}
.ht-provider-name {
	font-weight: 600;
	font-size: .85rem;
	line-height: 1.2;
}
.ht-provider-rating {
	font-size: .78rem;
	color: var(--ht-accent);
	font-weight: 700;
}
.ht-provider-count {
	font-size: .72rem;
	color: #888;
}

/* ═══════════════════════════════════════
   FEATURED DEALS GRID
   ═══════════════════════════════════════ */

.ht-featured {
	margin-bottom: 20px;
}
.ht-featured-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.ht-deal-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	padding: 14px;
	position: relative;
	transition: box-shadow .2s;
}
.ht-deal-card:hover {
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.ht-deal-badge {
	position: absolute;
	top: -1px;
	right: 10px;
	background: var(--ht-badge);
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 0 0 4px 4px;
}
.ht-deal-card__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.ht-deal-card__logo {
	border-radius: 6px;
	object-fit: contain;
}
.ht-deal-card__provider {
	font-weight: 600;
	font-size: .82rem;
	color: #555;
	display: block;
}
.ht-deal-card__plan {
	font-size: .75rem;
	color: #888;
}
.ht-deal-card__title {
	font-size: .95rem;
	margin: 0 0 8px;
	line-height: 1.3;
}
.ht-deal-card__title a {
	color: var(--ht-heading);
	text-decoration: none;
}
.ht-deal-card__title a:hover {
	color: var(--ht-primary);
}
.ht-deal-card__footer {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.ht-deal-card__price {
	font-weight: 700;
	color: var(--ht-primary);
	font-size: .95rem;
}
.ht-deal-card__price small {
	font-weight: 400;
	font-size: .75rem;
	color: #888;
}
.ht-deal-card__rating {
	font-size: .85rem;
	color: var(--ht-star);
	font-weight: 600;
}
.ht-deal-card__rating small {
	color: #999;
	font-weight: 400;
}
.ht-deal-card__coupon {
	font-size: 1rem;
}

/* ═══════════════════════════════════════
   MAIN GRID (content + sidebar)
   ═══════════════════════════════════════ */

.ht-main-grid {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 20px;
	margin-bottom: 20px;
}

/* ── Latest Deals List ── */
.ht-deals-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.ht-deal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	text-decoration: none;
	color: #333;
	border-bottom: 1px solid #f0f0f0;
	transition: background .15s;
}
.ht-deal-row:hover {
	background: #f8f9fa;
}
.ht-deal-row__left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.ht-deal-row__left img {
	border-radius: 4px;
	flex-shrink: 0;
}
.ht-deal-row__title {
	display: block;
	font-size: .88rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 300px;
}
.ht-deal-row__info {
	font-size: .75rem;
	color: #888;
}
.ht-deal-row__right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
.ht-deal-row__price {
	font-weight: 700;
	color: var(--ht-primary);
	font-size: .88rem;
}
.ht-deal-row__discount {
	background: var(--ht-badge);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 3px;
}

/* ── Categories Sidebar ── */
.ht-cats-sidebar {
	min-width: 0;
}
.ht-cats-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ht-cats-list li a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	text-decoration: none;
	color: #333;
	border-bottom: 1px solid #f0f0f0;
	transition: background .15s;
}
.ht-cats-list li a:hover {
	background: #f8f9fa;
}
.ht-cat-name {
	font-weight: 500;
	font-size: .88rem;
}
.ht-cat-count {
	background: #e8e8e8;
	color: #555;
	font-size: .72rem;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
}
.ht-quick-links {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
}
.ht-quick-links li {
	break-inside: avoid;
	padding: 3px 0;
}
.ht-quick-links li a {
	color: var(--ht-primary);
	text-decoration: none;
	font-size: .82rem;
}
.ht-quick-links li a:hover {
	text-decoration: underline;
}

/* ═══════════════════════════════════════
   COUPONS HUB
   ═══════════════════════════════════════ */

.ht-coupon-header {
	text-align: center;
	padding: 28px 16px;
	background: linear-gradient(135deg, var(--ht-primary) 0%, var(--ht-primary-light) 100%);
	color: #fff;
	border-radius: 6px;
	margin-bottom: 20px;
}
.ht-coupon-header__title {
	font-size: 1.6rem;
	margin: 0 0 6px;
	font-weight: 800;
}
.ht-coupon-header__sub {
	margin: 0;
	font-size: .95rem;
	opacity: .9;
}
.ht-coupon-header__sub strong {
	font-size: 1.2rem;
}

/* Provider Filter */
.ht-provider-filter {
	margin-bottom: 18px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ht-provider-filter__list {
	display: flex;
	gap: 6px;
	padding: 4px 0;
	flex-wrap: nowrap;
}
/* .ht-filter-btn base styles defined in reviews.css — only overrides here */
.ht-filter-btn--active {
	background: var(--ht-primary);
	color: #fff;
	border-color: var(--ht-primary);
}
.ht-filter-btn img {
	border-radius: 3px;
}
.ht-filter-count {
	background: rgba(255,255,255,.3);
	font-size: .7rem;
	padding: 1px 5px;
	border-radius: 8px;
}
.ht-filter-btn--active .ht-filter-count,
.ht-filter-btn:hover .ht-filter-count {
	background: rgba(255,255,255,.25);
}

/* Top Discounts Grid */
.ht-top-discounts {
	margin-bottom: 20px;
}
.ht-discount-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}
.ht-discount-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	padding: 14px;
	position: relative;
}
.ht-discount-card--expired {
	opacity: .6;
}
.ht-discount-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.ht-discount-card__top img {
	border-radius: 6px;
	object-fit: contain;
}
.ht-discount-card__pct {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--ht-badge);
}
.ht-discount-card__title {
	font-size: .9rem;
	margin: 0 0 4px;
	line-height: 1.3;
}
.ht-discount-card__title a {
	color: var(--ht-heading);
	text-decoration: none;
}
.ht-discount-card__title a:hover {
	color: var(--ht-primary);
}
.ht-discount-card__provider {
	font-size: .78rem;
	color: #888;
	display: block;
	margin-bottom: 8px;
}
.ht-discount-card__expiry {
	display: block;
	margin-top: 6px;
	font-size: .78rem;
}

/* Coupon Code Chip */
.ht-coupon-code {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--ht-coupon-bg);
	border: 1px dashed var(--ht-success);
	border-radius: 4px;
	padding: 3px 8px;
}
.ht-coupon-code code {
	font-family: monospace;
	font-size: .82rem;
	font-weight: 600;
	color: var(--ht-success);
	letter-spacing: .5px;
	background: none;
	padding: 0;
}
.ht-coupon-code--expired {
	border-color: var(--ht-danger);
	background: var(--ht-coupon-expired-bg);
}
.ht-coupon-code--expired code {
	color: var(--ht-danger);
	text-decoration: line-through;
}
.ht-copy-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: .9rem;
	padding: 0;
	line-height: 1;
}

/* All Coupons Grid */
.ht-all-coupons {
	margin-bottom: 20px;
}
.ht-coupons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 10px;
}
.ht-coupon-item {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	padding: 12px;
	transition: box-shadow .2s;
}
.ht-coupon-item:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ht-coupon-item--expired {
	opacity: .55;
}
.ht-coupon-item[data-provider].ht-hidden {
	display: none;
}
.ht-coupon-item__head {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ht-coupon-item__head img {
	border-radius: 4px;
	flex-shrink: 0;
}
.ht-coupon-item__title {
	font-weight: 600;
	font-size: .88rem;
	color: var(--ht-heading);
	text-decoration: none;
	display: block;
	line-height: 1.2;
}
.ht-coupon-item__title:hover {
	color: var(--ht-primary);
}
.ht-coupon-item__prov {
	font-size: .75rem;
	color: #888;
}
.ht-coupon-item__badge {
	margin-left: auto;
	background: var(--ht-badge);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 3px;
	flex-shrink: 0;
}
.ht-coupon-item__body {
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}
.ht-coupon-item__meta {
	display: flex;
	gap: 10px;
	font-size: .78rem;
	color: #666;
}

/* Expiring Soon */
.ht-expiring {
	margin-bottom: 20px;
}
.ht-expiring-list {
	display: flex;
	flex-direction: column;
}
.ht-expiring-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	transition: background .15s;
}
.ht-expiring-item:hover {
	background: #fffbf0;
}
.ht-expiring-item strong {
	font-size: .88rem;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ht-exp-prov {
	font-size: .78rem;
	color: #888;
}
.ht-exp-disc {
	background: var(--ht-badge);
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 3px;
}
.ht-exp-days {
	font-weight: 700;
	color: var(--ht-warning);
	font-size: .82rem;
	white-space: nowrap;
}

/* Provider Directory */
.ht-prov-directory {
	margin-bottom: 20px;
}
.ht-prov-dir-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 8px;
}
.ht-prov-dir-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-size: .85rem;
	font-weight: 500;
	transition: border-color .2s;
}
.ht-prov-dir-item:hover {
	border-color: var(--ht-primary);
}
.ht-prov-dir-item img {
	border-radius: 3px;
}
.ht-prov-dir-count {
	margin-left: auto;
	background: var(--ht-primary);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 8px;
}

/* ═══════════════════════════════════════
   COMPARISONS HUB
   ═══════════════════════════════════════ */

.ht-cmp-header {
	text-align: center;
	padding: 28px 16px;
	background: linear-gradient(135deg, var(--ht-primary) 0%, var(--ht-primary-light) 100%);
	color: #fff;
	border-radius: 6px;
	margin-bottom: 20px;
}
.ht-cmp-header__title {
	font-size: 1.6rem;
	margin: 0 0 6px;
	font-weight: 800;
}
.ht-cmp-header__sub {
	margin: 0 0 14px;
	font-size: .92rem;
	opacity: .9;
}
.ht-cmp-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 24px;
	background: #fff;
	color: var(--ht-primary);
	font-weight: 700;
	font-size: .92rem;
	border-radius: 6px;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
.ht-cmp-header__cta:hover {
	background: rgba(255,255,255,.9);
	transform: translateY(-1px);
	color: var(--ht-primary-dark);
}

/* ── Table Toolbar ── */
.ht-table-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}
.ht-table-toolbar .ht-section-title {
	margin: 0;
}
.ht-table-toolbar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ht-table-search {
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: .85rem;
	width: 180px;
	transition: border-color .2s;
}
.ht-table-search:focus {
	outline: none;
	border-color: var(--ht-primary);
	box-shadow: 0 0 0 2px rgba(var(--ht-primary-rgb),.1);
}
.ht-hub-compare-btn {
	white-space: nowrap;
}

/* ── Sortable Columns ── */
.ht-sortable {
	cursor: pointer;
	user-select: none;
	transition: color .15s;
}
.ht-sortable:hover {
	color: var(--ht-primary);
}
.ht-sort-arrow::after {
	content: '⇅';
	margin-left: 4px;
	opacity: .35;
	font-size: .75rem;
}
.ht-sorted-asc .ht-sort-arrow::after {
	content: '↑';
	opacity: 1;
	color: var(--ht-primary);
}
.ht-sorted-desc .ht-sort-arrow::after {
	content: '↓';
	opacity: 1;
	color: var(--ht-primary);
}

/* ── Checkbox column ── */
.ht-th-check,
.ht-td-check {
	width: 36px;
	text-align: center;
}
.ht-row-check,
#ht-check-all {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--ht-primary);
}
tr.ht-row-selected {
	background: rgba(var(--ht-primary-rgb), .04);
}

/* Top Rated Grid */
.ht-top-rated {
	margin-bottom: 20px;
}
.ht-top-rated-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
	gap: 12px;
}
.ht-rated-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 12px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	text-align: center;
	position: relative;
	transition: box-shadow .2s;
}
.ht-rated-card:hover {
	box-shadow: 0 3px 12px rgba(var(--ht-primary-rgb), .12);
}
.ht-rated-rank {
	position: absolute;
	top: 8px;
	left: 8px;
	font-size: .7rem;
	font-weight: 800;
	color: var(--ht-primary);
}
.ht-rated-card img {
	border-radius: 8px;
	margin-bottom: 8px;
	object-fit: contain;
}
.ht-rated-card h3 {
	font-size: .92rem;
	margin: 0 0 6px;
}
.ht-rated-score {
	margin-bottom: 6px;
}
.ht-score-num {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--ht-primary);
}
.ht-score-max {
	font-size: .85rem;
	color: #888;
}
.ht-rated-meta {
	font-size: .75rem;
	color: #888;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Comparison Table */
.ht-compare-table-wrap {
	margin-bottom: 20px;
}
.ht-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ht-compare-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85rem;
	min-width: 700px;
}
.ht-compare-table th {
	background: #f8f9fa;
	padding: 10px 12px;
	text-align: left;
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	color: #555;
	border-bottom: 2px solid var(--ht-primary);
	white-space: nowrap;
}
.ht-compare-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}
.ht-compare-table tbody tr:hover {
	background: #f8f9fa;
}
.ht-cmp-provider {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}
.ht-cmp-provider img {
	border-radius: 3px;
}
.ht-cmp-provider a {
	color: var(--ht-heading);
	text-decoration: none;
}
.ht-cmp-provider a:hover {
	color: var(--ht-primary);
}
.ht-cmp-rating {
	font-weight: 700;
	font-size: .85rem;
	padding: 2px 8px;
	border-radius: 4px;
}
.ht-cmp-rating--high {
	background: var(--ht-success-bg);
	color: var(--ht-success-dark);
}
.ht-cmp-rating--mid {
	background: var(--ht-warning-bg);
	color: var(--ht-warning-dark);
}
.ht-cmp-rating--low {
	background: var(--ht-danger-bg);
	color: var(--ht-danger);
}
.ht-cmp-btn {
	display: inline-block;
	padding: 4px 12px;
	background: var(--ht-primary);
	color: #fff;
	border-radius: 3px;
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ht-cmp-btn:hover {
	background: var(--ht-primary-dark);
	color: #fff;
}

/* Reviews List */
.ht-latest-reviews {
	min-width: 0;
}
.ht-reviews-list {
	display: flex;
	flex-direction: column;
}
.ht-review-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	transition: background .15s;
}
.ht-review-row:hover {
	background: #f8f9fa;
}
.ht-review-row img {
	border-radius: 4px;
	flex-shrink: 0;
}
.ht-review-row__info {
	flex: 1;
	min-width: 0;
}
.ht-review-row__info strong {
	display: block;
	font-size: .88rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ht-review-row__info span {
	font-size: .75rem;
	color: #888;
}
.ht-review-row__rating {
	color: var(--ht-star);
	font-weight: 700;
	font-size: .88rem;
	white-space: nowrap;
}
.ht-review-row__date {
	font-size: .75rem;
	color: #999;
	white-space: nowrap;
}

/* ═══════════════════════════════════════
   HUB SECTIONS (full-width layout)
   ═══════════════════════════════════════ */
.ht-hub-sections {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-bottom: 24px;
}

/* ── Reviews Grid ── */
.ht-reviews-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
	gap: 10px;
	overflow: hidden;
}
.ht-review-card-sm {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	max-width: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	transition: box-shadow .2s, border-color .2s;
}
.ht-review-card-sm:hover {
	border-color: var(--ht-primary);
	box-shadow: 0 2px 8px rgba(var(--ht-primary-rgb), .1);
}
.ht-review-card-sm img {
	border-radius: 6px;
	flex-shrink: 0;
	object-fit: contain;
}
.ht-review-card-sm .ht-provider-initial {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ht-gray-100);
	border-radius: 6px;
	font-weight: 800;
	font-size: 1.1rem;
	color: var(--ht-primary);
	flex-shrink: 0;
}
.ht-review-card-sm__body {
	flex: 1;
	min-width: 0;
}
.ht-review-card-sm__body strong {
	display: block;
	font-size: .88rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--ht-heading);
	max-width: 100%;
}
.ht-review-card-sm__meta {
	font-size: .75rem;
	color: #888;
}
.ht-review-card-sm__right {
	text-align: right;
	flex-shrink: 0;
}
.ht-review-card-sm__rating {
	display: block;
	color: var(--ht-star);
	font-weight: 700;
	font-size: .88rem;
}
.ht-review-card-sm__date {
	font-size: .7rem;
	color: #999;
}

/* ── Categories Grid ── */
.ht-cats-section {
	margin-bottom: 0;
}
.ht-cats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
}
.ht-cat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 10px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	text-decoration: none;
	color: #333;
	text-align: center;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ht-cat-card:hover {
	border-color: var(--ht-primary);
	box-shadow: 0 3px 10px rgba(var(--ht-primary-rgb), .1);
	transform: translateY(-2px);
}
.ht-cat-card__icon {
	color: var(--ht-primary);
	margin-bottom: 2px;
}
.ht-cat-card__name {
	font-weight: 700;
	font-size: .88rem;
	color: var(--ht-heading);
}
.ht-cat-card__count {
	font-size: .72rem;
	color: #999;
}

/* ── All Providers Mini Cards ── */
.ht-all-providers {
	margin-bottom: 0;
}
.ht-providers-mini-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 8px;
}
.ht-provider-mini {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	font-size: .82rem;
	font-weight: 600;
	transition: border-color .15s, background .15s;
}
.ht-provider-mini:hover {
	border-color: var(--ht-primary);
	background: #fafbff;
	color: var(--ht-primary);
}
.ht-provider-mini img {
	border-radius: 4px;
	flex-shrink: 0;
	object-fit: contain;
}
.ht-provider-mini__initial {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ht-gray-100);
	border-radius: 4px;
	font-weight: 800;
	font-size: .78rem;
	color: var(--ht-primary);
	flex-shrink: 0;
}
.ht-provider-mini__name {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ht-provider-mini__rating {
	font-size: .72rem;
	font-weight: 700;
	color: var(--ht-star);
	flex-shrink: 0;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
	.ht-main-grid {
		grid-template-columns: 1fr;
	}
	.ht-providers-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}
	.ht-featured-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}
	.ht-discount-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
	.ht-coupons-grid {
		grid-template-columns: 1fr;
	}
	.ht-top-rated-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
	.ht-hero__title,
	.ht-coupon-header__title,
	.ht-cmp-header__title {
		font-size: 1.3rem;
	}
	.ht-table-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.ht-table-toolbar__actions {
		flex-wrap: wrap;
	}
	.ht-table-search {
		width: 100%;
	}
	.ht-hero__stats {
		gap: 14px;
	}
	.ht-stat strong {
		font-size: 1.1rem;
	}
	.ht-deal-row__title {
		max-width: 180px;
	}
	.ht-prov-dir-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
	.ht-reviews-grid {
		grid-template-columns: 1fr;
	}
	.ht-review-card-sm {
		padding: 10px 12px;
		gap: 10px;
	}
	.ht-review-card-sm__body strong {
		white-space: normal;
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}
	.ht-review-card-sm__right {
		display: none;
	}
	.ht-cats-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}
	.ht-providers-mini-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
}

@media (max-width: 480px) {
	.ht-hero {
		padding: 24px 14px;
	}
	.ht-hero__search {
		flex-direction: column;
		gap: 6px;
	}
	.ht-hero__input {
		border-radius: 4px;
	}
	.ht-hero__btn {
		border-radius: 4px;
	}
	.ht-providers-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.ht-featured-grid {
		grid-template-columns: 1fr;
	}
	.ht-discount-grid {
		grid-template-columns: 1fr 1fr;
	}
	.ht-top-rated-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.ht-providers-mini-grid {
		grid-template-columns: 1fr 1fr;
	}
	.ht-cats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ============================================================
   MOBILE RESPONSIVE ENHANCEMENTS — Homepage Templates
   ============================================================ */

/* --- Containers: prevent horizontal overflow --- */
.ht-deals-hub,
.ht-coupons-hub,
.ht-compare-hub {
	overflow-x: hidden;
	max-width: 100%;
}

@media (max-width: 768px) {
	/* Deal rows: stack on mobile */
	.ht-deal-row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.ht-deal-row__logo {
		margin: 0 auto 8px;
	}
	.ht-deal-row__info {
		text-align: center;
	}
	.ht-deal-row__cta {
		text-align: center;
	}

	/* Section headings breathe */
	.ht-section__heading {
		font-size: calc(var(--ht-body-size, 14px) * 1.43);
		padding: 0 4px;
	}

	/* Coupon cards grid */
	.ht-coupons-grid {
		grid-template-columns: 1fr;
	}

	/* Category navigation */
	.ht-cat-pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.ht-cat-pills::-webkit-scrollbar {
		display: none;
	}
}

@media (max-width: 480px) {
	/* Tighter section spacing */
	.ht-section {
		padding: 16px 0;
	}

	/* Table toolbar stacked */
	.ht-table-toolbar {
		flex-direction: column;
		gap: 8px;
	}

	/* Provider logos smaller grid */
	.ht-providers-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}
}

@media (max-width: 360px) {
	.ht-hero {
		padding: 18px 8px;
	}
	.ht-hero__title {
		font-size: 1.1rem;
	}
	.ht-providers-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.ht-discount-grid {
		grid-template-columns: 1fr;
	}
}
