/* Amazon Afiliado Box v2.0 — HoyTech */

.amazon-afiliado-box {
	position: relative;
	display: flex;
	gap: 24px;
	align-items: center;
	margin: 28px 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.amazon-afiliado-box.has-badge {
	padding-top: 30px;
}

.amazon-afiliado-box .product-image {
	flex: 0 0 200px;
}

.amazon-afiliado-box .product-image img {
	display: block;
	width: 200px;
	height: 200px;
	object-fit: contain;
	border-radius: 6px;
}

.amazon-afiliado-box .product-details {
	flex: 1 1 auto;
	min-width: 0;
}

.amazon-afiliado-box .product-title {
	margin: 0 0 10px;
	font-size: 1.25rem;
	line-height: 1.35;
	color: #0e6b7c;
}

/* Puntos clave */
.afb-features {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.afb-features li {
	position: relative;
	margin: 0 0 6px;
	padding-left: 24px;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #333;
}

.afb-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: #1a8f3c;
}

/* Precio + botón */
.amazon-afiliado-box .price-and-button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 20px;
	align-items: center;
	justify-content: space-between;
}

.amazon-afiliado-box .product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.amazon-afiliado-box .old-price {
	color: #888;
	text-decoration: line-through;
	font-size: 0.95rem;
}

.amazon-afiliado-box .current-price {
	font-size: 1.75rem;
	font-weight: 700;
	color: #111;
}

.afb-price-date {
	width: 100%;
	font-size: 0.75rem;
	color: #888;
}

.amazon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 22px;
	background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
	border: 1px solid #c89411;
	border-radius: 6px;
	color: #111 !important;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: filter 0.15s ease;
}

.amazon-button:hover,
.amazon-button:focus {
	filter: brightness(0.95);
}

.amazon-button .amazon-logo-img {
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.amazon-button--small {
	padding: 8px 14px;
	font-size: 0.9rem;
}

/* Etiquetas */
.afb-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	background: #043693;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.3;
}

.amazon-afiliado-box > .afb-badge {
	position: absolute;
	top: -12px;
	left: 20px;
}

.afb-badge--calidad-precio { background: #1a8f3c; }
.afb-badge--barato        { background: #0e6b7c; }
.afb-badge--premium       { background: #5b2a86; }
.afb-badge--oferta        { background: #d93025; }
.afb-badge--custom        { background: #1f5fbf; }

/* Recuadro "Nuestra elección" */
.afb-top {
	margin: 24px 0 32px;
	padding: 18px 20px;
	background: #f5f8ff;
	border: 2px solid #043693;
	border-radius: 10px;
}

.afb-top__title {
	margin: 0 0 12px !important;
	font-size: 1.15rem;
	font-weight: 700;
	color: #043693;
}

.afb-top__list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.afb-top__item {
	margin-left: 0 !important;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid #dbe3f3;
}

.afb-top__item:first-child {
	border-top: 0;
}

.afb-top__item img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: #fff;
	border-radius: 6px;
}

.afb-top__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.afb-top__name {
	font-weight: 600;
	line-height: 1.3;
	color: #111;
}

/* Aviso de afiliado */
.afb-disclosure {
	margin-top: 28px;
	padding-top: 12px;
	border-top: 1px solid #e3e6ea;
	font-size: 0.85rem;
	font-style: italic;
	color: #666;
}

/* Móvil */
@media (max-width: 640px) {
	.amazon-afiliado-box {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}

	.amazon-afiliado-box.has-badge {
		padding-top: 26px;
	}

	.amazon-afiliado-box .product-image {
		flex: none;
		align-self: center;
	}

	.amazon-afiliado-box .product-image img {
		width: 160px;
		height: 160px;
	}

	.amazon-afiliado-box .price-and-button-row,
	.amazon-afiliado-box .amazon-button {
		width: 100%;
	}

	.afb-top__item {
		flex-wrap: wrap;
	}

	.afb-top__item .amazon-button {
		width: 100%;
	}
}
