/* Treetop Mortgage custom styles */

:root {
	--ttm-teal: #113c3d;
	--ttm-teal-dark: #0b2a2b;
	--ttm-green: #3e9b43;
	--ttm-gold: #c99a3b;
	--ttm-orange: #f3752b;
	--ttm-cream: #fbf7ee;
	--ttm-ink: #1b1d1d;
	--ttm-muted: #5b6566;
	--ttm-line: #e7e2d6;
}

/* ===================================================================
   Library (WooCommerce shop / product category archives)
   =================================================================== */

.ttm-library {
	background: #ffffff;
	color: var(--ttm-ink);
}

/* Hero */
.ttm-library-hero {
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(62, 155, 67, 0.35), transparent 60%),
		linear-gradient(135deg, var(--ttm-teal) 0%, var(--ttm-teal-dark) 100%);
	color: #ffffff;
	padding: 72px 24px 64px;
	text-align: center;
	margin: 0 !important;
}
.ttm-library-hero .ttm-eyebrow {
	display: inline-block;
	margin: 0 auto 14px;
	padding: 6px 16px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #f2d488;
}
.ttm-library-hero .ttm-library-title,
.ttm-library-hero .wp-block-query-title {
	color: #ffffff !important;
	font-size: clamp(36px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 auto 14px;
}
.ttm-library-hero .ttm-library-lead {
	max-width: 640px;
	margin: 0 auto;
	font-size: 18px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
}

/* Trust strip */
.ttm-library-trust {
	background: var(--ttm-cream);
	border-bottom: 1px solid var(--ttm-line);
	padding: 18px 24px;
	margin: 0 !important;
}
.ttm-trust-row {
	gap: 12px 40px !important;
}
.ttm-library-trust .ttm-trust {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--ttm-teal);
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.ttm-library-trust .ttm-trust::before {
	content: "";
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ttm-green) no-repeat center / 12px 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.4 2.4L10 3' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	flex: 0 0 auto;
}

/* Body + toolbar */
.ttm-library-body {
	padding: 48px 24px 88px;
}
.ttm-library-toolbar {
	margin: 0 0 28px !important;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--ttm-line);
	gap: 12px;
}
.ttm-library-toolbar .woocommerce-result-count,
.ttm-library-toolbar .wc-block-product-results-count {
	margin: 0;
	color: var(--ttm-muted);
	font-size: 15px;
}
.ttm-library-toolbar .woocommerce-ordering {
	margin: 0;
}
.ttm-library-toolbar select.orderby {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23113c3d' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
	border: 1px solid var(--ttm-line);
	border-radius: 10px;
	padding: 0 42px 0 14px;
	height: 44px !important;
	min-height: 44px;
	line-height: 42px !important;
	font-size: 15px;
	color: var(--ttm-ink);
	cursor: pointer;
}

/* Product grid */
.ttm-product-grid .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ttm-product-grid .wc-block-product-template > li {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	display: flex;
}
@media (max-width: 1080px) {
	.ttm-product-grid .wc-block-product-template { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	.ttm-product-grid .wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 480px) {
	.ttm-product-grid .wc-block-product-template { grid-template-columns: 1fr; }
}

/* Card */
.ttm-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0 !important;
	background: #ffffff;
	border: 1px solid var(--ttm-line);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(17, 60, 61, 0.04), 0 8px 24px rgba(17, 60, 61, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ttm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 2px 4px rgba(17, 60, 61, 0.06), 0 18px 40px rgba(17, 60, 61, 0.12);
}

.ttm-card .ttm-card-media {
	position: relative;
	margin: 0 !important;
	background: var(--ttm-cream);
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ttm-card .ttm-card-media > a {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	box-sizing: border-box;
	overflow: hidden;
}
.ttm-card .ttm-card-media img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain !important;
	border-radius: 8px;
	transition: transform 0.3s ease;
}
.ttm-card:hover .ttm-card-media img {
	transform: scale(1.03);
}

/* Sale badge */
.ttm-card .wc-block-components-product-sale-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	margin: 0;
	background: var(--ttm-orange);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 0 4px 12px rgba(243, 117, 43, 0.35);
}

