/**
 * Flex Card Builder - E-Commerce Product Listing Styles
 */

.fcb-listing-container {
	margin: 30px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fcb-cards-grid {
	display: grid;
	gap: 24px;
}

/* Responsive Column Layouts */
.fcb-cols-1 .fcb-cards-grid { grid-template-columns: 1fr; }
.fcb-cols-2 .fcb-cards-grid { grid-template-columns: repeat(2, 1fr); }
.fcb-cols-3 .fcb-cards-grid { grid-template-columns: repeat(3, 1fr); }
.fcb-cols-4 .fcb-cards-grid { grid-template-columns: repeat(4, 1fr); }
.fcb-cols-6 .fcb-cards-grid { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.fcb-cols-4 .fcb-cards-grid,
	.fcb-cols-6 .fcb-cards-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.fcb-cols-3 .fcb-cards-grid,
	.fcb-cols-4 .fcb-cards-grid,
	.fcb-cols-6 .fcb-cards-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.fcb-cards-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Card Item */
.fcb-card-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
	transition: all 0.25s ease;
	display: flex;
	flex-direction: column;
}

.fcb-card-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
	border-color: #cbd5e1;
}

/* Thumb Mockup Frame */
.fcb-card-thumb-wrap {
	height: 200px;
	position: relative;
	background: #f1f5f9;
	overflow: hidden;
}

.fcb-thumb-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.fcb-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.fcb-card-item:hover .fcb-card-thumb {
	transform: scale(1.04);
}

.fcb-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
	color: #ffffff;
	padding: 16px;
	text-align: center;
	box-sizing: border-box;
}

.fcb-card-thumb-placeholder .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	margin-bottom: 8px;
}

.fcb-card-thumb-placeholder span {
	font-size: 14px;
	font-weight: 700;
}

/* Badges */
.fcb-badges-wrap {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	gap: 6px;
}

.fcb-badge {
	font-size: 11px;
	font-weight: 800;
	padding: 4px 8px;
	border-radius: 6px;
	letter-spacing: 0.3px;
}

.fcb-badge-discount {
	background: #dc2626;
	color: #ffffff;
}

.fcb-badge-free {
	background: #0284c7;
	color: #ffffff;
}

.fcb-badge-pro {
	background: #0f172a;
	color: #ffffff;
}

/* Hover Quick Preview Button */
.fcb-thumb-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
	padding: 20px 10px 10px 10px;
	display: flex;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.fcb-card-item:hover .fcb-thumb-overlay {
	opacity: 1;
}

.fcb-btn-quick-preview {
	background: #ffffff;
	border: none;
	color: #0f172a;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.fcb-btn-quick-preview:hover {
	background: #2563eb;
	color: #ffffff;
}

/* Card Body */
.fcb-card-body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.fcb-card-category {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #2563eb;
	margin-bottom: 4px;
}

.fcb-card-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 4px 0;
	line-height: 1.3;
}

.fcb-card-title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s;
}

.fcb-card-title a:hover {
	color: #2563eb;
}

.fcb-card-biz-name {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	margin-bottom: 6px;
}

.fcb-card-desc {
	font-size: 12px;
	color: #64748b;
	margin: 0 0 10px 0;
	line-height: 1.4;
	flex: 1;
}

.fcb-card-rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 10px;
	font-size: 12px;
}

.fcb-stars {
	color: #f59e0b;
	letter-spacing: 1px;
}

.fcb-rating-count {
	color: #94a3b8;
}

/* Price Row */
.fcb-card-price-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 14px;
}

.fcb-current-price {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
}

.fcb-orig-price {
	font-size: 13px;
	color: #94a3b8;
}

.fcb-price-free {
	font-size: 14px;
	font-weight: 700;
	color: #0284c7;
}

/* Action Buttons */
.fcb-card-actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
}

.fcb-card-actions .fcb-btn {
	flex: 1;
	padding: 8px 6px;
	font-size: 12px;
	text-align: center;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
}

.fcb-btn-details {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #e2e8f0;
}

.fcb-btn-details:hover {
	background: #e2e8f0;
}

.fcb-btn-buy {
	background: #2563eb;
	color: #ffffff;
}

.fcb-btn-buy:hover {
	background: #1d4ed8;
}

/* Quick Preview Modal */
.fcb-modal-box {
	background: #0f172a;
	border-radius: 28px;
	max-width: 440px;
	width: 100%;
	padding: 16px;
	box-shadow: 0 25px 60px rgba(0,0,0,0.4);
	display: flex;
	flex-direction: column;
}

.fcb-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #ffffff;
	padding-bottom: 10px;
	border-bottom: 1px solid #1e293b;
	font-size: 14px;
	font-weight: 700;
}

.fcb-modal-close {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
}

.fcb-phone-mockup {
	width: 100%;
	height: 520px;
	border-radius: 20px;
	overflow: hidden;
	background: #ffffff;
	margin-top: 10px;
}

.fcb-phone-mockup iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.fcb-modal-footer {
	margin-top: 12px;
	display: flex;
	justify-content: flex-end;
}
