/**
 * MLM CTA & Conversion Components — Stylesheet
 *
 * Aligned with DeepDigital parent theme visual identity.
 *
 * Styles for:
 * - Promo bar (sticky top)
 * - Product grid (shortcode + shop loop)
 * - CTA banner (shortcode)
 * - Blog post CTA
 * - Before-footer CTA section
 * - Popup lead magnet
 * - Sidebar CTA widget
 * - Scroll animations
 *
 * @package DeepDigital_Child
 */

/* ==========================================================================
   Promo Bar
   ========================================================================== */

.mlm-promo-bar {
	position: relative;
	z-index: 9999;
	padding: 12px 0;
	text-align: center;
	background: var(--mlm-dark, #1f2732);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	animation: mlm-slideDown 0.4s ease;
}

.mlm-promo-bar-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	flex-wrap: wrap;
	padding: 0 50px;
}

.mlm-promo-bar-text {
	line-height: 1.4;
}

.mlm-promo-bar-btn {
	display: inline-block;
	padding: 5px 18px;
	background: var(--mlm-primary, #F2BC00);
	color: var(--mlm-dark, #1f2732);
	border: 2px solid var(--mlm-primary, #F2BC00);
	border-radius: var(--mlm-radius-pill, 50px);
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	transition: all 0.4s linear;
	white-space: nowrap;
}

.mlm-promo-bar-btn:hover,
.mlm-promo-bar-btn:focus {
	background: transparent;
	color: var(--mlm-primary, #F2BC00);
	text-decoration: none;
}

.mlm-promo-bar-close {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	opacity: 0.5;
	padding: 0 5px;
	line-height: 1;
	transition: opacity 0.3s ease;
}

.mlm-promo-bar-close:hover {
	opacity: 1;
}

.mlm-promo-bar.mlm-hidden {
	display: none;
}

@keyframes mlm-slideDown {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ==========================================================================
   Product Grid (Shortcode & Shop Loop Cards)
   ========================================================================== */

.mlm-product-grid {
	margin-bottom: 40px;
}

.mlm-product-grid .row {
	display: flex;
	flex-wrap: wrap;
}

.mlm-product-grid-col {
	margin-bottom: 30px;
	display: flex;
}

.mlm-product-grid-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	border: 1px solid var(--mlm-border, #dedfe1);
}

.mlm-product-grid-card .mlm-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.mlm-product-grid-card .mlm-card-media img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}

.mlm-product-grid-card .mlm-card-title {
	font-size: 17px;
	font-weight: 500;
	margin: 8px 0 6px;
	line-height: 1.3;
}

.mlm-product-grid-card .mlm-card-excerpt {
	font-size: 14px;
	line-height: 1.6;
	flex: 1;
	font-weight: 300;
}

.mlm-product-grid-card .mlm-card-price {
	font-size: 20px;
	font-weight: 500;
	color: var(--mlm-dark, #1f2732);
	margin: 10px 0 5px;
}

.mlm-product-grid-card .mlm-card-price del {
	color: var(--mlm-grey, #7f7f7f);
	font-size: 15px;
	font-weight: 300;
}

.mlm-product-grid-card .mlm-card-price ins {
	text-decoration: none;
}

.mlm-product-grid-card .mlm-card-delivery {
	margin-bottom: 10px;
}

.mlm-product-grid-card .mlm-card-cta {
	margin-top: auto;
	padding-top: 10px;
}

/* Shop loop override */
li.mlm-grid-item {
	list-style: none;
}

li.mlm-grid-item .mlm-product-grid-card {
	height: 100%;
}

/* Type-specific top border accent */
.mlm-card-type-audit {
	border-top: 3px solid #1565c0;
}

.mlm-card-type-template {
	border-top: 3px solid var(--mlm-success, #77AE39);
}

.mlm-card-type-formation {
	border-top: 3px solid var(--mlm-primary, #F2BC00);
}

.mlm-card-type-funnel {
	border-top: 3px solid #7b1fa2;
}

.mlm-card-type-pack {
	border-top: 3px solid var(--mlm-secondary, #00bea3);
}

/* ==========================================================================
   CTA Banner (Shortcode)
   ========================================================================== */

.mlm-cta-banner {
	padding: 50px 40px;
	margin: 30px 0;
}

.mlm-cta-banner-inner {
	max-width: 700px;
}

.mlm-cta-align-center .mlm-cta-banner-inner {
	margin: 0 auto;
	text-align: center;
}

.mlm-cta-align-left .mlm-cta-banner-inner {
	text-align: left;
}

.mlm-cta-banner-title {
	font-size: 30px;
	font-weight: 500;
	margin-bottom: 10px;
	line-height: 1;
}

.mlm-cta-banner-text {
	font-size: 16px;
	line-height: 30px;
	margin-bottom: 25px;
	opacity: 0.85;
	font-weight: 300;
}

/* Style: primary — gold background */
.mlm-cta-banner-primary {
	background: var(--mlm-primary, #F2BC00);
	color: var(--mlm-dark, #1f2732);
}

.mlm-cta-banner-primary .mlm-btn-cta-banner {
	background: var(--mlm-dark, #1f2732);
	color: #fff;
	padding: 20px 30px;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	border-radius: var(--mlm-radius-pill, 50px);
	border: 4px solid var(--mlm-dark, #1f2732);
	text-decoration: none;
	display: inline-block;
	transition: all 0.4s linear;
}

.mlm-cta-banner-primary .mlm-btn-cta-banner:hover {
	background: transparent;
	color: var(--mlm-dark, #1f2732);
	text-decoration: none;
}

/* Style: secondary — teal background */
.mlm-cta-banner-secondary {
	background: var(--mlm-secondary, #00bea3);
	color: #fff;
}

.mlm-cta-banner-secondary .mlm-btn-cta-banner {
	background: #fff;
	color: var(--mlm-secondary, #00bea3);
	padding: 20px 30px;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	border-radius: var(--mlm-radius-pill, 50px);
	border: 4px solid #fff;
	text-decoration: none;
	display: inline-block;
	transition: all 0.4s linear;
}

.mlm-cta-banner-secondary .mlm-btn-cta-banner:hover {
	background: transparent;
	color: #fff;
	text-decoration: none;
}

/* Style: dark — dark blue-grey background */
.mlm-cta-banner-dark {
	background: var(--mlm-dark, #1f2732);
	color: #fff;
}

.mlm-cta-banner-dark .mlm-btn-cta-banner {
	background: var(--mlm-primary, #F2BC00);
	color: var(--mlm-dark, #1f2732);
	padding: 20px 30px;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	border-radius: var(--mlm-radius-pill, 50px);
	border: 4px solid var(--mlm-primary, #F2BC00);
	text-decoration: none;
	display: inline-block;
	transition: all 0.4s linear;
}

.mlm-cta-banner-dark .mlm-btn-cta-banner:hover {
	background: transparent;
	color: var(--mlm-primary, #F2BC00);
	text-decoration: none;
}

/* ==========================================================================
   Blog Post CTA
   ========================================================================== */

.mlm-blog-cta {
	margin-top: 50px;
	padding: 40px;
	background: var(--mlm-light, #f4f4f5);
	border: none;
	border-left: 4px solid var(--mlm-primary, #F2BC00);
	text-align: center;
}

.mlm-blog-cta-icon {
	font-size: 36px;
	margin-bottom: 10px;
	line-height: 1;
	color: var(--mlm-primary, #F2BC00);
}

.mlm-blog-cta-title {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--mlm-dark, #1f2732);
}

.mlm-blog-cta-text {
	font-size: 16px;
	line-height: 30px;
	color: var(--mlm-grey, #7f7f7f);
	margin-bottom: 20px;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
	font-weight: 300;
}

/* ==========================================================================
   Before-Footer CTA Section
   ========================================================================== */

.mlm-before-footer-cta {
	background: var(--mlm-dark, #1f2732);
	color: #fff;
	padding: 100px 0;
	text-align: center;
}

.mlm-before-footer-cta-inner {
	max-width: 650px;
	margin: 0 auto;
}

.mlm-before-footer-cta-title {
	font-size: 42px;
	font-weight: 500;
	margin-bottom: 20px;
	line-height: 1;
	color: #fff;
}

.mlm-before-footer-cta-text {
	font-size: 16px;
	line-height: 30px;
	opacity: 0.7;
	margin-bottom: 30px;
	font-weight: 300;
}

.mlm-btn-lg {
	padding: 20px 35px;
	font-size: 12px;
}

/* ==========================================================================
   Popup Lead Magnet
   ========================================================================== */

.mlm-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: mlm-fadeIn 0.3s ease;
}

.mlm-popup-modal {
	background: #fff;
	max-width: 520px;
	width: 100%;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	animation: mlm-scaleIn 0.3s ease;
}

.mlm-popup-close {
	position: absolute;
	top: 12px;
	right: 15px;
	background: none;
	border: none;
	font-size: 28px;
	color: var(--mlm-grey, #7f7f7f);
	cursor: pointer;
	z-index: 2;
	padding: 0;
	line-height: 1;
	transition: color 0.3s ease;
}

.mlm-popup-close:hover {
	color: var(--mlm-dark, #1f2732);
}

.mlm-popup-image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.mlm-popup-content {
	padding: 30px;
}

.mlm-popup-title {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 10px;
	color: var(--mlm-dark, #1f2732);
}

.mlm-popup-text {
	font-size: 16px;
	line-height: 30px;
	color: var(--mlm-grey, #7f7f7f);
	margin-bottom: 20px;
	font-weight: 300;
}

.mlm-popup-form input[type="email"],
.mlm-popup-form input[type="text"] {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--mlm-border, #dedfe1);
	font-size: 15px;
	margin-bottom: 10px;
	transition: border-color 0.3s ease;
}

.mlm-popup-form input[type="email"]:focus,
.mlm-popup-form input[type="text"]:focus {
	border-color: var(--mlm-primary, #F2BC00);
	outline: none;
}

.mlm-popup-form button[type="submit"],
.mlm-popup-form input[type="submit"] {
	width: 100%;
	padding: 20px 30px;
	background: var(--mlm-primary, #F2BC00);
	color: var(--mlm-dark, #1f2732);
	border: 4px solid var(--mlm-primary, #F2BC00);
	border-radius: var(--mlm-radius-pill, 50px);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	cursor: pointer;
	transition: all 0.4s linear;
}

.mlm-popup-form button[type="submit"]:hover,
.mlm-popup-form input[type="submit"]:hover {
	background: transparent;
	color: var(--mlm-primary, #F2BC00);
}

@keyframes mlm-fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mlm-scaleIn {
	from {
		transform: scale(0.9);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* ==========================================================================
   Sidebar CTA Widget
   ========================================================================== */

.mlm-widget-cta {
	margin-bottom: 30px;
}

.mlm-widget-cta .mlm-card-media img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.mlm-widget-cta-title {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--mlm-dark, #1f2732);
}

.mlm-widget-cta-text {
	font-size: 14px;
	line-height: 1.6;
	color: var(--mlm-grey, #7f7f7f);
	margin-bottom: 15px;
	font-weight: 300;
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.mlm-cta-animate {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.mlm-cta-animate.mlm-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.mlm-before-footer-cta-title {
		font-size: 36px;
	}
}

@media (max-width: 991px) {
	.mlm-cta-banner {
		padding: 35px 25px;
	}

	.mlm-cta-banner-title {
		font-size: 24px;
	}

	.mlm-before-footer-cta {
		padding: 80px 0;
	}

	.mlm-before-footer-cta-title {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	.mlm-promo-bar-inner {
		flex-direction: column;
		gap: 8px;
		padding: 0 40px;
	}

	.mlm-promo-bar {
		font-size: 11px;
		padding: 10px 0;
	}

	.mlm-product-grid-card .mlm-card-media img {
		height: 180px;
	}

	.mlm-product-grid-col {
		margin-bottom: 20px;
	}

	.mlm-cta-banner {
		padding: 30px 20px;
	}

	.mlm-blog-cta {
		padding: 25px 20px;
		margin-top: 30px;
	}

	.mlm-before-footer-cta {
		padding: 60px 0;
	}

	.mlm-before-footer-cta-title {
		font-size: 26px;
	}

	.mlm-before-footer-cta-text {
		font-size: 15px;
	}

	.mlm-btn-lg {
		padding: 16px 28px;
	}

	.mlm-popup-modal {
		max-width: 95%;
	}

	.mlm-popup-content {
		padding: 20px;
	}

	.mlm-popup-title {
		font-size: 20px;
	}

	.mlm-popup-image img {
		height: 150px;
	}
}