.ttm-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 8px;
	padding: 18px 20px 20px;
	margin: 0 !important;
}
.ttm-card-body > * {
	margin: 0 !important;
}
.ttm-card .ttm-card-cat,
.ttm-card .ttm-card-cat a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ttm-green);
	text-decoration: none;
}
.ttm-card .ttm-card-title,
.ttm-card .ttm-card-title a {
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--ttm-ink);
	text-decoration: none;
}
.ttm-card .ttm-card-title a:hover {
	color: var(--ttm-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.ttm-card .ttm-card-price,
.ttm-card .ttm-card-price .woocommerce-Price-amount {
	font-size: 18px;
	font-weight: 700;
	color: var(--ttm-teal);
}
.ttm-card .ttm-card-price del,
.ttm-card .ttm-card-price del .woocommerce-Price-amount {
	font-size: 15px;
	font-weight: 500;
	color: #98a1a2;
	margin-right: 6px;
}
.ttm-card .ttm-card-price ins {
	text-decoration: none;
}
.ttm-card .ttm-card-button {
	margin-top: auto !important;
	padding-top: 8px;
	width: 100%;
}
.ttm-card .ttm-card-button .wp-block-button__link,
.ttm-card .ttm-card-button .wc-block-components-product-button__button,
.ttm-card .ttm-card-button a.button,
.ttm-card .ttm-card-button button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	background: var(--ttm-teal) !important;
	color: #ffffff !important;
	border: 0;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	text-transform: none;
	transition: background 0.2s ease;
}
.ttm-card .ttm-card-button .wp-block-button__link:hover,
.ttm-card .ttm-card-button .wc-block-components-product-button__button:hover,
.ttm-card .ttm-card-button a.button:hover,
.ttm-card .ttm-card-button button:hover {
	background: var(--ttm-green) !important;
}
.ttm-card .ttm-card-button .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	text-align: center;
	color: var(--ttm-teal);
}

/* Pagination */
.ttm-library .wp-block-query-pagination {
	margin-top: 40px;
	gap: 8px;
}
.ttm-library .wp-block-query-pagination a,
.ttm-library .wp-block-query-pagination .current {
	padding: 6px 12px;
	border-radius: 8px;
	color: var(--ttm-teal);
}
.ttm-library .wp-block-query-pagination .current {
	background: var(--ttm-teal);
	color: #fff;
}

@media (max-width: 600px) {
	.ttm-library-hero { padding: 52px 20px 44px; }
	.ttm-library-hero .ttm-library-lead { font-size: 16px; }
	.ttm-library-body { padding: 32px 16px 64px; }
	.ttm-trust-row { gap: 10px 24px !important; }
}

/* ===================================================================
   Apps directory (/apps/)
   =================================================================== */
.ttm-apps { max-width: 1180px; margin: 0 auto; }
.ttm-apps-hero { background: radial-gradient(1000px 360px at 85% -10%, rgba(62,155,67,.35), transparent 60%), linear-gradient(135deg, var(--ttm-teal), var(--ttm-teal-dark)); color: #fff; border-radius: 20px; padding: 48px 32px; text-align: center; margin-bottom: 28px; }
.ttm-apps-eyebrow { display: inline-block; padding: 6px 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #f2d488; margin-bottom: 12px; }
.ttm-apps-hero h1 { color: #fff !important; font-size: clamp(36px, 5vw, 52px); margin: 0 0 10px; }
.ttm-apps-hero p { max-width: 620px; margin: 0 auto; color: rgba(255,255,255,.85); font-size: 18px; line-height: 1.6; }
.ttm-apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.ttm-app-card { display: grid; grid-template-columns: 150px 1fr; gap: 20px; background: #fff; border: 1px solid var(--ttm-line); border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(17,60,61,.04), 0 8px 24px rgba(17,60,61,.06); }
.ttm-app-card.soon { background: var(--ttm-cream); box-shadow: none; border-style: dashed; }
.ttm-app-media { background: var(--ttm-cream); border-radius: 14px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
.ttm-app-card.soon .ttm-app-media { background: #fff; }
.ttm-app-media svg { width: 78%; height: auto; }
.ttm-app-body h2 { font-size: 22px; margin: 6px 0 2px; color: var(--ttm-teal); }
.ttm-app-body p { margin: 0 0 10px; color: var(--ttm-ink); font-size: 15px; line-height: 1.55; }
.ttm-app-body .ttm-app-tag { color: var(--ttm-muted); font-size: 14px; margin-bottom: 8px; }
.ttm-app-body ul { margin: 0 0 14px; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.ttm-app-body li { position: relative; padding-left: 22px; font-size: 14px; }
.ttm-app-body li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ttm-green); }
.ttm-app-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ttm-green); }
.ttm-app-card.soon .ttm-app-badge { color: var(--ttm-gold); }
.ttm-app-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ttm-app-btn { display: inline-block; background: var(--ttm-teal); color: #fff !important; border: 1px solid var(--ttm-teal); border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.ttm-app-btn:hover { background: var(--ttm-green); border-color: var(--ttm-green); }
.ttm-app-btn.ghost { background: #fff; color: var(--ttm-teal) !important; border-color: var(--ttm-line); }
.ttm-app-note { font-size: 13px !important; color: var(--ttm-muted) !important; margin-top: 10px !important; }
@media (max-width: 900px) { .ttm-apps-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ttm-app-card { grid-template-columns: 1fr; } .ttm-app-media { max-width: 160px; } .ttm-apps-hero { padding: 36px 20px; } }
