/* AliExpress cards – clean screenshot-like design */

.aeap-wrapper {
	width: 100%;
	margin: 1.5rem 0;
	box-sizing: border-box;
}

.aeap-wrapper *,
.aeap-wrapper *::before,
.aeap-wrapper *::after {
	box-sizing: border-box;
}


/* ===== Category tags (pill style) ===== */
.aeap-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px 0;
	padding: 0;
	align-items: center;
}

.aeap-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 7px 14px;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	background: #f5f5f5;
	color: #555;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
	white-space: nowrap;
	font-family: inherit;
}

.aeap-tag:hover {
	background: #eee;
	color: #222;
	border-color: #ddd;
}

.aeap-tag.is-active {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.aeap-tag.aeap-tag-empty {
	display: none !important;
}

/* Desktop: tags visible, mobile dropdown hidden */
.aeap-filter-desktop { display: flex; }
.aeap-filter-mobile { display: none; }

.aeap-mobile-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin: 0 0 6px 0;
}

.aeap-category-select {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 44px;
	padding: 0 36px 0 14px;
	border: 1px solid #ddd;
	border-radius: 10px;
	font-size: 15px;
	color: #222;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

/* Tablet + phone: dropdown only */
@media (max-width: 900px) {
	.aeap-filter-desktop { display: none !important; }
	.aeap-filter-mobile {
		display: block !important;
		margin: 0 0 16px 0;
		padding: 0;
	}
}





/* Grid */
.aeap-products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 0;
}
.aeap-columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
.aeap-columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
.aeap-columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
.aeap-columns-5 { grid-template-columns: repeat(5, 1fr) !important; }
.aeap-columns-6 { grid-template-columns: repeat(6, 1fr) !important; }

@media (max-width: 1024px) {
	.aeap-products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 700px) {
	.aeap-products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}
@media (max-width: 400px) {
	.aeap-products { grid-template-columns: 1fr !important; }
}

/* ===== CARD ===== */
.aeap-card {
	display: flex !important;
	flex-direction: column !important;
	background: #fff !important;
	border-radius: 12px !important;
	border: 1px solid #eee !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
	overflow: hidden !important;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	transition: box-shadow .2s ease;
}
.aeap-card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

/* Image TOP */
.aeap-img-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f3f3f3;
	overflow: hidden;
	flex: 0 0 auto;
	position: relative;
}
.aeap-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
}
.aeap-img-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #aaa;
	font-size: 13px;
}

/* Info under image – tight spacing */
.aeap-info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 10px 12px 12px;
	gap: 0;
	background: #fff;
}

/* Title – 2 lines, always visible, no huge gap */
.aeap-title {
	display: -webkit-box !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 2 !important;
	overflow: hidden !important;
	color: #1a1a1a !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	margin: 0 0 2px 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	max-height: 2.7em !important;
	word-break: break-word;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Sold – immediately under title */
.aeap-sold {
	color: #e85d04 !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	margin: 0 0 4px 0 !important;
	padding: 0 !important;
}

/* Prices */
.aeap-prices {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px 0 !important;
	padding: 0 !important;
}
.aeap-now {
	color: #1a1a1a !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
}
.aeap-was {
	color: #999 !important;
	font-size: 12px !important;
	text-decoration: line-through !important;
	line-height: 1.2 !important;
}

/* Details button – full width, text centered */
.aeap-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	margin-top: auto !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
	height: 40px !important;
	line-height: 40px !important;
	background: #2563eb !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	text-align: center !important;
	text-decoration: none !important;
	border: none !important;
	border-radius: 8px !important;
	cursor: pointer;
}
.aeap-btn:hover,
.aeap-btn:focus {
	background: #1d4ed8 !important;
	color: #fff !important;
	text-decoration: none !important;
}

/* Load more */
.aeap-load-more-wrap { text-align: center; padding: 20px 0 8px; }
.aeap-spinner {
	width: 28px; height: 28px; margin: 0 auto;
	border: 3px solid #e5e7eb; border-top-color: #2563eb;
	border-radius: 50%; animation: aeap-spin .7s linear infinite;
}
@keyframes aeap-spin { to { transform: rotate(360deg); } }
.aeap-status { font-size: 13px; color: #666; margin: 6px 0 0; }
.aeap-scroll-sentinel { height: 1px; }
.aeap-error, .aeap-empty {
	grid-column: 1 / -1;
	padding: 16px;
	text-align: center;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 10px;
	color: #555;
}
.aeap-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
