/**
 * FlexMart Footer Manager — Frontend Styles
 *
 * Every color/radius/spacing value here reads from a CSS custom property
 * injected inline per-request from the admin's Colors settings (see
 * FFM_Assets::enqueue_frontend()), so the whole footer re-themes from
 * one settings save with no CSS edits.
 */

:root {
	--ffm-bg: #0f172a;
	--ffm-text: #cbd5e1;
	--ffm-heading: #ffffff;
	--ffm-accent: #2563eb;
	--ffm-button: #2563eb;
	--ffm-radius: 14px;
	--ffm-spacing: 40px;
}

/* Hide the theme's own default footer so only this premium footer shows
   — the same "inject new, hide old" pattern already used by this site's
   custom header. Reversible: deactivating this plugin brings the
   theme's footer straight back, nothing about it was altered. */
#colophon,
footer.site-footer,
.site-footer {
	display: none !important;
}

.ffm-footer,
.ffm-footer * {
	box-sizing: border-box;
}

.ffm-footer {
	background: var(--ffm-bg);
	color: var(--ffm-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 0.92rem;
	line-height: 1.6;
	margin-top: 0;
}

.ffm-footer a {
	color: var(--ffm-text);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ffm-footer a:hover {
	color: var(--ffm-heading);
}

.ffm-container {
	max-width: 1290px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ==========================================================================
   Trust badges strip
   ========================================================================== */

.ffm-badges-strip {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding: 22px 0;
}

.ffm-badges-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}

.ffm-badge {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ffm-badge__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(37, 99, 235, 0.15);
	color: var(--ffm-accent);
	flex: 0 0 auto;
}

.ffm-badge__icon svg {
	width: 18px;
	height: 18px;
}

.ffm-badge__label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ffm-heading);
}

/* ==========================================================================
   Main columns — 4 (desktop) / 2 (tablet) / 1 (mobile)
   ========================================================================== */

.ffm-columns {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: var(--ffm-spacing);
	padding: var(--ffm-spacing) 0;
}

.ffm-col__heading {
	color: var(--ffm-heading);
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 18px;
	letter-spacing: -0.01em;
}

.ffm-logo {
	max-height: 42px;
	max-width: 180px;
	margin-bottom: 14px;
	display: block;
}

.ffm-brand-name {
	color: var(--ffm-heading);
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0 0 14px;
	letter-spacing: -0.01em;
}

.ffm-description {
	margin: 0 0 18px;
	max-width: 32em;
}

.ffm-social-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ffm-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: var(--ffm-text) !important;
}

.ffm-social-btn:hover {
	background: var(--ffm-accent);
	color: #fff !important;
}

.ffm-social-btn svg {
	width: 17px;
	height: 17px;
}

.ffm-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffm-contact-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}

.ffm-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 600;
	font-size: 0.88rem;
	color: var(--ffm-heading) !important;
}

.ffm-contact-btn span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(37, 99, 235, 0.18);
	color: var(--ffm-accent);
	flex: 0 0 auto;
}

.ffm-contact-btn span svg {
	width: 14px;
	height: 14px;
}

.ffm-contact-btn--whatsapp span {
	background: rgba(37, 211, 102, 0.18);
	color: #25d366;
}

.ffm-location {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ffm-location__row {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	font-size: 0.86rem;
}

.ffm-location__row span {
	display: flex;
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--ffm-accent);
}

.ffm-location__row span svg {
	width: 15px;
	height: 15px;
}

.ffm-maps-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding: 9px 16px;
	border-radius: var(--ffm-radius);
	background: rgba(255, 255, 255, 0.08);
	color: var(--ffm-heading) !important;
	font-weight: 600;
	font-size: 0.84rem;
	width: fit-content;
}

.ffm-maps-btn:hover {
	background: var(--ffm-accent);
}

.ffm-maps-btn svg {
	width: 15px;
	height: 15px;
}

/* ==========================================================================
   Newsletter — compact, not the large homepage version
   ========================================================================== */

.ffm-newsletter-hint {
	margin: 0 0 12px;
	font-size: 0.84rem;
}

.ffm-newsletter-row {
	display: flex;
	border-radius: var(--ffm-radius);
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}

.ffm-newsletter-row input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	background: transparent;
	padding: 11px 14px;
	color: var(--ffm-heading);
	font-size: 0.86rem;
}

.ffm-newsletter-row input[type="email"]::placeholder {
	color: var(--ffm-text);
	opacity: 0.7;
}

.ffm-newsletter-row input[type="email"]:focus {
	outline: none;
}

.ffm-newsletter-row button {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	border: none;
	background: var(--ffm-button);
	color: #fff;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ffm-newsletter-row button:hover {
	opacity: 0.9;
}

.ffm-newsletter-row button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ffm-newsletter-row button svg {
	width: 16px;
	height: 16px;
}

.ffm-newsletter-message {
	min-height: 1.2em;
	font-size: 0.8rem;
	font-weight: 600;
	margin: 10px 0 0;
}

.ffm-newsletter-message.is-error {
	color: #f87171;
}

.ffm-newsletter-message.is-success {
	color: #4ade80;
}

/* ==========================================================================
   Payment methods
   ========================================================================== */

.ffm-payments-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	padding: 22px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ffm-payments-label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ffm-heading);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex: 0 0 auto;
}

.ffm-payments-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ffm-payment-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid color-mix(in srgb, var(--ffm-payment-color, #64748b) 40%, transparent);
	color: var(--ffm-heading);
	font-size: 0.76rem;
	font-weight: 600;
}

.ffm-payment-badge svg {
	width: 14px;
	height: 14px;
	color: var(--ffm-payment-color, var(--ffm-accent));
}

/* ==========================================================================
   Bottom bar
   ========================================================================== */

.ffm-bottom-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 18px 0;
}

.ffm-bottom-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.ffm-copyright,
.ffm-powered-by {
	margin: 0;
	font-size: 0.8rem;
	opacity: 0.85;
}

/* ==========================================================================
   Responsive: tablet 2-column, mobile 1-column stacked
   ========================================================================== */

@media (max-width: 1024px) {
	.ffm-columns {
		grid-template-columns: 1fr 1fr;
	}

	.ffm-badges-row {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 640px) {
	.ffm-container {
		padding: 0 18px;
	}

	.ffm-columns {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.ffm-badges-row {
		grid-template-columns: repeat(2, 1fr);
	}

	.ffm-bottom-bar__inner {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.ffm-payments-row {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffm-footer * {
		transition-duration: 0.001ms !important;
	}
}
