/**
 * AffiStyle Scoped Frontend Card Styles
 *
 * @package AffiStyle
 *
 * Table of Contents:
 *
 * 1.0 Base Container & Layout Tokens
 * 2.0 Rating Display Component
 * 3.0 Pros & Cons Component
 * 4.0 FTC Affiliate Micro-Disclosure
 * 5.0 Style 1: Modern Horizontal Grid Showcase
 * 6.0 Style 2: Minimalist Clean Vertical Layout
 * 7.0 Responsive Media Queries
 */

/**
 * 1.0 Base Container & Layout Tokens
 */
.affistyle-box-container,
.wp-block-affistyle-aff-box,
.affistyle-card-wrapper {
	display: block;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	color: #0f172a;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	line-height: 1.5;
}

.affistyle-box-container *,
.affistyle-box-container *::before,
.affistyle-box-container *::after,
.wp-block-affistyle-aff-box *,
.wp-block-affistyle-aff-box *::before,
.wp-block-affistyle-aff-box *::after,
.affistyle-card-wrapper *,
.affistyle-card-wrapper *::before,
.affistyle-card-wrapper *::after {
	box-sizing: border-box;
}

.affistyle-card-wrapper {
	overflow: hidden;
	margin: 24px auto;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.affistyle-card-lift:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.affistyle-box-container .affistyle-card-title,
.wp-block-affistyle-aff-box .affistyle-card-title,
.affistyle-card-wrapper .affistyle-card-title {
	margin: 0 0 8px;
	color: #0f172a;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.3px;
	line-height: 1.35;
}

.affistyle-box-container .affistyle-card-description,
.wp-block-affistyle-aff-box .affistyle-card-description,
.affistyle-card-wrapper .affistyle-card-description {
	margin: 0 0 16px;
	color: #475569;
	font-size: 14px;
	line-height: 1.6;
}

.affistyle-box-container .affistyle-card-button,
.wp-block-affistyle-aff-box .affistyle-card-button,
.affistyle-card-wrapper .affistyle-card-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 12px;
	background: #2563eb;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.affistyle-box-container .affistyle-card-button:hover,
.wp-block-affistyle-aff-box .affistyle-card-button:hover,
.affistyle-card-wrapper .affistyle-card-button:hover {
	background: #1d4ed8;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}


/**
 * 2.0 Rating Display Component
 */
.affistyle-box-container .affistyle-rating-display,
.wp-block-affistyle-aff-box .affistyle-rating-display,
.affistyle-card-wrapper .affistyle-rating-display {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0 12px;
}

.affistyle-box-container .affistyle-stars-view,
.wp-block-affistyle-aff-box .affistyle-stars-view,
.affistyle-card-wrapper .affistyle-stars-view {
	display: inline-flex;
	align-items: center;
}

.affistyle-box-container .affistyle-rating-stars-wrapper,
.wp-block-affistyle-aff-box .affistyle-rating-stars-wrapper,
.affistyle-card-wrapper .affistyle-rating-stars-wrapper {
	display: inline-block;
	position: relative;
	color: #cbd5e1;
	font-size: 15px;
	letter-spacing: 2px;
	line-height: 1;
}

.affistyle-box-container .affistyle-rating-stars-fill,
.wp-block-affistyle-aff-box .affistyle-rating-stars-fill,
.affistyle-card-wrapper .affistyle-rating-stars-fill {
	overflow: hidden;
	position: absolute;
	top: 0;
	left: 0;
	color: #f59e0b;
	white-space: nowrap;
}

.affistyle-box-container .affistyle-score-val,
.wp-block-affistyle-aff-box .affistyle-score-val,
.affistyle-card-wrapper .affistyle-score-val {
	color: #0f172a;
	font-size: 14px;
	font-weight: 800;
}

.affistyle-box-container .affistyle-count-val,
.wp-block-affistyle-aff-box .affistyle-count-val,
.affistyle-card-wrapper .affistyle-count-val {
	color: #64748b;
	font-size: 13px;
	font-weight: 500;
}


/**
 * 3.0 Pros & Cons Component
 */
.affistyle-box-container .affistyle-pros-cons-wrapper,
.wp-block-affistyle-aff-box .affistyle-pros-cons-wrapper,
.affistyle-card-wrapper .affistyle-pros-cons-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	width: 100%;
	margin: 16px 0;
	text-align: left;
}

.affistyle-box-container .affistyle-pros-cons-wrapper.affistyle-single-col,
.wp-block-affistyle-aff-box .affistyle-pros-cons-wrapper.affistyle-single-col,
.affistyle-card-wrapper .affistyle-pros-cons-wrapper.affistyle-single-col {
	grid-template-columns: 1fr;
}

.affistyle-box-container .affistyle-pros-box,
.wp-block-affistyle-aff-box .affistyle-pros-box,
.affistyle-card-wrapper .affistyle-pros-box,
.affistyle-box-container .affistyle-cons-box,
.wp-block-affistyle-aff-box .affistyle-cons-box,
.affistyle-card-wrapper .affistyle-cons-box {
	position: relative;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 13px;
}

.affistyle-box-container .affistyle-pros-box,
.wp-block-affistyle-aff-box .affistyle-pros-box,
.affistyle-card-wrapper .affistyle-pros-box {
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
}

.affistyle-box-container .affistyle-cons-box,
.wp-block-affistyle-aff-box .affistyle-cons-box,
.affistyle-card-wrapper .affistyle-cons-box {
	border: 1px solid #fecdd3;
	background: #fef2f2;
}

.affistyle-box-container .affistyle-badge-pro,
.wp-block-affistyle-aff-box .affistyle-badge-pro,
.affistyle-card-wrapper .affistyle-badge-pro,
.affistyle-box-container .affistyle-badge-con,
.wp-block-affistyle-aff-box .affistyle-badge-con,
.affistyle-card-wrapper .affistyle-badge-con {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
	padding: 3px 8px;
	border-radius: 12px;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.affistyle-box-container .affistyle-badge-pro,
.wp-block-affistyle-aff-box .affistyle-badge-pro,
.affistyle-card-wrapper .affistyle-badge-pro {
	background: #16a34a;
}

.affistyle-box-container .affistyle-badge-con,
.wp-block-affistyle-aff-box .affistyle-badge-con,
.affistyle-card-wrapper .affistyle-badge-con {
	background: #dc2626;
}

.affistyle-box-container .affistyle-pros-box ul,
.wp-block-affistyle-aff-box .affistyle-pros-box ul,
.affistyle-card-wrapper .affistyle-pros-box ul,
.affistyle-box-container .affistyle-cons-box ul,
.wp-block-affistyle-aff-box .affistyle-cons-box ul,
.affistyle-card-wrapper .affistyle-cons-box ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.affistyle-box-container .affistyle-pros-box li,
.wp-block-affistyle-aff-box .affistyle-pros-box li,
.affistyle-card-wrapper .affistyle-pros-box li,
.affistyle-box-container .affistyle-cons-box li,
.wp-block-affistyle-aff-box .affistyle-cons-box li,
.affistyle-card-wrapper .affistyle-cons-box li {
	position: relative;
	margin-bottom: 6px;
	padding-left: 20px;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}

.affistyle-box-container .affistyle-pros-box li:last-child,
.wp-block-affistyle-aff-box .affistyle-pros-box li:last-child,
.affistyle-card-wrapper .affistyle-pros-box li:last-child,
.affistyle-box-container .affistyle-cons-box li:last-child,
.wp-block-affistyle-aff-box .affistyle-cons-box li:last-child,
.affistyle-card-wrapper .affistyle-cons-box li:last-child {
	margin-bottom: 0;
}

.affistyle-box-container .affistyle-pros-box li::before,
.wp-block-affistyle-aff-box .affistyle-pros-box li::before,
.affistyle-card-wrapper .affistyle-pros-box li::before {
	position: absolute;
	left: 0;
	color: #16a34a;
	font-weight: 800;
	content: "✓";
}

.affistyle-box-container .affistyle-cons-box li::before,
.wp-block-affistyle-aff-box .affistyle-cons-box li::before,
.affistyle-card-wrapper .affistyle-cons-box li::before {
	position: absolute;
	left: 0;
	color: #dc2626;
	font-weight: 800;
	content: "✕";
}


/**
 * 4.0 FTC Affiliate Micro-Disclosure
 */
.affistyle-box-container .affistyle-disclosure-text,
.wp-block-affistyle-aff-box .affistyle-disclosure-text,
.affistyle-card-wrapper .affistyle-disclosure-text,
.affistyle-disclosure-text,
.affistyle-box-container .affistyle-ftc-disclosure,
.wp-block-affistyle-aff-box .affistyle-ftc-disclosure,
.affistyle-card-wrapper .affistyle-ftc-disclosure {
	display: block;
	margin-top: 10px;
	margin-bottom: 0;
	color: #718096;
	font-size: 11px;
	font-style: italic;
	line-height: 1.4;
	text-align: center;
}


/**
 * 5.0 Style 1: Modern Horizontal Grid Showcase
 */
.affistyle-card-wrapper.affistyle-card-style-1,
.affistyle-card-style-1 {
	box-sizing: border-box;
	width: 100%;
	max-width: 1050px;
	margin: 24px auto;
	padding: 24px;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.affistyle-box-container .affistyle-card-style-1-grid,
.wp-block-affistyle-aff-box .affistyle-card-style-1-grid,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-grid,
.affistyle-card-style-1 .affistyle-card-style-1-grid,
.affistyle-card-style-1-grid {
	display: grid;
	grid-template-columns: 260px 1fr;
	align-items: start;
	gap: 24px;
	width: 100%;
}

.affistyle-box-container .affistyle-card-style-1-media,
.wp-block-affistyle-aff-box .affistyle-card-style-1-media,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-media,
.affistyle-card-style-1 .affistyle-card-style-1-media,
.affistyle-card-style-1-media {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
}

.affistyle-box-container .affistyle-card-style-1-content,
.wp-block-affistyle-aff-box .affistyle-card-style-1-content,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-content,
.affistyle-card-style-1 .affistyle-card-style-1-content,
.affistyle-card-style-1-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
	width: 100%;
}

.affistyle-box-container .affistyle-card-style-1 .affistyle-card-image-box,
.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-image-box,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-image-box,
.affistyle-card-style-1 .affistyle-card-image-box {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 240px;
	padding: 20px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f0f4ff 0%, #f5f3ff 100%);
}

.affistyle-box-container .affistyle-card-style-1 .affistyle-card-image-box img,
.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-image-box img,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-image-box img,
.affistyle-card-style-1 .affistyle-card-image-box img {
	display: block;
	max-width: 100%;
	max-height: 220px;
	margin: 0 auto;
	object-fit: contain;
	filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
}

.affistyle-box-container .affistyle-card-style-1-footer,
.wp-block-affistyle-aff-box .affistyle-card-style-1-footer,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-footer,
.affistyle-card-style-1 .affistyle-card-style-1-footer,
.affistyle-card-style-1-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.affistyle-box-container .affistyle-card-style-1-btn-wrap,
.wp-block-affistyle-aff-box .affistyle-card-style-1-btn-wrap,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-btn-wrap,
.affistyle-card-style-1 .affistyle-card-style-1-btn-wrap,
.affistyle-card-style-1-btn-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.affistyle-box-container .affistyle-card-style-1 .affistyle-card-sponsored,
.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-sponsored,
.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-sponsored,
.affistyle-card-style-1 .affistyle-card-sponsored,
.affistyle-card-sponsored {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}


/**
 * 6.0 Style 2: Minimalist Clean Vertical Layout
 */
.affistyle-card-wrapper.affistyle-card-style-2 {
	overflow: hidden;
	max-width: 420px;
	border-radius: 24px;
}


/**
 * 7.0 Responsive Media Queries
 */
@media all and (max-width: 680px) {
	.affistyle-card-wrapper.affistyle-card-style-1,
	.affistyle-card-style-1 {
		margin: 16px auto;
		padding: 16px;
		border-radius: 16px;
	}

	.affistyle-box-container .affistyle-card-style-1-grid,
	.wp-block-affistyle-aff-box .affistyle-card-style-1-grid,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-grid,
	.affistyle-card-style-1 .affistyle-card-style-1-grid,
	.affistyle-card-style-1-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.affistyle-box-container .affistyle-card-style-1 .affistyle-card-image-box,
	.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-image-box,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-image-box,
	.affistyle-card-style-1 .affistyle-card-image-box {
		min-height: 180px;
		padding: 14px;
	}

	.affistyle-box-container .affistyle-card-style-1 .affistyle-card-image-box img,
	.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-image-box img,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-image-box img,
	.affistyle-card-style-1 .affistyle-card-image-box img {
		max-height: 160px;
	}

	.affistyle-box-container .affistyle-card-style-1 .affistyle-card-title,
	.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-title,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-title,
	.affistyle-card-style-1 .affistyle-card-title {
		font-size: 19px;
		line-height: 1.35;
	}
}

@media all and (max-width: 600px) {
	.affistyle-box-container .affistyle-pros-cons-wrapper,
	.wp-block-affistyle-aff-box .affistyle-pros-cons-wrapper,
	.affistyle-card-wrapper .affistyle-pros-cons-wrapper,
	.affistyle-pros-cons-wrapper {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.affistyle-box-container .affistyle-card-style-1-footer,
	.wp-block-affistyle-aff-box .affistyle-card-style-1-footer,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-footer,
	.affistyle-card-style-1 .affistyle-card-style-1-footer,
	.affistyle-card-style-1-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.affistyle-box-container .affistyle-card-style-1-btn-wrap,
	.wp-block-affistyle-aff-box .affistyle-card-style-1-btn-wrap,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-style-1-btn-wrap,
	.affistyle-card-style-1 .affistyle-card-style-1-btn-wrap,
	.affistyle-card-style-1-btn-wrap {
		width: 100%;
	}

	.affistyle-box-container .affistyle-card-style-1 .affistyle-card-button,
	.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-button,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-button,
	.affistyle-card-style-1 .affistyle-card-button,
	.affistyle-card-button {
		display: flex;
		justify-content: center;
		width: 100%;
		min-height: 44px;
	}

	.affistyle-box-container .affistyle-card-style-1 .affistyle-card-sponsored,
	.wp-block-affistyle-aff-box .affistyle-card-style-1 .affistyle-card-sponsored,
	.affistyle-card-wrapper.affistyle-card-style-1 .affistyle-card-sponsored,
	.affistyle-card-style-1 .affistyle-card-sponsored,
	.affistyle-card-sponsored {
		text-align: center;
	}
}
