/* APM Product Manager — frontend styles (v1.3.0) */

.apm-carousel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
	gap: 1.25rem;
	margin: 1.5rem 0;
}

/* Two-column product card: info (left) + media (right) */
.apm-card {
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.apm-card-info {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.apm-card-media {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: #fafafa;
}

.apm-mini-carousel {
	position: relative;
	background: #f7f7f7;
	border-radius: 8px;
	overflow: hidden;
}

.apm-slides {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.apm-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.apm-slide.is-active {
	opacity: 1;
	position: relative;
}

.apm-slide.apm-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 0.9rem;
}

.apm-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.apm-nav:hover {
	background: rgba(0, 0, 0, 0.75);
}

.apm-prev { left: 8px; }
.apm-next { right: 8px; }

/* Single static image (no carousel chrome when a product has exactly one image) */
.apm-single-image {
	background: #f7f7f7;
	border-radius: 8px;
	overflow: hidden;
}

.apm-single-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.apm-card-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.35;
}

/* Variation selector pills */
.apm-variation-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.apm-pill {
	padding: 0.35rem 0.85rem;
	border: 1px solid #d0d0d0;
	border-radius: 999px;
	background: #fff;
	color: #333;
	font-size: 0.85rem;
	line-height: 1.4;
	cursor: pointer;
}

.apm-pill:hover {
	border-color: #999;
}

.apm-pill.is-active {
	background: #1a1a40;
	border-color: #1a1a40;
	color: #fff;
}

.apm-variation-set[hidden] {
	display: none;
}

.apm-buy-now {
	display: inline-block;
	margin-top: auto;
	padding: 0.65rem 1.25rem;
	background: #1a73e8;
	color: #fff !important;
	text-align: center;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
}

.apm-buy-now:hover {
	background: #1558b0;
	color: #fff !important;
}

.apm-get-now {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	background: #25d366;
	color: #fff !important;
	text-align: center;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
}

.apm-get-now:hover {
	background: #1da851;
	color: #fff !important;
}

/* Affiliate disclosure box */
.apm-disclosure {
	margin: 1.5rem 0;
	padding: 0.9rem 1.1rem;
	background: #f8f9fa;
	border-left: 4px solid #1a73e8;
	font-size: 0.88rem;
	color: #555;
	border-radius: 0 6px 6px 0;
}

/* Floating WhatsApp bubble */
.apm-wa-bubble {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #25d366;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	z-index: 9999;
	transition: transform 0.2s ease;
}

.apm-wa-bubble:hover {
	transform: scale(1.08);
}

@media (max-width: 768px) {
	.apm-carousel-grid {
		grid-template-columns: 1fr;
	}

	.apm-card {
		grid-template-columns: 1fr;
	}

	.apm-card-info,
	.apm-card-media {
		padding: 1rem;
	}
}
