/* =========================================================
   Forex Tools — trade.css
   Bento-карточка, демо-кнопка, sticky CTA, сравнение,
   equity-hover, trust-блок с фоновой сеткой как в stats-section,
   flat floating icons в hero.
   Карточки trust-блока непрозрачные: сетка видна только на фоне секции.
   Грид trust-блока auto-fit: корректно ложится при любом числе карточек.
   ========================================================= */

/* ---------- Trust-блок после hero ---------- */
.ft-trust {
	position: relative;
	overflow: hidden;
	background: #081831;
	padding: clamp(32px, 5vw, 72px) 0;
	color: #ffffff;
}

.ft-trust::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		repeating-linear-gradient(45deg, var(--grid-line) 0 1px, transparent 1px var(--grid-size)),
		repeating-linear-gradient(-45deg, var(--grid-line) 0 1px, transparent 1px var(--grid-size)),
		radial-gradient(circle at 12% 80%, color-mix(in srgb, var(--color-p1) 28%, transparent) 0%, transparent 55%);
}

.ft-trust > .container {
	position: relative;
	z-index: 1;
}

.ft-trust-title {
	font-size: clamp(22px, 2.4vw, 32px);
	margin: 0 0 clamp(20px, 3vw, 40px);
	text-align: center;
	color: #47BAC6;
}

/* auto-fit вместо repeat(4,1fr): три карточки заполняют ряд без дыры,
   на планшете/мобильном перестраиваются сами — медиа-запросы не нужны. */
.ft-trust-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: clamp(16px, 2vw, 32px);
}

/* Непрозрачный фон карточки: сетка секции под ней не просвечивает. */
.ft-trust-item {
	text-align: center;
	padding: clamp(20px, 2vw, 32px) clamp(12px, 1.5vw, 24px);
	border-radius: 12px;
	background: #0A1F41;
	border: 1px solid rgba(71, 186, 198, .18);
}
.ft-trust-icon {
	display: inline-flex;
	width: 48px;
	height: 48px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(71, 186, 198, .15);
	color: #47BAC6;
	margin: 0 auto 16px;
	font-size: 22px;
}
.ft-trust-item h3 {
	font-size: 16px;
	margin: 0 0 8px;
	color: #ffffff;
}
.ft-trust-item p {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .7);
	margin: 0;
}

/* ---------- Bento-карточка товара ---------- */
.product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-radius: 12px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

.product-bento {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}
.product-metric {
	padding: 8px 12px;
	border-radius: 8px;
	background: #F0F9FA;
	text-align: center;
}
.product-metric-value {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: #17808B;
	line-height: 1.2;
}
.product-metric-label {
	display: block;
	font-size: 11px;
	color: #6E747C;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-top: 2px;
}

/* ---------- Кнопка демо + статистика ---------- */
.product-demo-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #F6F6F6;
	margin-bottom: 12px;
}
.product-demo-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	background: linear-gradient(135deg, #47BAC6, #17808B);
	background: linear-gradient(135deg, var(--color-p1, #47BAC6), var(--color-p2, #17808B));
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s ease;
}
.product-demo-btn:hover { background: #0f636b; color: #ffffff; }
.product-demo-btn svg { width: 14px; height: 14px; }
.product-demo-stat {
	font-size: 12px;
	color: #6E747C;
	margin-left: auto;
}
.product-demo-stat strong { color: #17808B; }

/* ---------- Бейджи (приоритет и лимит задаёт PHP) ---------- */
.product-badges {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}
.product-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.badge-top      { background: #FF7F00; color: #ffffff; }
.badge-new      { background: #47BAC6; color: #ffffff; }
.badge-sale     { background: #ef4444; color: #ffffff; }
.badge-verified { background: #15803D; color: #ffffff; }
.product-badge-more {
	background: #e5e7eb;
	color: #6E747C;
	cursor: help;
}

/* ---------- Сравнение: чекбокс и панель ---------- */
.product-compare-toggle {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: 4px;
	background: rgba(255, 255, 255, .9);
	border: 1px solid #e5e7eb;
	font-size: 11px;
	color: #6E747C;
	cursor: pointer;
}
.product-compare-toggle input { margin: 0; }

.ft-compare-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 200;
	background: #0A1F41;
	color: #ffffff;
	padding: 12px clamp(16px, 4vw, 40px);
	display: flex;
	align-items: center;
	gap: 16px;
	transform: translateY(100%);
	transition: transform .3s ease;
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .2);
}
.ft-compare-bar.visible { transform: translateY(0); }
.ft-compare-bar-count { font-size: 14px; }
.ft-compare-bar-count strong { color: #47BAC6; }
.ft-compare-bar-actions { margin-left: auto; display: flex; gap: 8px; }

.ft-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(10, 31, 65, .8);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ft-compare-modal.open { display: flex; }
.ft-compare-modal-inner {
	background: #ffffff;
	border-radius: 12px;
	max-width: 960px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	padding: 24px;
}
.ft-compare-table {
	width: 100%;
	border-collapse: collapse;
}
.ft-compare-table th,
.ft-compare-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
	vertical-align: top;
}
.ft-compare-table th {
	background: #F6F6F6;
	font-weight: 600;
	color: #17808B;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .02em;
}

/* ---------- Sticky CTA на мобильных (single software) ---------- */
.ft-sticky-cta {
	display: none;
}
@media (max-width: 900px) {
	.ft-sticky-cta {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 150;
		background: #ffffff;
		border-top: 1px solid #e5e7eb;
		box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
		padding: 12px 16px;
		gap: 12px;
		align-items: center;
	}
	.ft-sticky-cta-price {
		font-size: 20px;
		font-weight: 700;
		color: #17808B;
	}
	.ft-sticky-cta-btn {
		flex: 1;
		padding: 12px 20px;
		border-radius: 8px;
		background: linear-gradient(135deg, #47BAC6, #17808B);
		background: linear-gradient(135deg, var(--color-p1, #47BAC6), var(--color-p2, #17808B));
		color: #ffffff;
		text-align: center;
		font-weight: 700;
		font-size: 15px;
		border: 0;
		cursor: pointer;
	}
	body.single-software { padding-bottom: 80px; }
}

/* ---------- Flat floating icons в hero ---------- */
.hero-floating-icons .floating-icon {
	background: transparent;
	border: 0;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	box-shadow: none;
	color: #47BAC6;
	font-size: clamp(18px, 2vw, 28px);
	font-weight: 700;
	will-change: transform;
	transition: transform .1s ease-out;
}
.hero-floating-icons .floating-icon.fi-2 { color: #ffffff; }
.hero-floating-icons .floating-icon.fi-4 { color: #FF7F00; }

/* ---------- Equity-кривая с hover-анимацией ---------- */
.product-equity {
	position: relative;
	width: 100%;
	height: 48px;
	margin-top: 4px;
	overflow: hidden;
	border-radius: 4px;
	background: linear-gradient(180deg, rgba(71, 186, 198, .08), rgba(71, 186, 198, .02));
}
.product-equity svg {
	width: 100%;
	height: 100%;
	display: block;
}
.product-equity path {
	fill: none;
	stroke: #17808B;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1000;
	stroke-dashoffset: 1000;
	transition: stroke-dashoffset 2s ease-out;
}
.product-card:hover .product-equity path {
	stroke-dashoffset: 0;
}